Skip to content

Commit 7f45695

Browse files
committed
fix warning
1 parent 132541a commit 7f45695

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

cp-algo/util/bit.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ namespace cp_algo {
3434
}
3535

3636
[[gnu::target("avx2"), gnu::always_inline]] inline void write_bits(char *p, uint32_t bits) {
37-
auto bytes = u32x8() + bits;
3837
static constexpr u8x32 shuffler = {
3938
0, 0, 0, 0, 0, 0, 0, 0,
4039
1, 1, 1, 1, 1, 1, 1, 1,
@@ -48,9 +47,8 @@ namespace cp_algo {
4847
1, 2, 4, 8, 16, 32, 64, 128,
4948
1, 2, 4, 8, 16, 32, 64, 128
5049
};
51-
u8x32 to_save = (shuffled & mask) ? '1' : '0';
5250
for(int z = 0; z < 32; z++) {
53-
p[z] = to_save[z];
51+
p[z] = shuffled[z] & mask[z] ? '1' : '0';
5452
}
5553
}
5654
[[gnu::target("avx2"), gnu::always_inline]] inline void write_bits64(char *p, uint64_t bits) {

0 commit comments

Comments
 (0)