]> www.ginac.de Git - cln.git/blob - lidia-interface/README
* Removed internal gmp/ directory and other traces of it like $GMP_INCLUDES.
[cln.git] / lidia-interface / README
1 This directory contains an interface to the LiDIA library, version 1.3.1.
2 It is already contained in LiDIA-1.3.1 and LiDIA-1.4a1, and is reproduced
3 here only as a sample for the use of CLN.
4
5 LiDIA is available from
6           ftp://ftp.informatik.th-darmstadt.de/pub/TI/systems/LiDIA
7 (The LiDIA group has also a nice Web page.)
8
9 LiDIA has an abstract interface to the underlying long integer implementation.
10 Using CLN instead of the default libI, lip or gmp has the following
11 advantages:
12
13   - Maximum speed on all CPUs, since CLN is based on the highly
14     optimized gmp-2.0.2.
15
16   - Very large integers profit from CLN's Schönhage-Strassen FFT multiplication
17     (asymptotic bit complexity: O(N log N log log N)).
18
19   - Copying integers is fast: no copying is actually involved, only a
20     reference count is manipulated.
21
22   - Small integers (absolute value < 2^29) are represented immediately,
23     thus no memory allocation/deallocation is involved when dealing with
24     small integers.
25
26 CLN does all this automatically.
27
28 INSTALLATION
29 ------------
30
31 1. Build CLN.
32
33 2. Apply the first patch to LiDIA:
34    $ cd .../LiDIA
35    $ patch -p1 < .../cln/lidia-interface/LiDIA-patch1
36
37 3. Configure LiDIA as described in its manual.
38
39 4. Apply the second patch to LiDIA:
40    $ cd .../LiDIA
41    $ patch -p1 < .../cln/lidia-interface/LiDIA-patch2
42    You may have to do this by hand, if the patch fails.
43
44 5. Make two symbolic links
45    $ ln -s .../cln/lidia-interface/interfaces/integers/cln \
46            .../LiDIA/src/interfaces/integers/cln
47    $ ln -s .../cln/BUILDDIR/src .../LiDIA/src/kernel/integers/cln
48    where .../cln/BUILDDIR is the directory in which you have built
49    cln (i.e. there is a file .../cln/BUILDDIR/src/libcln.a).
50
51 6. Modify the definitions of the variables CLN_DIR and CLN_TARGETDIR in
52    the file .../LiDIA/config/CONFIG :
53    CLN_DIR must point to .../cln,
54    CLN_TARGETDIR must point to .../cln/BUILDDIR.
55
56 7. Build LiDIA as described in its manual.
57