diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-04-22 20:10:44 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-04-22 20:10:44 -0700 |
commit | b0ebf843ce862f8448aad85e61cc1b3727745fd0 (patch) | |
tree | 47b934781729c5d2143de03eb8021521771c500f /mpi-patches/add-mp-hash | |
parent | 790cbdccac0540d2af12438fc7bccef2e17bc124 (diff) | |
download | txr-b0ebf843ce862f8448aad85e61cc1b3727745fd0.tar.gz txr-b0ebf843ce862f8448aad85e61cc1b3727745fd0.tar.bz2 txr-b0ebf843ce862f8448aad85e61cc1b3727745fd0.zip |
Switch to in-tree mpi directory.
* Makefile (CFLAGS, MPI_OBJS): Refer to mpi directory without version
number.
(repatch): Target removed.
(distclean): Don't try to remove old unpacked tarball mpi directory.
* configure (mpi_version, have_quilt, have_patch): Variables removed.
(gen_config_make): Do not generate mpi_version make variable.
Do not test for quilt or patch. No longer extract MPI tarball or
try to apply patches.
* mpi-1.8.6.tar.gz: File removed.
* mpi-patches: Directory and all files under it removed.
Diffstat (limited to 'mpi-patches/add-mp-hash')
-rw-r--r-- | mpi-patches/add-mp-hash | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/mpi-patches/add-mp-hash b/mpi-patches/add-mp-hash deleted file mode 100644 index 71123678..00000000 --- a/mpi-patches/add-mp-hash +++ /dev/null @@ -1,52 +0,0 @@ -Index: mpi-1.8.6/mpi.c -=================================================================== ---- mpi-1.8.6.orig/mpi.c 2015-02-07 19:32:43.876775527 -0800 -+++ mpi-1.8.6/mpi.c 2015-02-07 19:32:46.612726878 -0800 -@@ -1958,6 +1958,34 @@ - - /* }}} */ - -+unsigned long mp_hash(mp_int *a) -+{ -+#if SIZEOF_LONG > MP_DIGIT_SIZE -+ unsigned long hash; -+ int ix; -+ -+ if (USED(a) >= 2 * SIZEOF_LONG / MP_DIGIT_SIZE) { -+ unsigned long omega = 0; -+ unsigned long alpha = 0; -+ for (ix = 0; ix < SIZEOF_LONG / MP_DIGIT_SIZE; ix++) -+ omega = (omega << MP_DIGIT_BIT) | DIGIT(a, ix); -+ for (ix = USED(a) - SIZEOF_LONG / MP_DIGIT_SIZE; ix < USED(a); ix++) -+ alpha = (alpha << MP_DIGIT_BIT) | DIGIT(a, ix); -+ hash = alpha + omega; -+ } else { -+ hash = 0; -+ -+ for (ix = 0; ix < USED(a); ix++) -+ hash = (hash << MP_DIGIT_BIT) | DIGIT(a, ix); -+ } -+#else -+ mp_digit omega = DIGIT(a, 0); -+ mp_digit alpha = DIGIT(a, USED(a) - 1); -+ unsigned long hash = alpha + omega; -+#endif -+ return SIGN(a) == MP_NEG ? ~hash : hash; -+} -+ - /*------------------------------------------------------------------------*/ - /* {{{ Number theoretic functions */ - -Index: mpi-1.8.6/mpi.h -=================================================================== ---- mpi-1.8.6.orig/mpi.h 2015-02-07 19:32:43.876775527 -0800 -+++ mpi-1.8.6/mpi.h 2015-02-07 19:32:46.612726878 -0800 -@@ -165,6 +165,8 @@ - int mp_isodd(mp_int *a); - int mp_iseven(mp_int *a); - -+unsigned long mp_hash(mp_int *a); -+ - /*------------------------------------------------------------------------*/ - /* Number theoretic */ - |