5#ifndef FASTTRANSFORMS_H
6#define FASTTRANSFORMS_H
11typedef double ft_complex[2];
15 #define FT_GET_THREAD_NUM() omp_get_thread_num()
16 #define FT_GET_NUM_THREADS() omp_get_num_threads()
17 #define FT_GET_MAX_THREADS() omp_get_max_threads()
18 #define FT_SET_NUM_THREADS(x) omp_set_num_threads(x)
20 #define FT_GET_THREAD_NUM() 0
21 #define FT_GET_NUM_THREADS() 1
22 #define FT_GET_MAX_THREADS() 1
23 #define FT_SET_NUM_THREADS(x)
26#define FT_CONCAT(prefix, name, suffix) prefix ## name ## suffix
28void ft_horner(
const int n,
const double * c,
const int incc,
const int m,
double * x,
double * f);
29void ft_hornerf(
const int n,
const float * c,
const int incc,
const int m,
float * x,
float * f);
31void ft_clenshaw(
const int n,
const double * c,
const int incc,
const int m,
double * x,
double * f);
32void ft_clenshawf(
const int n,
const float * c,
const int incc,
const int m,
float * x,
float * f);
34void ft_orthogonal_polynomial_clenshaw(
const int n,
const double * c,
const int incc,
const double * A,
const double * B,
const double * C,
const int m,
double * x,
double * phi0,
double * f);
35void ft_orthogonal_polynomial_clenshawf(
const int n,
const float * c,
const int incc,
const float * A,
const float * B,
const float * C,
const int m,
float * x,
float * phi0,
float * f);
37void ft_eigen_eval(
const int n,
const double * c,
const int incc,
const double * A,
const double * B,
const double * C,
const int m,
double * x,
const int sign,
double * f);
38void ft_eigen_evalf(
const int n,
const float * c,
const int incc,
const float * A,
const float * B,
const float * C,
const int m,
float * x,
const int sign,
float * f);
39void ft_eigen_evall(
const int n,
const long double * c,
const int incc,
const long double * A,
const long double * B,
const long double * C,
const int m,
long double * x,
const int sign,
long double * f);
40#if defined(FT_QUADMATH)
42 typedef __float128 quadruple;
43 void ft_eigen_evalq(
const int n,
const quadruple * c,
const int incc,
const quadruple * A,
const quadruple * B,
const quadruple * C,
const int m, quadruple * x,
const int sign, quadruple * f);
46#define FT_SN (1U << 0)
47#define FT_CN (1U << 1)
48#define FT_DN (1U << 2)
50#define FT_MODIFIED_NMAX (1U << 30)
107ft_tb_eigen_FMM *
ft_plan_jacobi_to_jacobi(
const int norm1,
const int norm2,
const int n,
const double alpha,
const double beta,
const double gamma,
const double delta);
207ft_btb_eigen_FMM * ft_plan_associated_jacobi_to_jacobi(
const int norm1,
const int norm2,
const int n,
const int c,
const double alpha,
const double beta,
const double gamma,
const double delta);
208ft_btb_eigen_FMM * ft_plan_associated_laguerre_to_laguerre(
const int norm1,
const int norm2,
const int n,
const int c,
const double alpha,
const double beta);
209ft_btb_eigen_FMM * ft_plan_associated_hermite_to_hermite(
const int norm1,
const int norm2,
const int n,
const int c);
226ft_modified_plan *
ft_plan_modified_jacobi_to_jacobi(
const int n,
const double alpha,
const double beta,
const int nu,
const double * u,
const int nv,
const double * v,
const int verbose);
264ft_tb_eigen_FMMf *
ft_plan_jacobi_to_jacobif(
const int norm1,
const int norm2,
const int n,
const float alpha,
const float beta,
const float gamma,
const float delta);
280ft_btb_eigen_FMMf * ft_plan_associated_jacobi_to_jacobif(
const int norm1,
const int norm2,
const int n,
const int c,
const float alpha,
const float beta,
const float gamma,
const float delta);
281ft_btb_eigen_FMMf * ft_plan_associated_laguerre_to_laguerref(
const int norm1,
const int norm2,
const int n,
const int c,
const float alpha,
const float beta);
282ft_btb_eigen_FMMf * ft_plan_associated_hermite_to_hermitef(
const int norm1,
const int norm2,
const int n,
const int c);
285ft_modified_planf *
ft_plan_modified_jacobi_to_jacobif(
const int n,
const float alpha,
const float beta,
const int nu,
const float * u,
const int nv,
const float * v,
const int verbose);
298ft_tb_eigen_FMMl *
ft_plan_jacobi_to_jacobil(
const int norm1,
const int norm2,
const int n,
const long double alpha,
const long double beta,
const long double gamma,
const long double delta);
302ft_tb_eigen_FMMl *
ft_plan_jacobi_to_ultrasphericall(
const int normjac,
const int normultra,
const int n,
const long double alpha,
const long double beta,
const long double lambda);
304ft_tb_eigen_FMMl *
ft_plan_ultraspherical_to_jacobil(
const int normultra,
const int normjac,
const int n,
const long double lambda,
const long double alpha,
const long double beta);
314ft_btb_eigen_FMMl * ft_plan_associated_jacobi_to_jacobil(
const int norm1,
const int norm2,
const int n,
const int c,
const long double alpha,
const long double beta,
const long double gamma,
const long double delta);
315ft_btb_eigen_FMMl * ft_plan_associated_laguerre_to_laguerrel(
const int norm1,
const int norm2,
const int n,
const int c,
const long double alpha,
const long double beta);
316ft_btb_eigen_FMMl * ft_plan_associated_hermite_to_hermitel(
const int norm1,
const int norm2,
const int n,
const int c);
319ft_modified_planl *
ft_plan_modified_jacobi_to_jacobil(
const int n,
const long double alpha,
const long double beta,
const int nu,
const long double * u,
const int nv,
const long double * v,
const int verbose);
333void ft_mpfr_destroy_plan(mpfr_t * A,
int n);
334void ft_mpfr_trmv(
char TRANS,
int n, mpfr_t * A,
int LDA, mpfr_t * x, mpfr_rnd_t rnd);
335void ft_mpfr_trsv(
char TRANS,
int n, mpfr_t * A,
int LDA, mpfr_t * x, mpfr_rnd_t rnd);
336void ft_mpfr_trmm(
char TRANS,
int n, mpfr_t * A,
int LDA, mpfr_t * B,
int LDB,
int N, mpfr_rnd_t rnd);
337void ft_mpfr_trsm(
char TRANS,
int n, mpfr_t * A,
int LDA, mpfr_t * B,
int LDB,
int N, mpfr_rnd_t rnd);
340void ft_mpfr_trmv_ptr(
char TRANS,
int n, mpfr_t * A,
int LDA, mpfr_t ** x, mpfr_rnd_t rnd);
341void ft_mpfr_trsv_ptr(
char TRANS,
int n, mpfr_t * A,
int LDA, mpfr_t ** x, mpfr_rnd_t rnd);
342void ft_mpfr_trmm_ptr(
char TRANS,
int n, mpfr_t * A,
int LDA, mpfr_t ** B,
int LDB,
int N, mpfr_rnd_t rnd);
343void ft_mpfr_trsm_ptr(
char TRANS,
int n, mpfr_t * A,
int LDA, mpfr_t ** B,
int LDB,
int N, mpfr_rnd_t rnd);
386mpfr_t *
ft_mpfr_plan_jacobi_to_jacobi(
const int norm1,
const int norm2,
const int n, mpfr_srcptr alpha, mpfr_srcptr beta, mpfr_srcptr gamma, mpfr_srcptr delta, mpfr_prec_t prec, mpfr_rnd_t rnd);
484ft_rotation_plan * ft_plan_rottriangle(
const int n,
const double alpha,
const double beta,
const double gamma);
491ft_rotation_plan * ft_plan_rotdisk(
const int n,
const double alpha,
const double beta);
492ft_rotation_plan * ft_plan_rotannulus(
const int n,
const double alpha,
const double beta,
const double gamma,
const double rho);
506void ft_kernel_tet_hi2lo(
const ft_rotation_plan * RP,
const int L,
const int m,
double * A);
507void ft_kernel_tet_lo2hi(
const ft_rotation_plan * RP,
const int L,
const int m,
double * A);
523void ft_execute_sph_hi2lo(
const ft_rotation_plan * RP,
double * A,
double * B,
const int M);
524void ft_execute_sph_lo2hi(
const ft_rotation_plan * RP,
double * A,
double * B,
const int M);
526void ft_execute_sphv_hi2lo(
const ft_rotation_plan * RP,
double * A,
double * B,
const int M);
527void ft_execute_sphv_lo2hi(
const ft_rotation_plan * RP,
double * A,
double * B,
const int M);
529void ft_execute_tri_hi2lo(
const ft_rotation_plan * RP,
double * A,
double * B,
const int M);
530void ft_execute_tri_lo2hi(
const ft_rotation_plan * RP,
double * A,
double * B,
const int M);
532void ft_execute_disk_hi2lo(
const ft_rotation_plan * RP,
double * A,
double * B,
const int M);
533void ft_execute_disk_lo2hi(
const ft_rotation_plan * RP,
double * A,
double * B,
const int M);
535void ft_execute_rectdisk_hi2lo(
const ft_rotation_plan * RP,
double * A,
double * B,
const int M);
536void ft_execute_rectdisk_lo2hi(
const ft_rotation_plan * RP,
double * A,
double * B,
const int M);
541void ft_execute_spinsph_hi2lo(
const ft_spin_rotation_plan * SRP, ft_complex * A, ft_complex * B,
const int M);
542void ft_execute_spinsph_lo2hi(
const ft_spin_rotation_plan * SRP, ft_complex * A, ft_complex * B,
const int M);
547 ft_modified_plan ** MP;
589void ft_execute_sphv2fourier(
const char TRANS,
const ft_harmonic_plan * P,
double * A,
const int N,
const int M);
590void ft_execute_fourier2sphv(
const char TRANS,
const ft_harmonic_plan * P,
double * A,
const int N,
const int M);
774int ft_fftw_init_threads(
void);
775void ft_fftw_plan_with_nthreads(
const int n);
778 fftw_plan plantheta1;
779 fftw_plan plantheta2;
780 fftw_plan plantheta3;
781 fftw_plan plantheta4;
789ft_sphere_fftw_plan * ft_plan_sph_with_kind(
const int N,
const int M,
const fftw_r2r_kind kind[3][1],
const unsigned flags);
804ft_sphere_fftw_plan * ft_plan_sphv_synthesis(
const int N,
const int M,
const unsigned flags);
805ft_sphere_fftw_plan * ft_plan_sphv_analysis(
const int N,
const int M,
const unsigned flags);
826void ft_execute_sphv_synthesis(
const char TRANS,
const ft_sphere_fftw_plan * P,
double * X,
const int N,
const int M);
827void ft_execute_sphv_analysis(
const char TRANS,
const ft_sphere_fftw_plan * P,
double * X,
const int N,
const int M);
836ft_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);
877ft_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);
881void ft_execute_tet_synthesis(
const char TRANS,
const ft_tetrahedron_fftw_plan * P,
double * X,
const int N,
const int L,
const int M);
882void ft_execute_tet_analysis(
const char TRANS,
const ft_tetrahedron_fftw_plan * P,
double * X,
const int N,
const int L,
const int M);
896ft_disk_fftw_plan * ft_plan_disk_with_kind(
const int N,
const int M,
const fftw_r2r_kind kind[3][1],
const unsigned flags);
944ft_annulus_fftw_plan * ft_plan_annulus_with_kind(
const int N,
const int M,
const double rho,
const fftw_r2r_kind kind[3][1],
const unsigned flags);
990ft_rectdisk_fftw_plan * ft_plan_rectdisk_with_kind(
const int N,
const int M,
const fftw_r2r_kind kind[3][1],
const unsigned flags);
1026 fftw_plan plantheta1;
1027 fftw_plan plantheta2;
1028 fftw_plan plantheta3;
1029 fftw_plan plantheta4;
1040ft_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);
1079 ft_triangular_banded ** T;
1087void ft_execute_sph_gradient(
ft_gradient_plan * P,
double * U,
double * Ut,
double * Up,
const int N,
const int M);
1088void ft_execute_sph_curl(
ft_gradient_plan * P,
double * U,
double * Ut,
double * Up,
const int N,
const int M);
1091 ft_triangular_banded ** T;
1101void ft_execute_sph_helmholtzhodge(
ft_helmholtzhodge_plan * P,
double * U1,
double * U2,
double * V1,
double * V2,
const int N,
const int M);
1149void ft_execute_sph_polar_rotation(
double * A,
const int N,
const int M,
double s,
double c);
1151void ft_execute_sph_polar_reflection(
double * A,
const int N,
const int M);
1154 ft_symmetric_tridiagonal_symmetric_eigen * F11;
1155 ft_symmetric_tridiagonal_symmetric_eigen * F21;
1156 ft_symmetric_tridiagonal_symmetric_eigen * F12;
1157 ft_symmetric_tridiagonal_symmetric_eigen * F22;
1174void ft_execute_sph_yz_axis_exchange(
ft_sph_isometry_plan * J,
double * A,
const int N,
const int M);
1178void ft_execute_sph_rotation(
ft_sph_isometry_plan * J,
const double alpha,
const double beta,
const double gamma,
double * A,
const int N,
const int M);
Every orthogonal matrix can be decomposed as a product of Euler angles and, if necessary,...
Definition fasttransforms.h:1130
Definition fasttransforms.h:931
Definition fasttransforms.h:884
Definition fasttransforms.h:1077
Data structure to store ft_rotation_plans, arrays to represent 1D orthogonal polynomial transforms an...
Definition fasttransforms.h:545
Definition fasttransforms.h:1090
Definition fasttransforms.h:327
Definition fasttransforms.h:1153
Definition fasttransforms.h:981
A static struct to store a reflection about the plane in .
Definition fasttransforms.h:1139
Definition fasttransforms.h:1161
Definition fasttransforms.h:777
Data structure to store a ft_spin_rotation_plan, and various arrays to represent 1D orthogonal polyno...
Definition fasttransforms.h:734
Definition fasttransforms.h:1025
Definition fasttransforms.h:871
Definition fasttransforms.h:829