1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2025-08-14 14:01:48 +03:00
Files
gnulib/modules/count-one-bits
Paul Eggert 75588b6ed2 count-one-bits: port to MSC; support types wider than 64 bits
The ideas behind the MSC port are stolen from Emacs.
* lib/count-one-bits.c (popcount_support) [_MSC_VER]: New variable.
* lib/count-one-bits.h: Include limits.h, for CHAR_BIT.
Don't include verify.h: it's no longer needed, as types wider than
64 bits are now supported.
(COUNT_ONE_BITS_GENERIC): New macro.
(popcount_supported) [_MSC_VER]: New inline function.
(COUNT_ONE_BITS): Use it.  New arg MSC_BUILTIN, for better
performance with MSC.  All uses changed.  Do not assume that TYPE
has at most 64 bits.
* modules/count-one-bits (Depends-on): Do not depend on 'verify'.
2013-10-07 00:03:00 -07:00

26 lines
299 B
Plaintext

Description:
Counts the number of 1-bits in a word.
Files:
lib/count-one-bits.c
lib/count-one-bits.h
m4/count-one-bits.m4
Depends-on:
extern-inline
configure.ac:
gl_COUNT_ONE_BITS
Makefile.am:
lib_SOURCES += count-one-bits.c
Include:
"count-one-bits.h"
License:
LGPLv2+
Maintainer:
Ben Pfaff