Skip to content

Commit 9ee8818

Browse files
Merge pull request #37 from MikaelSlevinsky/feat-adc
Feat tdc
2 parents bf13772 + 8106320 commit 9ee8818

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+9407
-757
lines changed

.appveyor.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,38 @@ install:
99
- set PATH=%PATH%;c:\tools\vcpkg
1010
- set PATH=%PATH%;C:\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\bin\
1111
- set CC=gcc && set BLAS=OPENBLAS
12-
- vcpkg install openblas:x64-windows fftw3:x64-windows
12+
- vcpkg install openblas:x64-windows fftw3:x64-windows mpir:x64-windows mpfr:x64-windows
1313
- mklink c:\projects\fasttransforms\src\cblas.h c:\tools\vcpkg\installed\x64-windows\include\openblas\cblas.h
1414
- mklink c:\projects\fasttransforms\src\openblas_config.h c:\tools\vcpkg\installed\x64-windows\include\openblas\openblas_config.h
1515
- mklink c:\projects\fasttransforms\blas.dll c:\tools\vcpkg\installed\x64-windows\bin\openblas.dll
1616
- mklink c:\projects\fasttransforms\src\fftw3.h c:\tools\vcpkg\installed\x64-windows\include\fftw3.h
1717
- mklink c:\projects\fasttransforms\fftw3.dll c:\tools\vcpkg\installed\x64-windows\bin\fftw3.dll
18+
- mklink c:\projects\fasttransforms\src\mpfr.h c:\tools\vcpkg\installed\x64-windows\include\mpfr.h
19+
- mklink c:\projects\fasttransforms\src\gmp.h c:\tools\vcpkg\installed\x64-windows\include\gmp.h
20+
- mklink c:\projects\fasttransforms\src\mpir.h c:\tools\vcpkg\installed\x64-windows\include\mpir.h
21+
- mklink c:\projects\fasttransforms\mpir.dll c:\tools\vcpkg\installed\x64-windows\bin\mpir.dll
22+
- mklink c:\projects\fasttransforms\mpfr.dll c:\tools\vcpkg\installed\x64-windows\bin\mpfr.dll
1823
- set PATH=c:\tools\vcpkg\installed\x64-windows\bin;%PATH%
1924

25+
matrix:
26+
allow_failures:
27+
- image: Visual Studio 2015
28+
2029
build_script:
2130
- gcc --version
2231
- mingw32-make lib
2332
- mingw32-make wintests
2433
- mingw32-make examples
2534

2635
test_script:
36+
- set OMP_NUM_THREADS=4
2737
- test_transforms.exe
2838
- test_rotations.exe
29-
- set OMP_NUM_THREADS=4
39+
- test_tridiagonal.exe
40+
- test_hierarchical.exe
41+
- test_banded.exe
42+
- test_dprk.exe
43+
- test_tdc.exe
3044
- test_drivers.exe 3 3 0
3145
- additiontheorem.exe
3246
- calculus.exe

.gitattributes

Lines changed: 0 additions & 2 deletions
This file was deleted.

.travis.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,27 @@ matrix:
66
- os: osx
77
osx_image: xcode10
88
compiler: gcc-4.9
9-
env: MATRIX_EVAL="brew update && brew install gcc@4.9 fftw doxygen && export CC=gcc-4.9 && export BLAS=APPLEBLAS"
9+
env: MATRIX_EVAL="brew update && brew install gcc@4.9 fftw mpfr doxygen && export CC=gcc-4.9 && export BLAS=APPLEBLAS"
1010
# Recommended system requirements
1111
- os: osx
1212
osx_image: xcode10
1313
compiler: gcc-7
14-
env: MATRIX_EVAL="brew update && brew install gcc@7 fftw doxygen && export CC=gcc-7 && export BLAS=APPLEBLAS"
14+
env: MATRIX_EVAL="brew update && brew install gcc@7 fftw mpfr doxygen && export CC=gcc-7 && export BLAS=APPLEBLAS"
1515
# Minimum system requirements
1616
- os: linux
1717
compiler: gcc-4.9
1818
addons:
1919
apt:
2020
sources: ubuntu-toolchain-r-test
21-
packages: ['gcc-4.9', 'libblas-dev', 'libopenblas-base', 'libfftw3-dev', 'doxygen']
21+
packages: ['gcc-4.9', 'libblas-dev', 'libopenblas-base', 'libfftw3-dev', 'libmpfr-dev', 'doxygen']
2222
env: MATRIX_EVAL="export CC=gcc-4.9 && export BLAS=OPENBLAS && export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:."
2323
# Recommended system requirements
2424
- os: linux
2525
compiler: gcc-7
2626
addons:
2727
apt:
2828
sources: ubuntu-toolchain-r-test
29-
packages: ['gcc-7', 'libblas-dev', 'libopenblas-base', 'libfftw3-dev', 'doxygen']
29+
packages: ['gcc-7', 'libblas-dev', 'libopenblas-base', 'libfftw3-dev', 'libmpfr-dev', 'doxygen']
3030
env: MATRIX_EVAL="export CC=gcc-7 && export BLAS=OPENBLAS && export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:."
3131

