diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-05-18 20:17:33 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-05-18 20:17:33 -0700 |
commit | a580c45de5a825165f46d95206d9ac3c2c52fcd6 (patch) | |
tree | 849e617a4ee8730435782c3ecc8a14f1fb2594a2 /mpi/mpi.h | |
parent | aaac04d9e0cdcdd974c065bbff3d212a5eb5cd3a (diff) | |
download | txr-a580c45de5a825165f46d95206d9ac3c2c52fcd6.tar.gz txr-a580c45de5a825165f46d95206d9ac3c2c52fcd6.tar.bz2 txr-a580c45de5a825165f46d95206d9ac3c2c52fcd6.zip |
logcount: new function.
This is in ANSI CL; potentially useful and hard to
implement efficiently in user code.
* arith.c (logcount): New function.
* eval.c (eval_init): Register logcount intrinsic.
* lib.h (logcount): Declared.
* mpi/mi.c (s_mp_count_ones): New static function.
(mp_count_ones): New function.
* mpi/mpi.h (mp_count_ones): Declared.
* txr.1: Documented.
Diffstat (limited to 'mpi/mpi.h')
-rw-r--r-- | mpi/mpi.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -177,6 +177,7 @@ mp_err mp_to_unsigned_bin(mp_int *mp, unsigned char *str); mp_err mp_to_unsigned_buf(mp_int *mp, unsigned char *str, size_t size); mp_size mp_count_bits(mp_int *mp); +mp_size mp_count_ones(mp_int *mp); mp_size mp_is_pow_two(mp_int *mp); #if MP_COMPAT_MACROS |