74 snprintf(what,
sizeof(what),
"layer (which is %u) >= _layers (which is %u)",
layer,
_layers);
75 throw std::out_of_range(what);
81 snprintf(what,
sizeof(what),
"unit (which is %u) >= _units (which is %u)",
unit,
_units);
82 throw std::out_of_range(what);
98 const unsigned int n3 = (n1 == 0) ? n2 + 1 : n2;
100 unsigned int i = 0,
j = 0, j_curr = 0, j_next = 0;
126 const unsigned int n3 = (n1 == 0) ? n2 +
_units - 1 : n2;
128 unsigned int i = 0,
j = 0, j_curr = 0, j_next = 0;
138 j_next = (n3 +
j + 1) %
_units;
145 static_assert((
_layers == 4 &&
_units == 3),
"This function assumes (_layers == 4 && _units == 3)");
160 unsigned int ly = (b_st1 << 2) | (b_st2 << 1) | (b_st3 << 0) | (b_st4 << 0);
void set_word(unsigned int layer, unsigned int unit, value_type value)
bool test_bit(unsigned int layer, unsigned int bit) const
void set_bit(unsigned int layer, unsigned int bit)
static const unsigned int _units
void swap(Association< C > &lhs, Association< C > &rhs)
value_type get_word(unsigned int layer, unsigned int unit) const
void clear_bit(unsigned int layer, unsigned int bit)
value_type _buffer[_layers][_units]
void print(std::ostream &out) const
std::ostream & operator<<(std::ostream &o, const PhiMemoryImage &patt)
void rotr(unsigned int n)
void rotl(unsigned int n)
Basic3DVector unit() const
void check_input(unsigned int layer, unsigned int bit) const
PhiMemoryImage & operator=(PhiMemoryImage other)
unsigned int op_and(const PhiMemoryImage &other) const
void swap(PhiMemoryImage &other)
static const unsigned int _layers