summaryrefslogtreecommitdiffstats
path: root/mpi/mpi.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2018-05-18 20:17:33 -0700
committerKaz Kylheku <kaz@kylheku.com>2018-05-18 20:17:33 -0700
commita580c45de5a825165f46d95206d9ac3c2c52fcd6 (patch)
tree849e617a4ee8730435782c3ecc8a14f1fb2594a2 /mpi/mpi.h
parentaaac04d9e0cdcdd974c065bbff3d212a5eb5cd3a (diff)
downloadtxr-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.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/mpi/mpi.h b/mpi/mpi.h
index 06adc1d4..8bd469f7 100644
--- a/mpi/mpi.h
+++ b/mpi/mpi.h
@@ -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