From 89e687bba6fbe85a25cd4ef47bfb9e2e5a534077 Mon Sep 17 00:00:00 2001 From: Martin Reinecke Date: Sat, 28 Jun 2025 12:56:52 +0200 Subject: [PATCH 1/5] first demonstration --- include/finufft/finufft_core.h | 2 +- include/finufft_eitherprec.h | 2 +- makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/finufft/finufft_core.h b/include/finufft/finufft_core.h index 4d8de4283..f47b3d77f 100644 --- a/include/finufft/finufft_core.h +++ b/include/finufft/finufft_core.h @@ -25,7 +25,7 @@ #define FINUFFT_EXPORT __declspec(dllimport) #endif #else -#define FINUFFT_EXPORT +#define FINUFFT_EXPORT __attribute__((visibility("default"))) #endif /* specify calling convention (Windows only) diff --git a/include/finufft_eitherprec.h b/include/finufft_eitherprec.h index fa698cec2..2c874d82f 100644 --- a/include/finufft_eitherprec.h +++ b/include/finufft_eitherprec.h @@ -55,7 +55,7 @@ #define FINUFFT_EXPORT __declspec(dllimport) #endif #else -#define FINUFFT_EXPORT +#define FINUFFT_EXPORT __attribute__((visibility("default"))) #endif /* specify calling convention (Windows only) diff --git a/makefile b/makefile index a8ad78723..d65b6af74 100644 --- a/makefile +++ b/makefile @@ -31,7 +31,7 @@ PYTHON = python3 # they allow gcc to vectorize the code more effectively CFLAGS := -O3 -funroll-loops -march=native -fcx-limited-range -ffp-contract=fast\ -fno-math-errno -fno-signed-zeros -fno-trapping-math -fassociative-math\ - -freciprocal-math -fmerge-all-constants -ftree-vectorize $(CFLAGS) -Wfatal-errors + -freciprocal-math -fmerge-all-constants -ftree-vectorize $(CFLAGS) -Wfatal-errors -fvisibility=hidden FFLAGS := $(CFLAGS) $(FFLAGS) CXXFLAGS := $(CFLAGS) $(CXXFLAGS) # FFTW base name, and math linking... From b9f1f9868ae1f98279944392c13d2d3f72717b7a Mon Sep 17 00:00:00 2001 From: Martin Reinecke Date: Sat, 28 Jun 2025 13:09:54 +0200 Subject: [PATCH 2/5] fix --- include/finufft/finufft_core.h | 6 +++++- include/finufft_eitherprec.h | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/include/finufft/finufft_core.h b/include/finufft/finufft_core.h index f47b3d77f..680c359da 100644 --- a/include/finufft/finufft_core.h +++ b/include/finufft/finufft_core.h @@ -18,7 +18,8 @@ these defines.The main reason is that if msvc changes the way it deals with it in the future we just need to update cmake for it to work instead of having a check on the msvc version. */ -#if defined(FINUFFT_DLL) && (defined(_WIN32) || defined(__WIN32__)) +#if defined(FINUFFT_DLL) +#if (defined(_WIN32) || defined(__WIN32__)) #if defined(dll_EXPORTS) #define FINUFFT_EXPORT __declspec(dllexport) #else @@ -27,6 +28,9 @@ #else #define FINUFFT_EXPORT __attribute__((visibility("default"))) #endif +#else +#define FINUFFT_EXPORT +#endif /* specify calling convention (Windows only) The cdecl calling convention is actually not the default in all but a very diff --git a/include/finufft_eitherprec.h b/include/finufft_eitherprec.h index 2c874d82f..5a8b47257 100644 --- a/include/finufft_eitherprec.h +++ b/include/finufft_eitherprec.h @@ -48,7 +48,8 @@ these defines.The main reason is that if msvc changes the way it deals with it in the future we just need to update cmake for it to work instead of having a check on the msvc version. */ -#if defined(FINUFFT_DLL) && (defined(_WIN32) || defined(__WIN32__)) +#if defined(FINUFFT_DLL) +#if (defined(_WIN32) || defined(__WIN32__)) #if defined(dll_EXPORTS) #define FINUFFT_EXPORT __declspec(dllexport) #else @@ -57,6 +58,9 @@ #else #define FINUFFT_EXPORT __attribute__((visibility("default"))) #endif +#else +#define FINUFFT_EXPORT +#endif /* specify calling convention (Windows only) The cdecl calling convention is actually not the default in all but a very From 572ffb6ae5d20bead04ca234bf40080a3c820e30 Mon Sep 17 00:00:00 2001 From: Martin Reinecke Date: Mon, 30 Jun 2025 13:18:15 +0200 Subject: [PATCH 3/5] fix CI failures --- makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefile b/makefile index d65b6af74..38dfc3265 100644 --- a/makefile +++ b/makefile @@ -29,7 +29,7 @@ PYTHON = python3 # 3) we use simply-expanded (:=) makefile variables, otherwise confusing # 4) the extra math flags are for speed, but they do not impact accuracy; # they allow gcc to vectorize the code more effectively -CFLAGS := -O3 -funroll-loops -march=native -fcx-limited-range -ffp-contract=fast\ +CFLAGS := -DFINUFFT_DLL -O3 -funroll-loops -march=native -fcx-limited-range -ffp-contract=fast\ -fno-math-errno -fno-signed-zeros -fno-trapping-math -fassociative-math\ -freciprocal-math -fmerge-all-constants -ftree-vectorize $(CFLAGS) -Wfatal-errors -fvisibility=hidden FFLAGS := $(CFLAGS) $(FFLAGS) From 8f092e468fd3e1f44008e6942fb5e504bfa1058c Mon Sep 17 00:00:00 2001 From: Martin Reinecke Date: Mon, 30 Jun 2025 13:31:13 +0200 Subject: [PATCH 4/5] try to fix Windows CI failure --- makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/makefile b/makefile index 38dfc3265..94c2b3f8d 100644 --- a/makefile +++ b/makefile @@ -29,7 +29,7 @@ PYTHON = python3 # 3) we use simply-expanded (:=) makefile variables, otherwise confusing # 4) the extra math flags are for speed, but they do not impact accuracy; # they allow gcc to vectorize the code more effectively -CFLAGS := -DFINUFFT_DLL -O3 -funroll-loops -march=native -fcx-limited-range -ffp-contract=fast\ +CFLAGS := -O3 -funroll-loops -march=native -fcx-limited-range -ffp-contract=fast\ -fno-math-errno -fno-signed-zeros -fno-trapping-math -fassociative-math\ -freciprocal-math -fmerge-all-constants -ftree-vectorize $(CFLAGS) -Wfatal-errors -fvisibility=hidden FFLAGS := $(CFLAGS) $(FFLAGS) @@ -179,6 +179,8 @@ HEADERS = $(wildcard include/*.h include/finufft/*.h) # implicit rules for objects (note -o ensures writes to correct dir) %.o: %.cpp $(HEADERS) $(CXX) -c $(CXXFLAGS) $< -o $@ +src/%.o: src/%.cpp $(HEADERS) + $(CXX) -DFINUFFT_DLL -Ddll_EXPORTS -c $(CXXFLAGS) $< -o $@ %.o: %.c $(HEADERS) $(CC) -c $(CFLAGS) $< -o $@ %.o: %.f From 65db9a944ca713456d160b9d9a77275f07c89ba1 Mon Sep 17 00:00:00 2001 From: Martin Reinecke Date: Mon, 30 Jun 2025 13:47:02 +0200 Subject: [PATCH 5/5] fix Fortran --- fortran/finufftfort.cpp | 46 +++++++++++++++++++++++++++++++++++++++++ makefile | 2 ++ 2 files changed, 48 insertions(+) diff --git a/fortran/finufftfort.cpp b/fortran/finufftfort.cpp index 059b44c4c..de23c0376 100644 --- a/fortran/finufftfort.cpp +++ b/fortran/finufftfort.cpp @@ -32,6 +32,7 @@ extern "C" { #endif // --------------------- guru interface from fortran ------------------------ +FINUFFT_EXPORT void finufft_makeplan_(int *type, int *n_dims, i64 *n_modes, int *iflag, int *n_transf, f64 *tol, finufft_plan *plan, finufft_opts *o, int *ier) { if (!plan) @@ -45,6 +46,7 @@ void finufft_makeplan_(int *type, int *n_dims, i64 *n_modes, int *iflag, int *n_ } } +FINUFFT_EXPORT void finufft_setpts_(finufft_plan *plan, i64 *M, f64 *xj, f64 *yj, f64 *zj, i64 *nk, f64 *s, f64 *t, f64 *u, int *ier) { if (!*plan) { @@ -56,6 +58,7 @@ void finufft_setpts_(finufft_plan *plan, i64 *M, f64 *xj, f64 *yj, f64 *zj, i64 *ier = finufft_setpts(*plan, *M, xj, yj, zj, nk_safe, s, t, u); } +FINUFFT_EXPORT void finufft_execute_(finufft_plan *plan, c128 *weights, c128 *result, int *ier) { if (!plan) fprintf(stderr, "%s fortran: finufft_plan unallocated!", __func__); @@ -63,6 +66,7 @@ void finufft_execute_(finufft_plan *plan, c128 *weights, c128 *result, int *ier) *ier = finufft_execute(*plan, weights, result); } +FINUFFT_EXPORT void finufft_destroy_(finufft_plan *plan, int *ier) { if (!plan) fprintf(stderr, "%s fortran: finufft_plan unallocated!", __func__); @@ -72,6 +76,7 @@ void finufft_destroy_(finufft_plan *plan, int *ier) { // ------------ use FINUFFT to set the default options --------------------- // (Note the finufft_opts is created in f90-style derived types, not here) +FINUFFT_EXPORT void finufft_default_opts_(finufft_opts *o) { if (!o) fprintf(stderr, "%s fortran: opts must be allocated!\n", __func__); @@ -82,71 +87,85 @@ void finufft_default_opts_(finufft_opts *o) { // -------------- simple and many-vector interfaces -------------------- // --- 1D --- +FINUFFT_EXPORT void finufft1d1_(i64 *nj, f64 *xj, c128 *cj, int *iflag, f64 *eps, i64 *ms, c128 *fk, finufft_opts *o, int *ier) { *ier = finufft1d1(*nj, xj, cj, *iflag, *eps, *ms, fk, o); } +FINUFFT_EXPORT void finufft1d1many_(int *ntransf, i64 *nj, f64 *xj, c128 *cj, int *iflag, f64 *eps, i64 *ms, c128 *fk, finufft_opts *o, int *ier) { *ier = finufft1d1many(*ntransf, *nj, xj, cj, *iflag, *eps, *ms, fk, o); } +FINUFFT_EXPORT void finufft1d2_(i64 *nj, f64 *xj, c128 *cj, int *iflag, f64 *eps, i64 *ms, c128 *fk, finufft_opts *o, int *ier) { *ier = finufft1d2(*nj, xj, cj, *iflag, *eps, *ms, fk, o); } +FINUFFT_EXPORT void finufft1d2many_(int *ntransf, i64 *nj, f64 *xj, c128 *cj, int *iflag, f64 *eps, i64 *ms, c128 *fk, finufft_opts *o, int *ier) { *ier = finufft1d2many(*ntransf, *nj, xj, cj, *iflag, *eps, *ms, fk, o); } +FINUFFT_EXPORT void finufft1d3_(i64 *nj, f64 *x, c128 *c, int *iflag, f64 *eps, i64 *nk, f64 *s, c128 *f, finufft_opts *o, int *ier) { *ier = finufft1d3(*nj, x, c, *iflag, *eps, *nk, s, f, o); } +FINUFFT_EXPORT void finufft1d3many_(int *ntransf, i64 *nj, f64 *x, c128 *c, int *iflag, f64 *eps, i64 *nk, f64 *s, c128 *f, finufft_opts *o, int *ier) { *ier = finufft1d3many(*ntransf, *nj, x, c, *iflag, *eps, *nk, s, f, o); } // --- 2D --- +FINUFFT_EXPORT void finufft2d1_(i64 *nj, f64 *xj, f64 *yj, c128 *cj, int *iflag, f64 *eps, i64 *ms, i64 *mt, c128 *fk, finufft_opts *o, int *ier) { *ier = finufft2d1(*nj, xj, yj, cj, *iflag, *eps, *ms, *mt, fk, o); } +FINUFFT_EXPORT void finufft2d1many_(int *ntransf, i64 *nj, f64 *xj, f64 *yj, c128 *cj, int *iflag, f64 *eps, i64 *ms, i64 *mt, c128 *fk, finufft_opts *o, int *ier) { *ier = finufft2d1many(*ntransf, *nj, xj, yj, cj, *iflag, *eps, *ms, *mt, fk, o); } +FINUFFT_EXPORT void finufft2d2_(i64 *nj, f64 *xj, f64 *yj, c128 *cj, int *iflag, f64 *eps, i64 *ms, i64 *mt, c128 *fk, finufft_opts *o, int *ier) { *ier = finufft2d2(*nj, xj, yj, cj, *iflag, *eps, *ms, *mt, fk, o); } +FINUFFT_EXPORT void finufft2d2many_(int *ntransf, i64 *nj, f64 *xj, f64 *yj, c128 *cj, int *iflag, f64 *eps, i64 *ms, i64 *mt, c128 *fk, finufft_opts *o, int *ier) { *ier = finufft2d2many(*ntransf, *nj, xj, yj, cj, *iflag, *eps, *ms, *mt, fk, o); } +FINUFFT_EXPORT void finufft2d3_(i64 *nj, f64 *x, f64 *y, c128 *c, int *iflag, f64 *eps, i64 *nk, f64 *s, f64 *t, c128 *f, finufft_opts *o, int *ier) { *ier = finufft2d3(*nj, x, y, c, *iflag, *eps, *nk, s, t, f, o); } +FINUFFT_EXPORT void finufft2d3many_(int *ntransf, i64 *nj, f64 *x, f64 *y, c128 *c, int *iflag, f64 *eps, i64 *nk, f64 *s, f64 *t, c128 *f, finufft_opts *o, int *ier) { *ier = finufft2d3many(*ntransf, *nj, x, y, c, *iflag, *eps, *nk, s, t, f, o); } // --- 3D --- +FINUFFT_EXPORT void finufft3d1_(i64 *nj, f64 *xj, f64 *yj, f64 *zj, c128 *cj, int *iflag, f64 *eps, i64 *ms, i64 *mt, i64 *mu, c128 *fk, finufft_opts *o, int *ier) { *ier = finufft3d1(*nj, xj, yj, zj, cj, *iflag, *eps, *ms, *mt, *mu, fk, o); } +FINUFFT_EXPORT void finufft3d1many_(int *ntransf, i64 *nj, f64 *xj, f64 *yj, f64 *zj, c128 *cj, int *iflag, f64 *eps, i64 *ms, i64 *mt, i64 *mu, c128 *fk, finufft_opts *o, int *ier) { @@ -154,11 +173,13 @@ void finufft3d1many_(int *ntransf, i64 *nj, f64 *xj, f64 *yj, f64 *zj, c128 *cj, finufft3d1many(*ntransf, *nj, xj, yj, zj, cj, *iflag, *eps, *ms, *mt, *mu, fk, o); } +FINUFFT_EXPORT void finufft3d2_(i64 *nj, f64 *xj, f64 *yj, f64 *zj, c128 *cj, int *iflag, f64 *eps, i64 *ms, i64 *mt, i64 *mu, c128 *fk, finufft_opts *o, int *ier) { *ier = finufft3d2(*nj, xj, yj, zj, cj, *iflag, *eps, *ms, *mt, *mu, fk, o); } +FINUFFT_EXPORT void finufft3d2many_(int *ntransf, i64 *nj, f64 *xj, f64 *yj, f64 *zj, c128 *cj, int *iflag, f64 *eps, i64 *ms, i64 *mt, i64 *mu, c128 *fk, finufft_opts *o, int *ier) { @@ -166,11 +187,13 @@ void finufft3d2many_(int *ntransf, i64 *nj, f64 *xj, f64 *yj, f64 *zj, c128 *cj, finufft3d2many(*ntransf, *nj, xj, yj, zj, cj, *iflag, *eps, *ms, *mt, *mu, fk, o); } +FINUFFT_EXPORT void finufft3d3_(i64 *nj, f64 *x, f64 *y, f64 *z, c128 *c, int *iflag, f64 *eps, i64 *nk, f64 *s, f64 *t, f64 *u, c128 *f, finufft_opts *o, int *ier) { *ier = finufft3d3(*nj, x, y, z, c, *iflag, *eps, *nk, s, t, u, f, o); } +FINUFFT_EXPORT void finufft3d3many_(int *ntransf, i64 *nj, f64 *x, f64 *y, f64 *z, c128 *c, int *iflag, f64 *eps, i64 *nk, f64 *s, f64 *t, f64 *u, c128 *f, finufft_opts *o, int *ier) { @@ -178,6 +201,7 @@ void finufft3d3many_(int *ntransf, i64 *nj, f64 *x, f64 *y, f64 *z, c128 *c, int } // --------------------- guru interface from fortran ------------------------ +FINUFFT_EXPORT void finufftf_makeplan_(int *type, int *n_dims, i64 *n_modes, int *iflag, int *n_transf, f32 *tol, finufftf_plan *plan, finufft_opts *o, int *ier) { if (!plan) @@ -191,6 +215,7 @@ void finufftf_makeplan_(int *type, int *n_dims, i64 *n_modes, int *iflag, int *n } } +FINUFFT_EXPORT void finufftf_setpts_(finufftf_plan *plan, i64 *M, f32 *xj, f32 *yj, f32 *zj, i64 *nk, f32 *s, f32 *t, f32 *u, int *ier) { if (!*plan) { @@ -202,6 +227,7 @@ void finufftf_setpts_(finufftf_plan *plan, i64 *M, f32 *xj, f32 *yj, f32 *zj, i6 *ier = finufftf_setpts(*plan, *M, xj, yj, zj, nk_safe, s, t, u); } +FINUFFT_EXPORT void finufftf_execute_(finufftf_plan *plan, c64 *weights, c64 *result, int *ier) { if (!plan) fprintf(stderr, "%s fortran: finufft_plan unallocated!", __func__); @@ -209,6 +235,7 @@ void finufftf_execute_(finufftf_plan *plan, c64 *weights, c64 *result, int *ier) *ier = finufftf_execute(*plan, weights, result); } +FINUFFT_EXPORT void finufftf_destroy_(finufftf_plan *plan, int *ier) { if (!plan) fprintf(stderr, "%s fortran: finufft_plan unallocated!", __func__); @@ -218,6 +245,7 @@ void finufftf_destroy_(finufftf_plan *plan, int *ier) { // ------------ use FINUFFT to set the default options --------------------- // (Note the finufft_opts is created in f90-style derived types, not here) +FINUFFT_EXPORT void finufftf_default_opts_(finufft_opts *o) { if (!o) fprintf(stderr, "%s fortran: opts must be allocated!\n", __func__); @@ -228,71 +256,85 @@ void finufftf_default_opts_(finufft_opts *o) { // -------------- simple and many-vector interfaces -------------------- // --- 1D --- +FINUFFT_EXPORT void finufftf1d1_(i64 *nj, f32 *xj, c64 *cj, int *iflag, f32 *eps, i64 *ms, c64 *fk, finufft_opts *o, int *ier) { *ier = finufftf1d1(*nj, xj, cj, *iflag, *eps, *ms, fk, o); } +FINUFFT_EXPORT void finufftf1d1many_(int *ntransf, i64 *nj, f32 *xj, c64 *cj, int *iflag, f32 *eps, i64 *ms, c64 *fk, finufft_opts *o, int *ier) { *ier = finufftf1d1many(*ntransf, *nj, xj, cj, *iflag, *eps, *ms, fk, o); } +FINUFFT_EXPORT void finufftf1d2_(i64 *nj, f32 *xj, c64 *cj, int *iflag, f32 *eps, i64 *ms, c64 *fk, finufft_opts *o, int *ier) { *ier = finufftf1d2(*nj, xj, cj, *iflag, *eps, *ms, fk, o); } +FINUFFT_EXPORT void finufftf1d2many_(int *ntransf, i64 *nj, f32 *xj, c64 *cj, int *iflag, f32 *eps, i64 *ms, c64 *fk, finufft_opts *o, int *ier) { *ier = finufftf1d2many(*ntransf, *nj, xj, cj, *iflag, *eps, *ms, fk, o); } +FINUFFT_EXPORT void finufftf1d3_(i64 *nj, f32 *x, c64 *c, int *iflag, f32 *eps, i64 *nk, f32 *s, c64 *f, finufft_opts *o, int *ier) { *ier = finufftf1d3(*nj, x, c, *iflag, *eps, *nk, s, f, o); } +FINUFFT_EXPORT void finufftf1d3many_(int *ntransf, i64 *nj, f32 *x, c64 *c, int *iflag, f32 *eps, i64 *nk, f32 *s, c64 *f, finufft_opts *o, int *ier) { *ier = finufftf1d3many(*ntransf, *nj, x, c, *iflag, *eps, *nk, s, f, o); } // --- 2D --- +FINUFFT_EXPORT void finufftf2d1_(i64 *nj, f32 *xj, f32 *yj, c64 *cj, int *iflag, f32 *eps, i64 *ms, i64 *mt, c64 *fk, finufft_opts *o, int *ier) { *ier = finufftf2d1(*nj, xj, yj, cj, *iflag, *eps, *ms, *mt, fk, o); } +FINUFFT_EXPORT void finufftf2d1many_(int *ntransf, i64 *nj, f32 *xj, f32 *yj, c64 *cj, int *iflag, f32 *eps, i64 *ms, i64 *mt, c64 *fk, finufft_opts *o, int *ier) { *ier = finufftf2d1many(*ntransf, *nj, xj, yj, cj, *iflag, *eps, *ms, *mt, fk, o); } +FINUFFT_EXPORT void finufftf2d2_(i64 *nj, f32 *xj, f32 *yj, c64 *cj, int *iflag, f32 *eps, i64 *ms, i64 *mt, c64 *fk, finufft_opts *o, int *ier) { *ier = finufftf2d2(*nj, xj, yj, cj, *iflag, *eps, *ms, *mt, fk, o); } +FINUFFT_EXPORT void finufftf2d2many_(int *ntransf, i64 *nj, f32 *xj, f32 *yj, c64 *cj, int *iflag, f32 *eps, i64 *ms, i64 *mt, c64 *fk, finufft_opts *o, int *ier) { *ier = finufftf2d2many(*ntransf, *nj, xj, yj, cj, *iflag, *eps, *ms, *mt, fk, o); } +FINUFFT_EXPORT void finufftf2d3_(i64 *nj, f32 *x, f32 *y, c64 *c, int *iflag, f32 *eps, i64 *nk, f32 *s, f32 *t, c64 *f, finufft_opts *o, int *ier) { *ier = finufftf2d3(*nj, x, y, c, *iflag, *eps, *nk, s, t, f, o); } +FINUFFT_EXPORT void finufftf2d3many_(int *ntransf, i64 *nj, f32 *x, f32 *y, c64 *c, int *iflag, f32 *eps, i64 *nk, f32 *s, f32 *t, c64 *f, finufft_opts *o, int *ier) { *ier = finufftf2d3many(*ntransf, *nj, x, y, c, *iflag, *eps, *nk, s, t, f, o); } // --- 3D --- +FINUFFT_EXPORT void finufftf3d1_(i64 *nj, f32 *xj, f32 *yj, f32 *zj, c64 *cj, int *iflag, f32 *eps, i64 *ms, i64 *mt, i64 *mu, c64 *fk, finufft_opts *o, int *ier) { *ier = finufftf3d1(*nj, xj, yj, zj, cj, *iflag, *eps, *ms, *mt, *mu, fk, o); } +FINUFFT_EXPORT void finufftf3d1many_(int *ntransf, i64 *nj, f32 *xj, f32 *yj, f32 *zj, c64 *cj, int *iflag, f32 *eps, i64 *ms, i64 *mt, i64 *mu, c64 *fk, finufft_opts *o, int *ier) { @@ -300,11 +342,13 @@ void finufftf3d1many_(int *ntransf, i64 *nj, f32 *xj, f32 *yj, f32 *zj, c64 *cj, finufftf3d1many(*ntransf, *nj, xj, yj, zj, cj, *iflag, *eps, *ms, *mt, *mu, fk, o); } +FINUFFT_EXPORT void finufftf3d2_(i64 *nj, f32 *xj, f32 *yj, f32 *zj, c64 *cj, int *iflag, f32 *eps, i64 *ms, i64 *mt, i64 *mu, c64 *fk, finufft_opts *o, int *ier) { *ier = finufftf3d2(*nj, xj, yj, zj, cj, *iflag, *eps, *ms, *mt, *mu, fk, o); } +FINUFFT_EXPORT void finufftf3d2many_(int *ntransf, i64 *nj, f32 *xj, f32 *yj, f32 *zj, c64 *cj, int *iflag, f32 *eps, i64 *ms, i64 *mt, i64 *mu, c64 *fk, finufft_opts *o, int *ier) { @@ -312,11 +356,13 @@ void finufftf3d2many_(int *ntransf, i64 *nj, f32 *xj, f32 *yj, f32 *zj, c64 *cj, finufftf3d2many(*ntransf, *nj, xj, yj, zj, cj, *iflag, *eps, *ms, *mt, *mu, fk, o); } +FINUFFT_EXPORT void finufftf3d3_(i64 *nj, f32 *x, f32 *y, f32 *z, c64 *c, int *iflag, f32 *eps, i64 *nk, f32 *s, f32 *t, f32 *u, c64 *f, finufft_opts *o, int *ier) { *ier = finufftf3d3(*nj, x, y, z, c, *iflag, *eps, *nk, s, t, u, f, o); } +FINUFFT_EXPORT void finufftf3d3many_(int *ntransf, i64 *nj, f32 *x, f32 *y, f32 *z, c64 *c, int *iflag, f32 *eps, i64 *nk, f32 *s, f32 *t, f32 *u, c64 *f, finufft_opts *o, int *ier) { diff --git a/makefile b/makefile index 94c2b3f8d..dbae06e88 100644 --- a/makefile +++ b/makefile @@ -181,6 +181,8 @@ HEADERS = $(wildcard include/*.h include/finufft/*.h) $(CXX) -c $(CXXFLAGS) $< -o $@ src/%.o: src/%.cpp $(HEADERS) $(CXX) -DFINUFFT_DLL -Ddll_EXPORTS -c $(CXXFLAGS) $< -o $@ +fortran/%.o: fortran/%.cpp $(HEADERS) + $(CXX) -DFINUFFT_DLL -Ddll_EXPORTS -c $(CXXFLAGS) $< -o $@ %.o: %.c $(HEADERS) $(CC) -c $(CFLAGS) $< -o $@ %.o: %.f