3232
before_install: eval "${MATRIX_EVAL}"
@@ -36,6 +36,11 @@ script:
3636
- make tests
3737
- ./test_transforms
3838
- ./test_rotations
39+
- ./test_tridiagonal
40+
- ./test_hierarchical
41+
- ./test_banded
42+
- ./test_dprk
43+
- ./test_tdc
3944
- OMP_NUM_THREADS=4 ./test_drivers 3 3 0
4045
- OMP_NUM_THREADS=4 ./test_fftw 3 3 0
4146
- make examples

Make.inc

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
LIB = fasttransforms
22
LIBDIR = .
3-
LIBFLAGS = -shared -lm -fPIC -fopenmp
3+
LIBFLAGS = -shared -lm -fPIC
44

55
ifeq ($(OS), Windows_NT)
66
UNAME := Windows
@@ -14,7 +14,7 @@ else
1414
endif
1515
endif
1616

17-
OBJ = src/transforms.c src/rotations.c src/permute.c src/drivers.c src/fftw.c
17+
OBJ = src/transforms.c src/rotations.c src/permute.c src/tdc.c src/drivers.c src/fftw.c
1818

1919
#CC = gcc-8
2020
#CC = /usr/local/opt/llvm/bin/clang
@@ -24,7 +24,7 @@ OBJ = src/transforms.c src/rotations.c src/permute.c src/drivers.c src/fftw.c
2424

2525
#AVX512 = -mavx512f
2626

27-
CFLAGS = -std=gnu99 -Ofast $(AVX512) -march=native -mtune=native -I./src
27+
CFLAGS = -std=gnu99 -Ofast $(AVX512) -march=native -mtune=native -mno-vzeroupper -I./src
2828

2929
ifeq ($(CC),/usr/local/opt/llvm/bin/clang)
3030
CFLAGS += -I/usr/local/opt/llvm/include
@@ -49,9 +49,11 @@ ifeq ($(UNAME), Windows)
4949
LDFLAGS += -L.
5050
endif
5151

52-
LDLIBS += -lm -lblas -lfftw3
52+
LDLIBS += -lm -lquadmath -lmpfr -fopenmp -lblas -lfftw3
5353
ifeq ($(UNAME), Linux)
54-
LDLIBS += -lfftw3_threads
54+
LDLIBS += -lfftw3_threads -lgmp
5555
else ifeq ($(UNAME), Darwin)
56-
LDLIBS += -lfftw3_threads
56+
LDLIBS += -lfftw3_threads -lgmp
57+
else ifeq ($(OS), Windows_NT)
58+
LDLIBS += -lmpir
5759
endif

Makefile

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,23 @@ tests:
2222
$(CC) src/ftutilities.c test/test_transforms.c $(CFLAGS) -L$(LIBDIR) -l$(LIB) $(LDFLAGS) $(LDLIBS) -o test_transforms
2323
$(CC) src/ftutilities.c test/test_permute.c $(CFLAGS) -L$(LIBDIR) -l$(LIB) $(LDFLAGS) $(LDLIBS) -o test_permute
2424
$(CC) src/ftutilities.c test/test_rotations.c $(CFLAGS) -L$(LIBDIR) -l$(LIB) $(LDFLAGS) $(LDLIBS) -o test_rotations
25+
$(CC) src/ftutilities.c test/test_tridiagonal.c $(CFLAGS) -L$(LIBDIR) -l$(LIB) $(LDFLAGS) $(LDLIBS) -o test_tridiagonal
26+
$(CC) src/ftutilities.c test/test_hierarchical.c $(CFLAGS) -L$(LIBDIR) -l$(LIB) $(LDFLAGS) $(LDLIBS) -o test_hierarchical
27+
$(CC) src/ftutilities.c test/test_banded.c $(CFLAGS) -L$(LIBDIR) -l$(LIB) $(LDFLAGS) $(LDLIBS) -o test_banded
28+
$(CC) src/ftutilities.c test/test_dprk.c $(CFLAGS) -L$(LIBDIR) -l$(LIB) $(LDFLAGS) $(LDLIBS) -o test_dprk
29+
$(CC) src/ftutilities.c test/test_tdc.c $(CFLAGS) -L$(LIBDIR) -l$(LIB) $(LDFLAGS) $(LDLIBS) -o test_tdc
2530
$(CC) src/ftutilities.c test/test_drivers.c $(CFLAGS) -L$(LIBDIR) -l$(LIB) $(LDFLAGS) $(LDLIBS) -o test_drivers
2631
$(CC) src/ftutilities.c test/test_fftw.c $(CFLAGS) -L$(LIBDIR) -l$(LIB) $(LDFLAGS) $(LDLIBS) -o test_fftw
2732

