Skip to content

Commit

Permalink
allow fftw planner flags into the fftw.c api
Browse files Browse the repository at this point in the history
  • Loading branch information
MikaelSlevinsky committed Feb 2, 2022
1 parent 0231d68 commit d4c1f14
Show file tree
Hide file tree
Showing 9 changed files with 109 additions and 109 deletions.
2 changes: 1 addition & 1 deletion examples/additiontheorem.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ int main(void) {
printf("\n");

ft_harmonic_plan * P = ft_plan_sph2fourier(N);
ft_sphere_fftw_plan * PA = ft_plan_sph_analysis(N, M);
ft_sphere_fftw_plan * PA = ft_plan_sph_analysis(N, M, FT_FFTW_FLAGS);

ft_execute_sph_analysis('N', PA, F, N, M);
ft_execute_fourier2sph('N', P, F, N, M);
Expand Down
2 changes: 1 addition & 1 deletion examples/calculus.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ int main(void) {
P = ft_plan_tri2cheb(N, alpha, beta, gamma);
Px = ft_plan_tri2cheb(N, alpha+1.0, beta, gamma+1.0);
Py = ft_plan_tri2cheb(N, alpha, beta+1.0, gamma+1.0);
PA = ft_plan_tri_analysis(N, M);
PA = ft_plan_tri_analysis(N, M, FT_FFTW_FLAGS);

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

Expand Down
4 changes: 2 additions & 2 deletions examples/holomorphic.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ int main(void) {

double alpha = 0.0, beta = 0.0;
ft_harmonic_plan * P = ft_plan_disk2cxf(N, alpha, beta);
ft_disk_fftw_plan * PA = ft_plan_disk_analysis(N, M);
ft_disk_fftw_plan * PA = ft_plan_disk_analysis(N, M, FT_FFTW_FLAGS);

ft_execute_disk_analysis('N', PA, F, N, M);
ft_execute_cxf2disk('N', P, F, N, M);
Expand Down Expand Up @@ -142,7 +142,7 @@ int main(void) {
printf("\n");

P = ft_plan_rectdisk2cheb(N, beta);
ft_rectdisk_fftw_plan * QA = ft_plan_rectdisk_analysis(N, M);
ft_rectdisk_fftw_plan * QA = ft_plan_rectdisk_analysis(N, M, FT_FFTW_FLAGS);

ft_execute_rectdisk_analysis('N', QA, F, N, M);
ft_execute_cheb2rectdisk('N', P, F, N, M);
Expand Down
4 changes: 2 additions & 2 deletions examples/spinweighted.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ int main(void) {
printf("\n");

ft_spin_harmonic_plan * P = ft_plan_spinsph2fourier(N, 0);
ft_spinsphere_fftw_plan * PA = ft_plan_spinsph_analysis(N, M, 0);
ft_spinsphere_fftw_plan * PA = ft_plan_spinsph_analysis(N, M, 0, FT_FFTW_FLAGS);

ft_execute_spinsph_analysis('N', PA, F, N, M);
ft_execute_fourier2spinsph('N', P, F, N, M);
Expand Down Expand Up @@ -106,7 +106,7 @@ int main(void) {
ft_destroy_spinsphere_fftw_plan(PA);

P = ft_plan_spinsph2fourier(N, 1);
PA = ft_plan_spinsph_analysis(N, M, 1);
PA = ft_plan_spinsph_analysis(N, M, 1, FT_FFTW_FLAGS);

ft_execute_spinsph_analysis('N', PA, F, N, M);
ft_execute_fourier2spinsph('N', P, F, N, M);
Expand Down
40 changes: 20 additions & 20 deletions src/fasttransforms.h
Original file line number Diff line number Diff line change
Expand Up @@ -423,13 +423,13 @@ typedef struct {
/// Destroy a \ref ft_sphere_fftw_plan.
void ft_destroy_sphere_fftw_plan(ft_sphere_fftw_plan * P);

ft_sphere_fftw_plan * ft_plan_sph_with_kind(const int N, const int M, const fftw_r2r_kind kind[3][1]);
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);
/// Plan FFTW synthesis on the sphere.
ft_sphere_fftw_plan * ft_plan_sph_synthesis(const int N, const int M);
ft_sphere_fftw_plan * ft_plan_sph_synthesis(const int N, const int M, const unsigned flags);
/// Plan FFTW analysis on the sphere.
ft_sphere_fftw_plan * ft_plan_sph_analysis(const int N, const int M);
ft_sphere_fftw_plan * ft_plan_sphv_synthesis(const int N, const int M);
ft_sphere_fftw_plan * ft_plan_sphv_analysis(const int N, const int M);
ft_sphere_fftw_plan * ft_plan_sph_analysis(const int N, const int M, const unsigned flags);
ft_sphere_fftw_plan * ft_plan_sphv_synthesis(const int N, const int M, const unsigned flags);
ft_sphere_fftw_plan * ft_plan_sphv_analysis(const int N, const int M, const unsigned flags);

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

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);
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);
/// Plan FFTW synthesis on the triangle.
ft_triangle_fftw_plan * ft_plan_tri_synthesis(const int N, const int M);
ft_triangle_fftw_plan * ft_plan_tri_synthesis(const int N, const int M, const unsigned flags);
/// Plan FFTW analysis on the triangle.
ft_triangle_fftw_plan * ft_plan_tri_analysis(const int N, const int M);
ft_triangle_fftw_plan * ft_plan_tri_analysis(const int N, const int M, const unsigned flags);

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

void ft_destroy_tetrahedron_fftw_plan(ft_tetrahedron_fftw_plan * P);

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);
ft_tetrahedron_fftw_plan * ft_plan_tet_synthesis(const int N, const int L, const int M);
ft_tetrahedron_fftw_plan * ft_plan_tet_analysis(const int N, const int L, const int M);
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);
ft_tetrahedron_fftw_plan * ft_plan_tet_synthesis(const int N, const int L, const int M, const unsigned flags);
ft_tetrahedron_fftw_plan * ft_plan_tet_analysis(const int N, const int L, const int M, const unsigned flags);

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);
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);
Expand All @@ -482,11 +482,11 @@ typedef struct {
/// Destroy a \ref ft_disk_fftw_plan.
void ft_destroy_disk_fftw_plan(ft_disk_fftw_plan * P);

ft_disk_fftw_plan * ft_plan_disk_with_kind(const int N, const int M, const fftw_r2r_kind kind[3][1]);
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);
/// Plan FFTW synthesis on the disk.
ft_disk_fftw_plan * ft_plan_disk_synthesis(const int N, const int M);
ft_disk_fftw_plan * ft_plan_disk_synthesis(const int N, const int M, const unsigned flags);
/// Plan FFTW analysis on the disk.
ft_disk_fftw_plan * ft_plan_disk_analysis(const int N, const int M);
ft_disk_fftw_plan * ft_plan_disk_analysis(const int N, const int M, const unsigned flags);

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

