Skip to content

Commit

Permalink
fixup the KeyAddrBitfield.h constexpr fix - the previous fix results in
Browse files Browse the repository at this point in the history
code that gets MatrixAddr super confused. So just un-constxpr it
  • Loading branch information
obra committed Nov 15, 2023
1 parent 960eeda commit 850b099
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/kaleidoscope/KeyAddrBitfield.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ class KeyAddrBitfield {
static constexpr uint8_t bitIndex(KeyAddr k) {
return k.toInt() % block_size;
}
static constexpr KeyAddr index(uint8_t block_index, uint8_t bit_index) {
return KeyAddr( (block_index * block_size) + bit_index);
static KeyAddr index(uint8_t block_index, uint8_t bit_index) {
uint8_t offset = (block_index * block_size) + bit_index;
return KeyAddr(offset);
}
bool read(KeyAddr k) const {
// assert(k.toInt() < size);
Expand Down

0 comments on commit 850b099

Please sign in to comment.