Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit b3212d0

Browse files
author
Jonathan Kliem
committed
two mistakes with no intrinsics
1 parent fc0f1d9 commit b3212d0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/sage/data_structures/bitset_intrinsics.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ static inline mp_bitcnt_t _set_non_zero(mp_limb_t* bits, mp_bitcnt_t* non_zero_c
6767
}
6868
#else
6969
for(i = 0; i < limbs; i++){
70-
if (a[i]){
70+
if (bits[i]){
7171
non_zero_chunks[pos] = i;
7272
pos++;
7373
}
@@ -363,8 +363,8 @@ static inline void mpn_operation(mp_limb_t* dst, mp_limb_t* a, mp_limb_t* b, mp_
363363
mpn_ior_n(dst, a, b, limbs);
364364
if (operation == ANDNOT)
365365
mpn_andn_n(dst, a, b, limbs);
366-
// ``operation == XOR``
367-
mpn_xor_n(dst, a, b, limbs);
366+
if (operation == XOR)
367+
mpn_xor_n(dst, a, b, limbs);
368368
}
369369

370370
static inline void _bitset_operation(mp_limb_t* dst, mp_limb_t* a, mp_limb_t* b, mp_bitcnt_t limbs, enum operation_t operation){

0 commit comments

Comments
 (0)