Skip to content

Commit

Permalink
Remove support for int sizes other than 32 bits
Browse files Browse the repository at this point in the history
No viable platform uses anything other than 32 bits for `int`.
  • Loading branch information
rocallahan committed Sep 23, 2024
1 parent 6ba3c34 commit 3e56b42
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions lib/abcesop/eabc/exor.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace abc::exorcism {
/// MACRO DEFINITIONS ///
////////////////////////////////////////////////////////////////////////

// the number of bits per integer (can be 16, 32, 64 - tested for 32)
// the number of bits per integer
#define BPI 32
#define BPIMASK 31
#define LOGBPI 5
Expand All @@ -71,17 +71,8 @@ namespace abc::exorcism {
// the following number of cube pairs are allocated:
// nCubesAlloc/CUBE_PAIR_FACTOR

#if BPI == 64
#define DIFFERENT 0x5555555555555555
#define BIT_COUNT(w) (BitCount[(w)&0xffff] + BitCount[((w)>>16)&0xffff] + BitCount[((w)>>32)&0xffff] + BitCount[(w)>>48])
#elif BPI == 32
#define DIFFERENT 0x55555555
#define BIT_COUNT(w) (BitCount[(w)&0xffff] + BitCount[(w)>>16])
#else
#define DIFFERENT 0x5555
#define BIT_COUNT(w) (BitCount[(w)])
#endif


#define VarWord(element) ((element)>>LOGBPI)
#define VarBit(element) ((element)&BPIMASK)
Expand Down

0 comments on commit 3e56b42

Please sign in to comment.