diff options
author | pixel <pixel> | 2002-11-11 20:07:41 +0000 |
---|---|---|
committer | pixel <pixel> | 2002-11-11 20:07:41 +0000 |
commit | 028c7dcfa9f1920d5fa2e573790bef40c4076275 (patch) | |
tree | 3c5f2bd9e90b7d57bae84111a200ee608c9d9bc3 /includes/General.h | |
parent | 9cde21d59d7c1f9b385d334cd60ae241ce9cf49b (diff) |
Still working ;-)
Diffstat (limited to 'includes/General.h')
-rw-r--r-- | includes/General.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/includes/General.h b/includes/General.h index 6f423ed..2b645c9 100644 --- a/includes/General.h +++ b/includes/General.h @@ -4,4 +4,9 @@ #define MAX(__a,__b) ((__a)<(__b)?(__b):(__a)) #define MIN(__a,__b) ((__a)>(__b)?(__b):(__a)) +#define BITCOUNT(x) (((BX_(x)+(BX_(x)>>4)) & 0x0F0F0F0F) % 255) +#define BX_(x) ((x) - (((x)>>1)&0x77777777) \ + - (((x)>>2)&0x33333333) \ + - (((x)>>3)&0x11111111)) + #endif |