42 std::cout<<
"bit number is greater than total size. Don't do that!\n";
47 bitNumber = bitNumber-1;
54 int bitOffset = bitNumber %
size;
55 if(bitNumber == 64 || bitNumber == 128){chunkNumber += 1;}
62 tmp = tmp << bitOffset;
91 int bitOffset = bitNumber %
size;
92 if(bitNumber == 64 || bitNumber == 128){chunkNumber += 1;}
101 return ((
_buffer[chunkNumber] & tmp) != 0);
109 if (nBits == 0)
return;
111 bool negShift = (nBits < 0);
113 if (negShift) nBits = -nBits;
116 int value_size =
sizeof(transferBits)*8;
124 transferBits = (0x1 << nBits) - 1;
127 transferBits2 = (0x1 << nBits) - 1;
134 transferBits <<= (value_size - nBits);
135 transferBits2 <<= (value_size - nBits);
142 transferBits = (0x1 << nBits) - 1;
143 transferBits <<= (value_size - nBits);
145 transferBits2 = (0x1 << nBits) - 1;
146 transferBits2 <<= (value_size - nBits);
160 transferBits >>= (value_size - nBits);
163 transferBits2 >>= (value_size - nBits);
204 for (
int j = size;
j > 0;
j--){
void CopyFromBuffer(PhiMemoryImage::value_ptr rhs, int offset)
functions///
void SetBit(int station, int bitNumber, bool value=true)
static const int STATIONS
bool GetBit(int station, int bitNumber) const
std::vector< std::vector< double > > tmp
PhiMemoryImage()
constructors///
PhiMemoryImage::value_type _buffer[PhiMemoryImage::TOTAL_UNITS]
unsigned long int value_type
PhiMemoryImage::value_type * value_ptr
static const int TOTAL_UNITS
tuple size
Write out results.