Skip to content

Commit d4c1f14

Browse files
allow fftw planner flags into the fftw.c api
1 parent 0231d68 commit d4c1f14

File tree

9 files changed

+109
-109
lines changed

9 files changed

+109
-109
lines changed

examples/additiontheorem.c

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

103103
ft_harmonic_plan * P = ft_plan_sph2fourier(N);
104-
ft_sphere_fftw_plan * PA = ft_plan_sph_analysis(N, M);
104+
ft_sphere_fftw_plan * PA = ft_plan_sph_analysis(N, M, FT_FFTW_FLAGS);
105105

106106
ft_execute_sph_analysis('N', PA, F, N, M);
107107
ft_execute_fourier2sph('N', P, F, N, M);

examples/calculus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ int main(void) {
5757
P = ft_plan_tri2cheb(N, alpha, beta, gamma);
5858
Px = ft_plan_tri2cheb(N, alpha+1.0, beta, gamma+1.0);
5959
Py = ft_plan_tri2cheb(N, alpha, beta+1.0, gamma+1.0);
60-
PA = ft_plan_tri_analysis(N, M);
60+
PA = ft_plan_tri_analysis(N, M, FT_FFTW_FLAGS);
6161

6262
double u[N], x[N], v[M], w[M], F[N*M], Fx[N*M], Fy[N*M], Gx[N*M], Gy[N*M];
6363

examples/holomorphic.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ int main(void) {
8686

8787
double alpha = 0.0, beta = 0.0;
8888
ft_harmonic_plan * P = ft_plan_disk2cxf(N, alpha, beta);
89-
ft_disk_fftw_plan * PA = ft_plan_disk_analysis(N, M);
89+
ft_disk_fftw_plan * PA = ft_plan_disk_analysis(N, M, FT_FFTW_FLAGS);
9090

9191
ft_execute_disk_analysis('N', PA, F, N, M);
9292
ft_execute_cxf2disk('N', P, F, N, M);
@@ -142,7 +142,7 @@ int main(void) {
142142
printf("\n");
143143

144144
P = ft_plan_rectdisk2cheb(N, beta);
145-
ft_rectdisk_fftw_plan * QA = ft_plan_rectdisk_analysis(N, M);
145+
ft_rectdisk_fftw_plan * QA = ft_plan_rectdisk_analysis(N, M, FT_FFTW_FLAGS);
146146

147147
ft_execute_rectdisk_analysis('N', QA, F, N, M);
148148
ft_execute_cheb2rectdisk('N', P, F, N, M);

examples/spinweighted.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ int main(void) {
6868
printf("\n");
6969

7070
ft_spin_harmonic_plan * P = ft_plan_spinsph2fourier(N, 0);
71-
ft_spinsphere_fftw_plan * PA = ft_plan_spinsph_analysis(N, M, 0);
71+
ft_spinsphere_fftw_plan * PA = ft_plan_spinsph_analysis(N, M, 0, FT_FFTW_FLAGS);
7272

7373
ft_execute_spinsph_analysis('N', PA, F, N, M);
7474
ft_execute_fourier2spinsph('N', P, F, N, M);
@@ -106,7 +106,7 @@ int main(void) {
106106
ft_destroy_spinsphere_fftw_plan(PA);
107107

108108
P = ft_plan_spinsph2fourier(N, 1);
109-
PA = ft_plan_spinsph_analysis(N, M, 1);
109+
PA = ft_plan_spinsph_analysis(N, M, 1, FT_FFTW_FLAGS);
110110

111111
ft_execute_spinsph_analysis('N', PA, F, N, M);
112112
ft_execute_fourier2spinsph('N', P, F, N, M);

src/fasttransforms.h

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -423,13 +423,13 @@ typedef struct {
423423
/// Destroy a \ref ft_sphere_fftw_plan.
424424
void ft_destroy_sphere_fftw_plan(ft_sphere_fftw_plan * P);
425425

426-
ft_sphere_fftw_plan * ft_plan_sph_with_kind(const int N, const int M, const fftw_r2r_kind kind[3][1]);
426+
ft_sphere_fftw_plan * ft_plan_sph_with_kind(const int N, const int M, const fftw_r2r_kind kind[3][1], const unsigned flags);
427427
/// Plan FFTW synthesis on the sphere.
428-
ft_sphere_fftw_plan * ft_plan_sph_synthesis(const int N, const int M);
428+
ft_sphere_fftw_plan * ft_plan_sph_synthesis(const int N, const int M, const unsigned flags);
429429
/// Plan FFTW analysis on the sphere.
430-
ft_sphere_fftw_plan * ft_plan_sph_analysis(const int N, const int M);
431-
ft_sphere_fftw_plan * ft_plan_sphv_synthesis(const int N, const int M);
432-
ft_sphere_fftw_plan * ft_plan_sphv_analysis(const int N, const int M);
430+
ft_sphere_fftw_plan * ft_plan_sph_analysis(const int N, const int M, const unsigned flags);
431+
ft_sphere_fftw_plan * ft_plan_sphv_synthesis(const int N, const int M, const unsigned flags);
432+
ft_sphere_fftw_plan * ft_plan_sphv_analysis(const int N, const int M, const unsigned flags);
433433

434434
/// Execute FFTW synthesis on the sphere.
435435
void ft_execute_sph_synthesis(const char TRANS, const ft_sphere_fftw_plan * P, double * X, const int N, const int M);
@@ -446,11 +446,11 @@ typedef struct {
446446
/// Destroy a \ref ft_triangle_fftw_plan.
447447
void ft_destroy_triangle_fftw_plan(ft_triangle_fftw_plan * P);
448448

449-
ft_triangle_fftw_plan * ft_plan_tri_with_kind(const int N, const int M, const fftw_r2r_kind kind0, const fftw_r2r_kind kind1);
449+
ft_triangle_fftw_plan * ft_plan_tri_with_kind(const int N, const int M, const fftw_r2r_kind kind0, const fftw_r2r_kind kind1, const unsigned flags);
450450
/// Plan FFTW synthesis on the triangle.
451-
ft_triangle_fftw_plan * ft_plan_tri_synthesis(const int N, const int M);
451+
ft_triangle_fftw_plan * ft_plan_tri_synthesis(const int N, const int M, const unsigned flags);
452452
/// Plan FFTW analysis on the triangle.
453-
ft_triangle_fftw_plan * ft_plan_tri_analysis(const int N, const int M);
453+
ft_triangle_fftw_plan * ft_plan_tri_analysis(const int N, const int M, const unsigned flags);
454454

455455
/// Execute FFTW synthesis on the triangle.
456456
void ft_execute_tri_synthesis(const char TRANS, const ft_triangle_fftw_plan * P, double * X, const int N, const int M);
@@ -463,9 +463,9 @@ typedef struct {
463463

464464
void ft_destroy_tetrahedron_fftw_plan(ft_tetrahedron_fftw_plan * P);
465465

466-
ft_tetrahedron_fftw_plan * ft_plan_tet_with_kind(const int N, const int L, const int M, const fftw_r2r_kind kind0, const fftw_r2r_kind kind1, const fftw_r2r_kind kind2);
467-
ft_tetrahedron_fftw_plan * ft_plan_tet_synthesis(const int N, const int L, const int M);
468-
ft_tetrahedron_fftw_plan * ft_plan_tet_analysis(const int N, const int L, const int M);
466+
ft_tetrahedron_fftw_plan * ft_plan_tet_with_kind(const int N, const int L, const int M, const fftw_r2r_kind kind0, const fftw_r2r_kind kind1, const fftw_r2r_kind kind2, const unsigned flags);
467+
ft_tetrahedron_fftw_plan * ft_plan_tet_synthesis(const int N, const int L, const int M, const unsigned flags);
468+
ft_tetrahedron_fftw_plan * ft_plan_tet_analysis(const int N, const int L, const int M, const unsigned flags);
469469

470470
void ft_execute_tet_synthesis(const char TRANS, const ft_tetrahedron_fftw_plan * P, double * X, const int N, const int L, const int M);
471471
void ft_execute_tet_analysis(const char TRANS, const ft_tetrahedron_fftw_plan * P, double * X, const int N, const int L, const int M);
@@ -482,11 +482,11 @@ typedef struct {
482482
/// Destroy a \ref ft_disk_fftw_plan.
483483
void ft_destroy_disk_fftw_plan(ft_disk_fftw_plan * P);
484484

485-
ft_disk_fftw_plan * ft_plan_disk_with_kind(const int N, const int M, const fftw_r2r_kind kind[3][1]);
485+
ft_disk_fftw_plan * ft_plan_disk_with_kind(const int N, const int M, const fftw_r2r_kind kind[3][1], const unsigned flags);
486486
/// Plan FFTW synthesis on the disk.
487-
ft_disk_fftw_plan * ft_plan_disk_synthesis(const int N, const int M);
487+
ft_disk_fftw_plan * ft_plan_disk_synthesis(const int N, const int M, const unsigned flags);
488488
/// Plan FFTW analysis on the disk.
489-
ft_disk_fftw_plan * ft_plan_disk_analysis(const int N, const int M);
489+
ft_disk_fftw_plan * ft_plan_disk_analysis(const int N, const int M, const unsigned flags);
490490

491491
/// Execute FFTW synthesis on the disk.
492492
void ft_execute_disk_synthesis(const char TRANS, const ft_disk_fftw_plan * P, double * X, const int N, const int M);
@@ -502,11 +502,11 @@ typedef struct {
502502
/// Destroy a \ref ft_rectdisk_fftw_plan.
503503
void ft_destroy_rectdisk_fftw_plan(ft_rectdisk_fftw_plan * P);
504504

505-
ft_rectdisk_fftw_plan * ft_plan_rectdisk_with_kind(const int N, const int M, const fftw_r2r_kind kind[3][1]);
505+
ft_rectdisk_fftw_plan * ft_plan_rectdisk_with_kind(const int N, const int M, const fftw_r2r_kind kind[3][1], const unsigned flags);
506506
/// Plan FFTW synthesis on the rectangularized disk.
507-
ft_rectdisk_fftw_plan * ft_plan_rectdisk_synthesis(const int N, const int M);
507+
ft_rectdisk_fftw_plan * ft_plan_rectdisk_synthesis(const int N, const int M, const unsigned flags);
508508
/// Plan FFTW analysis on the rectangularized disk.
509-
ft_rectdisk_fftw_plan * ft_plan_rectdisk_analysis(const int N, const int M);
509+
ft_rectdisk_fftw_plan * ft_plan_rectdisk_analysis(const int N, const int M, const unsigned flags);
510510

511511
/// Execute FFTW synthesis on the rectangularized disk.
512512
void ft_execute_rectdisk_synthesis(const char TRANS, const ft_rectdisk_fftw_plan * P, double * X, const int N, const int M);
@@ -528,11 +528,11 @@ void ft_destroy_spinsphere_fftw_plan(ft_spinsphere_fftw_plan * P);
528528

529529
int ft_get_spin_spinsphere_fftw_plan(const ft_spinsphere_fftw_plan * P);
530530

531-
ft_spinsphere_fftw_plan * ft_plan_spinsph_with_kind(const int N, const int M, const int S, const fftw_r2r_kind kind[2][1], const int sign);
531+
ft_spinsphere_fftw_plan * ft_plan_spinsph_with_kind(const int N, const int M, const int S, const fftw_r2r_kind kind[2][1], const int sign, const unsigned flags);
532532
/// Plan FFTW synthesis on the sphere with spin.
533-
ft_spinsphere_fftw_plan * ft_plan_spinsph_synthesis(const int N, const int M, const int S);
533+
ft_spinsphere_fftw_plan * ft_plan_spinsph_synthesis(const int N, const int M, const int S, const unsigned flags);
534534
/// Plan FFTW analysis on the sphere with spin.
535-
ft_spinsphere_fftw_plan * ft_plan_spinsph_analysis(const int N, const int M, const int S);
535+
ft_spinsphere_fftw_plan * ft_plan_spinsph_analysis(const int N, const int M, const int S, const unsigned flags);
536536

537537
/// Execute FFTW synthesis on the sphere with spin.
538538
void ft_execute_spinsph_synthesis(const char TRANS, const ft_spinsphere_fftw_plan * P, ft_complex * X, const int N, const int M);

0 commit comments

Comments
 (0)