Skip to content

Commit

Permalink
Remove more MPIR-related cruft
Browse files Browse the repository at this point in the history
  • Loading branch information
d-torrance committed Jun 20, 2024
1 parent bc66246 commit 172fd15
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 29 deletions.
3 changes: 1 addition & 2 deletions M2/LICENSING-NOTES
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Libraries that may be linked with M2:
-lmathicgb mathicgb GPL 2 or later
-lmemtailor memtailor the Modified BSD License
-lmpfr mpfr LGPL 3 or later
-lmpirxx -lmpir mpir LGPL 2.1 or later
-lntl ntl GPL 2 or later
-lpari pari GPL 2 or later
-lreadline readline GPL 3
Expand Down Expand Up @@ -49,4 +48,4 @@ modifications by Paul Zinn-Justin public domain

for M2 binaries:

We are prevented from using GPL 2 by mpir and mpfr
We are prevented from using GPL 2 by mpfr
2 changes: 1 addition & 1 deletion M2/Macaulay2/d/gmp.d
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ header "
";

-- We introduce two types of big gmp-type integers here. One type is mutable, and the vector of limbs gets
-- allocated with the standard memory allocator used by libgmp (or by its replacement, libmpir), when we use
-- allocated with the standard memory allocator used by libgmp when we use
-- gmp routines to create the integers. The other type is immutable, and the limbs are allocated with libgc
-- by us in final step after the computation. The types ZZmutable and ZZ are distinct in the D language, so
-- neither one can be used as the other, but the underlying pointer types are the same, except that mpz_srcptr
Expand Down
4 changes: 2 additions & 2 deletions M2/Macaulay2/e/TODO-reallocate-heap
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TO DO
1. GF (big-gf-flint): need to copy object to GC memory when we save it.
2. PointArray leak.
3. NAG memory leaks (could wait until after the merge).
4. make sure configure scripts can use built in mpir, flint.
4. make sure configure scripts can use built in flint.
5. speed of e.g. gb over QQ or ZZ.
6. make sure: all tests and example run correctly. On multiple machines.
7. gmp.d has warning message: remove those.
Expand Down Expand Up @@ -82,7 +82,7 @@ previous notes:

The plan:

1. Make it so that we can link with gmp/mpir, flint, mpfr, without modification.
1. Make it so that we can link with gmp, flint, mpfr, without modification.
This just means that when we use mpz fcns, etc that we then copy the results into gc memory, OR
that we will have that space freed by usual new/delete methods in c++.
2. Possibly allow the engine to be gc free, except for objects going to the front end.
Expand Down
3 changes: 0 additions & 3 deletions M2/include/M2/config.h.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,6 @@
/* Define to 1 if you have the ANSI C header files. */
#cmakedefine STDC_HEADERS 1

/* Whether we use MPIR (instead of GMP) */
#cmakedefine01 USING_MPIR

/* Whether we are building with tbb version >= 2021 */
#cmakedefine WITH_TBB

Expand Down
7 changes: 0 additions & 7 deletions M2/include/M2/gmp-to-mpir/README

This file was deleted.

1 change: 0 additions & 1 deletion M2/include/M2/gmp-to-mpir/gmp.h

This file was deleted.

1 change: 0 additions & 1 deletion M2/include/M2/gmp-to-mpir/gmpxx.h

This file was deleted.

12 changes: 0 additions & 12 deletions M2/include/M2/math-include.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,12 @@

#include <math.h>

#ifdef HAVE_STDINT_H
/* This prevents a problem with mpir.h and mpirxx.h, that arises when stdint.h is loaded
after mpir.h is but before mpirxx.h is. Solution: load it first. We load it
here, just before loading gmp.h, which, for us, used to be just a link to mpir.h. */
#define __STDC_LIMIT_MACROS
#include <stdint.h>
#endif

#ifdef HAVE_STDDEF_H
/* this prevents a problem in Mac OS X, where 'cstddef' is loaded before 'stddef.h', and it causes a problem */
#include <stddef.h>
#endif

#if USING_MPIR
#include <mpir.h>
#else
#include <gmp.h>
#endif

#define MPFR_USE_NO_MACRO
#include <mpfr.h>
Expand Down

0 comments on commit 172fd15

Please sign in to comment.