ft_rectdisk_fftw_plan * ft_plan_rectdisk_with_kind(const int N, const int M, const fftw_r2r_kind kind[3][1]);
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);
/// Plan FFTW synthesis on the rectangularized disk.
ft_rectdisk_fftw_plan * ft_plan_rectdisk_synthesis(const int N, const int M);
ft_rectdisk_fftw_plan * ft_plan_rectdisk_synthesis(const int N, const int M, const unsigned flags);
/// Plan FFTW analysis on the rectangularized disk.
ft_rectdisk_fftw_plan * ft_plan_rectdisk_analysis(const int N, const int M);
ft_rectdisk_fftw_plan * ft_plan_rectdisk_analysis(const int N, const int M, const unsigned flags);

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

int ft_get_spin_spinsphere_fftw_plan(const ft_spinsphere_fftw_plan * P);

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);
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);
/// Plan FFTW synthesis on the sphere with spin.
ft_spinsphere_fftw_plan * ft_plan_spinsph_synthesis(const int N, const int M, const int S);
ft_spinsphere_fftw_plan * ft_plan_spinsph_synthesis(const int N, const int M, const int S, const unsigned flags);
/// Plan FFTW analysis on the sphere with spin.
ft_spinsphere_fftw_plan * ft_plan_spinsph_analysis(const int N, const int M, const int S);
ft_spinsphere_fftw_plan * ft_plan_spinsph_analysis(const int N, const int M, const int S, const unsigned flags);

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

0 comments on commit d4c1f14

Please sign in to comment.