2833
wintests:
2934
$(CC) src/ftutilities.c test/test_transforms.c $(CFLAGS) -L$(LIBDIR) -l$(LIB) $(LDFLAGS) $(LDLIBS) -o test_transforms
3035
$(CC) src/ftutilities.c test/test_permute.c $(CFLAGS) -L$(LIBDIR) -l$(LIB) $(LDFLAGS) $(LDLIBS) -o test_permute
3136
$(CC) src/ftutilities.c test/test_rotations.c $(CFLAGS) -L$(LIBDIR) -l$(LIB) $(LDFLAGS) $(LDLIBS) -o test_rotations
37+
$(CC) src/ftutilities.c test/test_tridiagonal.c $(CFLAGS) -L$(LIBDIR) -l$(LIB) $(LDFLAGS) $(LDLIBS) -o test_tridiagonal
38+
$(CC) src/ftutilities.c test/test_hierarchical.c $(CFLAGS) -L$(LIBDIR) -l$(LIB) $(LDFLAGS) $(LDLIBS) -o test_hierarchical
39+
$(CC) src/ftutilities.c test/test_banded.c $(CFLAGS) -L$(LIBDIR) -l$(LIB) $(LDFLAGS) $(LDLIBS) -o test_banded
40+
$(CC) src/ftutilities.c test/test_dprk.c $(CFLAGS) -L$(LIBDIR) -l$(LIB) $(LDFLAGS) $(LDLIBS) -o test_dprk
41+
$(CC) src/ftutilities.c test/test_tdc.c $(CFLAGS) -L$(LIBDIR) -l$(LIB) $(LDFLAGS) $(LDLIBS) -o test_tdc
3242
$(CC) src/ftutilities.c test/test_drivers.c $(CFLAGS) -L$(LIBDIR) -l$(LIB) $(LDFLAGS) $(LDLIBS) -o test_drivers
3343

3444
examples:
@@ -38,13 +48,9 @@ examples:
3848

3949
clean:
4050
rm -f lib$(LIB).$(SLIB)
41-
rm -f test_assembly.s
4251
rm -f additiontheorem
52+
rm -f calculus
4353
rm -f holomorphic
44-
rm -f test_transforms
45-
rm -f test_permute
46-
rm -f test_rotations
47-
rm -f test_drivers
48-
rm -f test_fftw
54+
rm -f test_*
4955

5056
.PHONY: all lib assembly examples tests clean

examples/calculus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ int main(void) {
155155
printf("\n");
156156

157157
printf("The 2-norm relative error in differentiating the Proriol series\n");
158-
printf("for "MAGENTA("f(x,y)")" term-by-term and its sampled gradient is %4.2e.\n", sqrt(pow(norm_2arg(Fx, Gx, N*M), 2) + pow(norm_2arg(Fy, Gy, N*M), 2))/sqrt(pow(norm_1arg(Fx, N*M), 2) + pow(norm_1arg(Fy, N*M), 2)));
158+
printf("for "MAGENTA("f(x,y)")" term-by-term and its sampled gradient is %4.2e.\n", sqrt(pow(ft_norm_2arg(Fx, Gx, N*M), 2) + pow(ft_norm_2arg(Fy, Gy, N*M), 2))/sqrt(pow(ft_norm_1arg(Fx, N*M), 2) + pow(ft_norm_1arg(Fy, N*M), 2)));
159159
printf("This error can be improved upon by increasing "MAGENTA("N")" and "MAGENTA("M")".\n");
160160

161161
ft_destroy_harmonic_plan(P);

examples/holomorphic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ int main(void) {
8181
printf(".\n\n");
8282
printf("Using an orthonormal basis, the integral of "MAGENTA("[f(x,y)]^2")" over the\n");
8383
printf("disk is approximately the square of the 2-norm of the coefficients, ");
84-
printf(FMT, pow(norm_1arg(F, N*M), 2));
84+
printf(FMT, pow(ft_norm_1arg(F, N*M), 2));
8585
printf(".\n");
8686

8787
ft_destroy_harmonic_plan(P);

0 commit comments

Comments
 (0)