Skip to content

Commit

Permalink
add const char TRANS to remaining fftw transforms
Browse files Browse the repository at this point in the history
  • Loading branch information
MikaelSlevinsky committed Feb 10, 2021
1 parent 081adf2 commit ecababf
Show file tree
Hide file tree
Showing 6 changed files with 383 additions and 191 deletions.
6 changes: 3 additions & 3 deletions examples/calculus.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ int main(void) {
printmat("F", FMT, F, N, M);
printf("\n");

ft_execute_tri_analysis(PA, F, N, M);
ft_execute_tri_analysis('N', PA, F, N, M);
ft_execute_cheb2tri('N', P, F, N, M);

printf("Its Proriol-"MAGENTA("(α,β,γ)")" coefficients are:\n\n");
Expand Down Expand Up @@ -114,7 +114,7 @@ int main(void) {
printf("to "MAGENTA("y")", the analogous formulae result in a Proriol-"MAGENTA("(α,β+1,γ+1)")" series.\n");
printf("These expressions are adapted from "CYAN("https://doi.org/10.1137/19M1245888")"\n");

ft_execute_tri_analysis(PA, Fx, N, M);
ft_execute_tri_analysis('N', PA, Fx, N, M);
ft_execute_cheb2tri('N', Px, Fx, N, M);

printmat("Ux from sampling", FMT, Fx, N, M);
Expand All @@ -137,7 +137,7 @@ int main(void) {
printmat("Ux from U", FMT, Gx, N, M);
printf("\n");

ft_execute_tri_analysis(PA, Fy, N, M);
ft_execute_tri_analysis('N', PA, Fy, N, M);
ft_execute_cheb2tri('N', Py, Fy, N, M);

printmat("Uy from sampling", FMT, Fy, 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 @@ -88,7 +88,7 @@ int main(void) {
ft_harmonic_plan * P = ft_plan_disk2cxf(N, alpha, beta);
ft_disk_fftw_plan * PA = ft_plan_disk_analysis(N, M);

ft_execute_disk_analysis(PA, F, N, M);
ft_execute_disk_analysis('N', PA, F, N, M);
ft_execute_cxf2disk('N', P, F, N, M);

printf("Its Zernike coefficients are:\n\n");
Expand Down Expand Up @@ -144,7 +144,7 @@ int main(void) {
P = ft_plan_rectdisk2cheb(N, beta);
ft_rectdisk_fftw_plan * QA = ft_plan_rectdisk_analysis(N, M);

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

printf("Its Dunkl-Xu coefficients are:\n\n");
Expand Down
4 changes: 2 additions & 2 deletions examples/spinweighted.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ int main(void) {
ft_spin_harmonic_plan * P = ft_plan_spinsph2fourier(N, 0);
ft_spinsphere_fftw_plan * PA = ft_plan_spinsph_analysis(N, M, 0);

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

printf("Its spin-0 spherical harmonic coefficients are:\n\n");
Expand Down Expand Up @@ -108,7 +108,7 @@ int main(void) {
P = ft_plan_spinsph2fourier(N, 1);
PA = ft_plan_spinsph_analysis(N, M, 1);

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

printmat("U¹sampling", FMT, (double *) F, 2*N, M);
Expand Down
22 changes: 12 additions & 10 deletions src/fasttransforms.h
Original file line number Diff line number Diff line change
Expand Up @@ -453,9 +453,9 @@ ft_triangle_fftw_plan * ft_plan_tri_synthesis(const int N, const int M);
ft_triangle_fftw_plan * ft_plan_tri_analysis(const int N, const int M);

/// Execute FFTW synthesis on the triangle.
void ft_execute_tri_synthesis(const ft_triangle_fftw_plan * P, double * X, const int N, const int M);
void ft_execute_tri_synthesis(const char TRANS, const ft_triangle_fftw_plan * P, double * X, const int N, const int M);
/// Execute FFTW analysis on the triangle.
void ft_execute_tri_analysis(const ft_triangle_fftw_plan * P, double * X, const int N, const int M);
void ft_execute_tri_analysis(const char TRANS, const ft_triangle_fftw_plan * P, double * X, const int N, const int M);

typedef struct {
fftw_plan planxyz;
Expand All @@ -467,8 +467,8 @@ ft_tetrahedron_fftw_plan * ft_plan_tet_with_kind(const int N, const int L, const
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);

void ft_execute_tet_synthesis(const ft_tetrahedron_fftw_plan * P, double * X, const int N, const int L, const int M);
void ft_execute_tet_analysis(const ft_tetrahedron_fftw_plan * P, double * X, const int N, const int L, const int M);
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);

typedef struct {
fftw_plan planr1;
Expand All @@ -489,9 +489,9 @@ ft_disk_fftw_plan * ft_plan_disk_synthesis(const int N, const int M);
ft_disk_fftw_plan * ft_plan_disk_analysis(const int N, const int M);

/// Execute FFTW synthesis on the disk.
void ft_execute_disk_synthesis(const ft_disk_fftw_plan * P, double * X, const int N, const int M);
void ft_execute_disk_synthesis(const char TRANS, const ft_disk_fftw_plan * P, double * X, const int N, const int M);
/// Execute FFTW analysis on the disk.
void ft_execute_disk_analysis(const ft_disk_fftw_plan * P, double * X, const int N, const int M);
void ft_execute_disk_analysis(const char TRANS, const ft_disk_fftw_plan * P, double * X, const int N, const int M);

typedef struct {
fftw_plan planx1;
Expand All @@ -509,9 +509,9 @@ ft_rectdisk_fftw_plan * ft_plan_rectdisk_synthesis(const int N, const int M);
ft_rectdisk_fftw_plan * ft_plan_rectdisk_analysis(const int N, const int M);

/// Execute FFTW synthesis on the rectangularized disk.
void ft_execute_rectdisk_synthesis(const ft_rectdisk_fftw_plan * P, double * X, const int N, const int M);
void ft_execute_rectdisk_synthesis(const char TRANS, const ft_rectdisk_fftw_plan * P, double * X, const int N, const int M);
/// Execute FFTW analysis on the rectangularized disk.
void ft_execute_rectdisk_analysis(const ft_rectdisk_fftw_plan * P, double * X, const int N, const int M);
void ft_execute_rectdisk_analysis(const char TRANS, const ft_rectdisk_fftw_plan * P, double * X, const int N, const int M);

typedef struct {
fftw_plan plantheta1;
Expand All @@ -526,16 +526,18 @@ typedef struct {
/// Destroy a \ref ft_spinsphere_fftw_plan.
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);
/// 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);
/// 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);

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

typedef struct {
ft_banded ** B;
Expand Down
Loading

0 comments on commit ecababf

Please sign in to comment.