aboutsummaryrefslogtreecommitdiffstats
path: root/chilbert/GetBits.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'chilbert/GetBits.hpp')
-rw-r--r--chilbert/GetBits.hpp44
1 files changed, 0 insertions, 44 deletions
diff --git a/chilbert/GetBits.hpp b/chilbert/GetBits.hpp
deleted file mode 100644
index 196751d..0000000
--- a/chilbert/GetBits.hpp
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- Copyright (C) 2018 David Robillard <d@drobilla.net>
- Copyright (C) 2006-2007 Chris Hamilton <chamilton@cs.dal.ca>
-
- This program is free software: you can redistribute it and/or modify it under
- the terms of the GNU General Public License as published by the Free Software
- Foundation, either version 2 of the License, or (at your option) any later
- version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <https://www.gnu.org/licenses/>.
-*/
-
-#ifndef CHILBERT_GETBITS_HPP
-#define CHILBERT_GETBITS_HPP
-
-#include "chilbert/Operations.hpp"
-
-namespace chilbert {
-
-/** Copy a range of bits from one field to the start of another.
- *
- * @param h Source bit field
- * @param n Number of bits
- * @param i Start bit index in source
- * @param w Destination bit field
- */
-template <class H, class I>
-inline void
-get_bits(const H& h, const size_t n, const size_t i, I& w)
-{
- for (size_t j = 0; j < n; j++) {
- set_bit(w, j, test_bit(h, i + j));
- }
-}
-
-} // namespace chilbert
-
-#endif