1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
|
===============================================================================
zn_poly: a library for polynomial arithmetic (version 0.8)
Copyright (C) 2007, 2008, David Harvey
See the file COPYING for copyright and licensing information.
===============================================================================
Installation instructions
-------------------------
(1) Unpack the tarball somewhere.
(2) From the tarball directory, run the configure script, i.e.
./configure <options>
This creates a makefile. Python must be available for this to work. The
configure script doesn't do anything intelligent (like examine your system);
it just writes the makefile based on the supplied options.
Available options are the following:
--cflags=<flags>
Flags passed to gcc. Default is "-O2". You might need "-O2 -m64".
--ldflags=<flags>
Flags passed to linker. You might need "-m64", especially on some macs.
--prefix=<path>
Where to put zn_poly header and library files. Default is "/usr/local".
The header file is stored at <path>/include. The library is stored at
<path>/lib.
--gmp-prefix=<path>
Location of GMP include/library files (assumed to be under
<path>/include and <path>/lib). Default is "/usr/local".
--ntl-prefix=<path>
Location of NTL include/library files (assumed to be under
<path>/include and <path>/lib). This is only necessary if
you want to build the profiling targets with NTL profiling support.
Default is "/usr/local".
--use-flint
Use the FLINT library instead of GMP for large integer multiplication.
--flint-prefix=<path>
Location of FLINT include/library files (assumed to be under
<path>/include and <path>/lib). Default is "/usr/local".
(3) (optional) Run "make tune" and then "./tune > tuning.c". This determines
optimal tuning values on your platform and overwrites the tuning.c
source file with the new values.
This only works on platforms where cycle counter code is available
(currently x86 and powerpc). If you don't run "make tune", you'll just
get some default tuning values that work well on my development machine.
(4) Run "make" to build the library.
(5) Run "make install". This copies the library and include files to
the requested destination directory.
(6) (optional) Step (5) only installs the static version of the library.
The makefile also has targets "libzn_poly.dylib" and "libzn_poly.so"
for darwin and linux shared libraries.
===============================================================================
Other makefile targets
----------------------
make bernoulli
An example program for computing bernoulli numbers mod p.
make clean
Remove all temporary files.
make check
[NOT IMPLEMENTED YET] This will run some quick tests to make sure that
everything appears to be working.
make test
Builds a test program called "test". Running "test all" runs the whole
zn_poly test suite, which tests zn_poly much more thoroughly than
"make check".
make mul-profile
A program for profiling various polynomial multiplication algorithms over
various modulus sizes and polynomial lengths.
make mul-profile-ntl
As above, but also includes support for profiling NTL's multiplication.
make invert-profile
make invert-profile-ntl
A program for profiling series inversion.
make negamul-profile
A program for profiling various negacyclic multiplication algorithms.
make midmul-profile
A program for profiling various middle product algorithms.
make array-profile
A program for profiling linear-time array functions, including butterfly
routines used in the FFT multiplication routines, GMP's mpn_add and mpn_sub,
and others.
===============================================================================
|