Skip to content

Commit

Permalink
Fix mistaken bits convention
Browse files Browse the repository at this point in the history
  • Loading branch information
aloeliger committed Jun 26, 2024
1 parent 57dace0 commit 594bb31
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ namespace l1t {
return false;
} else {
const uint32_t* base = block.payload().data();
//This differs slightly from uGT, in that we grab the first 4 bits
//of the last 4 words (still in first to last order) and arrange those
uint32_t word = (caloCrateCicadaBitsPattern & base[2]) >> 16 | (caloCrateCicadaBitsPattern & base[3]) >> 20 |
(caloCrateCicadaBitsPattern & base[4]) >> 24 | (caloCrateCicadaBitsPattern & base[5]) >> 28;
//First 4 bits of the first 4 words are CICADA bits
uint32_t word = (caloCrateCicadaBitsPattern & base[0]) >> 16 | (caloCrateCicadaBitsPattern & base[1]) >> 20 |
(caloCrateCicadaBitsPattern & base[2]) >> 24 | (caloCrateCicadaBitsPattern & base[3]) >> 28;
float score = static_cast<float>(word) / 256.f;
res->push_back(0, score);
return true;
Expand Down

0 comments on commit 594bb31

Please sign in to comment.