Bits.cxx
Go to the documentation of this file.
1 
2 #include "WireCellUtil/Bits.h"
3 
4 int WireCell::Bits::shift_right(int value, int n, int filling, int totalBit)
5 {
6  return (value >> n) | (filling << (totalBit-n));
7 }
8 
10 {
11  return ( value & ((1 << n) - 1) );
12 }
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1225
int lowest_bits(int value, int n)
Definition: Bits.cxx:9
std::size_t n
Definition: format.h:3399
int shift_right(int value, int n, int filling, int totalBit)
Definition: Bits.cxx:4