FastTransforms
Loading...
Searching...
No Matches
fasttransforms.h
Go to the documentation of this file.
1
5#ifndef FASTTRANSFORMS_H
6#define FASTTRANSFORMS_H
7
8#include <cblas.h>
9#include <fftw3.h>
10
11typedef double ft_complex[2];
12
13#ifdef _OPENMP
14 #include <omp.h>
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)
19#else
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)
24#endif
25
26#define FT_CONCAT(prefix, name, suffix) prefix ## name ## suffix
27
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);
30
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);
33
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);
36
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)
41 #include <quadmath.h>
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);
44#endif
45
46#define FT_SN (1U << 0)
47#define FT_CN (1U << 1)
48#define FT_DN (1U << 2)
49
50#define FT_MODIFIED_NMAX (1U << 30)
51
52#include "tdc.h"
53
65ft_tb_eigen_FMM * ft_plan_legendre_to_chebyshev(const int normleg, const int normcheb, const int n);
77ft_tb_eigen_FMM * ft_plan_chebyshev_to_legendre(const int normcheb, const int normleg, const int n);
91ft_tb_eigen_FMM * ft_plan_ultraspherical_to_ultraspherical(const int norm1, const int norm2, const int n, const double lambda, const double mu);
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);
121ft_tb_eigen_FMM * ft_plan_laguerre_to_laguerre(const int norm1, const int norm2, const int n, const double alpha, const double beta);
136ft_tb_eigen_FMM * ft_plan_jacobi_to_ultraspherical(const int normjac, const int normultra, const int n, const double alpha, const double beta, const double lambda);
151ft_tb_eigen_FMM * ft_plan_ultraspherical_to_jacobi(const int normultra, const int normjac, const int n, const double lambda, const double alpha, const double beta);
165ft_tb_eigen_FMM * ft_plan_jacobi_to_chebyshev(const int normjac, const int normcheb, const int n, const double alpha, const double beta);
179ft_tb_eigen_FMM * ft_plan_chebyshev_to_jacobi(const int normcheb, const int normjac, const int n, const double alpha, const double beta);
192ft_tb_eigen_FMM * ft_plan_ultraspherical_to_chebyshev(const int normultra, const int normcheb, const int n, const double lambda);
205ft_tb_eigen_FMM * ft_plan_chebyshev_to_ultraspherical(const int normcheb, const int normultra, const int n, const double lambda);
206
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);
210
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);
241ft_modified_plan * ft_plan_modified_laguerre_to_laguerre(const int n, const double alpha, const int nu, const double * u, const int nv, const double * v, const int verbose);
255ft_modified_plan * ft_plan_modified_hermite_to_hermite(const int n, const int nu, const double * u, const int nv, const double * v, const int verbose);
256
258ft_tb_eigen_FMMf * ft_plan_legendre_to_chebyshevf(const int normleg, const int normcheb, const int n);
260ft_tb_eigen_FMMf * ft_plan_chebyshev_to_legendref(const int normcheb, const int normleg, const int n);
262ft_tb_eigen_FMMf * ft_plan_ultraspherical_to_ultrasphericalf(const int norm1, const int norm2, const int n, const float lambda, const float mu);
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);
266ft_tb_eigen_FMMf * ft_plan_laguerre_to_laguerref(const int norm1, const int norm2, const int n, const float alpha, const float beta);
268ft_tb_eigen_FMMf * ft_plan_jacobi_to_ultrasphericalf(const int normjac, const int normultra, const int n, const float alpha, const float beta, const float lambda);
270ft_tb_eigen_FMMf * ft_plan_ultraspherical_to_jacobif(const int normultra, const int normjac, const int n, const float lambda, const float alpha, const float beta);
272ft_tb_eigen_FMMf * ft_plan_jacobi_to_chebyshevf(const int normjac, const int normcheb, const int n, const float alpha, const float beta);
274ft_tb_eigen_FMMf * ft_plan_chebyshev_to_jacobif(const int normcheb, const int normjac, const int n, const float alpha, const float beta);
276ft_tb_eigen_FMMf * ft_plan_ultraspherical_to_chebyshevf(const int normultra, const int normcheb, const int n, const float lambda);
278ft_tb_eigen_FMMf * ft_plan_chebyshev_to_ultrasphericalf(const int normcheb, const int normultra, const int n, const float lambda);
279
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);
283
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);
287ft_modified_planf * ft_plan_modified_laguerre_to_laguerref(const int n, const float alpha, const int nu, const float * u, const int nv, const float * v, const int verbose);
289ft_modified_planf * ft_plan_modified_hermite_to_hermitef(const int n, const int nu, const float * u, const int nv, const float * v, const int verbose);
290
292ft_tb_eigen_FMMl * ft_plan_legendre_to_chebyshevl(const int normleg, const int normcheb, const int n);
294ft_tb_eigen_FMMl * ft_plan_chebyshev_to_legendrel(const int normcheb, const int normleg, const int n);
296ft_tb_eigen_FMMl * ft_plan_ultraspherical_to_ultrasphericall(const int norm1, const int norm2, const int n, const long double lambda, const long double mu);
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);
300ft_tb_eigen_FMMl * ft_plan_laguerre_to_laguerrel(const int norm1, const int norm2, const int n, const long double alpha, const long double beta);
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);
306ft_tb_eigen_FMMl * ft_plan_jacobi_to_chebyshevl(const int normjac, const int normcheb, const int n, const long double alpha, const long double beta);
308ft_tb_eigen_FMMl * ft_plan_chebyshev_to_jacobil(const int normcheb, const int normjac, const int n, const long double alpha, const long double beta);
310ft_tb_eigen_FMMl * ft_plan_ultraspherical_to_chebyshevl(const int normultra, const int normcheb, const int n, const long double lambda);
312ft_tb_eigen_FMMl * ft_plan_chebyshev_to_ultrasphericall(const int normcheb, const int normultra, const int n, const long double lambda);
313
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);
317
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);
321ft_modified_planl * ft_plan_modified_laguerre_to_laguerrel(const int n, const long double alpha, const int nu, const long double * u, const int nv, const long double * v, const int verbose);
323ft_modified_planl * ft_plan_modified_hermite_to_hermitel(const int n, const int nu, const long double * u, const int nv, const long double * v, const int verbose);
324
325#include <mpfr.h>
326
327typedef struct {
328 mpfr_t * data;
329 int n;
330 int b;
332
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);
338// C -- Julia interoperability. Julia `BigFloat` does not have the same size as `mpfr_t`.
339// So we give all Julia-owned data its own address, and dereference to retrieve the number.
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);
344
353mpfr_t * ft_mpfr_plan_legendre_to_chebyshev(const int normleg, const int normcheb, const int n, mpfr_prec_t prec, mpfr_rnd_t rnd);
362mpfr_t * ft_mpfr_plan_chebyshev_to_legendre(const int normcheb, const int normleg, const int n, mpfr_prec_t prec, mpfr_rnd_t rnd);
373mpfr_t * ft_mpfr_plan_ultraspherical_to_ultraspherical(const int norm1, const int norm2, const int n, mpfr_srcptr lambda, mpfr_srcptr mu, mpfr_prec_t prec, 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);
397mpfr_t * ft_mpfr_plan_laguerre_to_laguerre(const int norm1, const int norm2, const int n, mpfr_srcptr alpha, mpfr_srcptr beta, mpfr_prec_t prec, mpfr_rnd_t rnd);
409mpfr_t * ft_mpfr_plan_jacobi_to_ultraspherical(const int normjac, const int normultra, const int n, mpfr_srcptr alpha, mpfr_srcptr beta, mpfr_srcptr lambda, mpfr_prec_t prec, mpfr_rnd_t rnd);
421mpfr_t * ft_mpfr_plan_ultraspherical_to_jacobi(const int normultra, const int normjac, const int n, mpfr_srcptr lambda, mpfr_srcptr alpha, mpfr_srcptr beta, mpfr_prec_t prec, mpfr_rnd_t rnd);
432mpfr_t * ft_mpfr_plan_jacobi_to_chebyshev(const int normjac, const int normcheb, const int n, mpfr_srcptr alpha, mpfr_srcptr beta, mpfr_prec_t prec, mpfr_rnd_t rnd);
443mpfr_t * ft_mpfr_plan_chebyshev_to_jacobi(const int normcheb, const int normjac, const int n, mpfr_srcptr alpha, mpfr_srcptr beta, mpfr_prec_t prec, mpfr_rnd_t rnd);
453mpfr_t * ft_mpfr_plan_ultraspherical_to_chebyshev(const int normultra, const int normcheb, const int n, mpfr_srcptr lambda, mpfr_prec_t prec, mpfr_rnd_t rnd);
463mpfr_t * ft_mpfr_plan_chebyshev_to_ultraspherical(const int normcheb, const int normultra, const int n, mpfr_srcptr lambda, mpfr_prec_t prec, mpfr_rnd_t rnd);
464
469void ft_set_num_threads(const int n);
470
472typedef struct ft_rotation_plan_s ft_rotation_plan;
473
476
477ft_rotation_plan * ft_plan_rotsphere(const int n);
478
480void ft_kernel_sph_hi2lo(const ft_rotation_plan * RP, const int m1, const int m2, double * A, const int S);
482void ft_kernel_sph_lo2hi(const ft_rotation_plan * RP, const int m1, const int m2, double * A, const int S);
483
484ft_rotation_plan * ft_plan_rottriangle(const int n, const double alpha, const double beta, const double gamma);
485
487void ft_kernel_tri_hi2lo(const ft_rotation_plan * RP, const int m1, const int m2, double * A, const int S);
489void ft_kernel_tri_lo2hi(const ft_rotation_plan * RP, const int m1, const int m2, double * A, const int S);
490
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);
493
495void ft_kernel_disk_hi2lo(const ft_rotation_plan * RP, const int m1, const int m2, double * A, const int S);
497void ft_kernel_disk_lo2hi(const ft_rotation_plan * RP, const int m1, const int m2, double * A, const int S);
498
499ft_rotation_plan * ft_plan_rotrectdisk(const int n, const double beta);
500
502void ft_kernel_rectdisk_hi2lo(const ft_rotation_plan * RP, const int m1, const int m2, double * A, const int S);
504void ft_kernel_rectdisk_lo2hi(const ft_rotation_plan * RP, const int m1, const int m2, double * A, const int S);
505
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);
508
510typedef struct ft_spin_rotation_plan_s ft_spin_rotation_plan;
511
514
515ft_spin_rotation_plan * ft_plan_rotspinsphere(const int n, const int s);
516
518void ft_kernel_spinsph_hi2lo(const ft_spin_rotation_plan * SRP, const int m, ft_complex * A, const int S);
520void ft_kernel_spinsph_lo2hi(const ft_spin_rotation_plan * SRP, const int m, ft_complex * A, const int S);
521
522
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);
525
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);
528
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);
531
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);
534
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);
537
538void ft_execute_tet_hi2lo(const ft_rotation_plan * RP1, const ft_rotation_plan * RP2, double * A, const int L, const int M);
539void ft_execute_tet_lo2hi(const ft_rotation_plan * RP1, const ft_rotation_plan * RP2, double * A, const int L, const int M);
540
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);
543
545typedef struct {
546 ft_rotation_plan ** RP;
547 ft_modified_plan ** MP;
548 double * B;
549 double ** P;
550 double ** Pinv;
551 double alpha;
552 double beta;
553 double gamma;
554 double delta;
555 double rho;
556 int NRP;
557 int NMP;
558 int NP;
560
563
569
578void ft_execute_sph2fourier(const char TRANS, const ft_harmonic_plan * P, double * A, const int N, const int M);
587void ft_execute_fourier2sph(const char TRANS, const ft_harmonic_plan * P, double * A, const int N, const int M);
588
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);
591
599ft_harmonic_plan * ft_plan_tri2cheb(const int n, const double alpha, const double beta, const double gamma);
600
609void ft_execute_tri2cheb(const char TRANS, const ft_harmonic_plan * P, double * A, const int N, const int M);
618void ft_execute_cheb2tri(const char TRANS, const ft_harmonic_plan * P, double * A, const int N, const int M);
619
626ft_harmonic_plan * ft_plan_disk2cxf(const int n, const double alpha, const double beta);
627
636void ft_execute_disk2cxf(const char TRANS, const ft_harmonic_plan * P, double * A, const int N, const int M);
645void ft_execute_cxf2disk(const char TRANS, const ft_harmonic_plan * P, double * A, const int N, const int M);
646
655ft_harmonic_plan * ft_plan_ann2cxf(const int n, const double alpha, const double beta, const double gamma, const double rho);
656
665void ft_execute_ann2cxf(const char TRANS, const ft_harmonic_plan * P, double * A, const int N, const int M);
674void ft_execute_cxf2ann(const char TRANS, const ft_harmonic_plan * P, double * A, const int N, const int M);
675
681ft_harmonic_plan * ft_plan_rectdisk2cheb(const int n, const double beta);
682
691void ft_execute_rectdisk2cheb(const char TRANS, const ft_harmonic_plan * P, double * A, const int N, const int M);
700void ft_execute_cheb2rectdisk(const char TRANS, const ft_harmonic_plan * P, double * A, const int N, const int M);
701
710ft_harmonic_plan * ft_plan_tet2cheb(const int n, const double alpha, const double beta, const double gamma, const double delta);
711
721void ft_execute_tet2cheb(const char TRANS, const ft_harmonic_plan * P, double * A, const int N, const int L, const int M);
731void ft_execute_cheb2tet(const char TRANS, const ft_harmonic_plan * P, double * A, const int N, const int L, const int M);
732
734typedef struct {
736 ft_complex * B;
737 ft_complex * P1;
738 ft_complex * P2;
739 ft_complex * P1inv;
740 ft_complex * P2inv;
741 int s;
743
746
753
762void ft_execute_spinsph2fourier(const char TRANS, const ft_spin_harmonic_plan * P, ft_complex * A, const int N, const int M);
771void ft_execute_fourier2spinsph(const char TRANS, const ft_spin_harmonic_plan * P, ft_complex * A, const int N, const int M);
772
773
774int ft_fftw_init_threads(void);
775void ft_fftw_plan_with_nthreads(const int n);
776
777typedef struct {
778 fftw_plan plantheta1;
779 fftw_plan plantheta2;
780 fftw_plan plantheta3;
781 fftw_plan plantheta4;
782 fftw_plan planphi;
783 double * Y;
785
788
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);
796ft_sphere_fftw_plan * ft_plan_sph_synthesis(const int N, const int M, const unsigned flags);
803ft_sphere_fftw_plan * ft_plan_sph_analysis(const int N, const int M, 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);
806
815void ft_execute_sph_synthesis(const char TRANS, const ft_sphere_fftw_plan * P, double * X, const int N, const int M);
824void ft_execute_sph_analysis(const char TRANS, const ft_sphere_fftw_plan * P, double * X, const int N, const int M);
825
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);
828
829typedef struct {
830 fftw_plan planxy;
832
835
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);
843ft_triangle_fftw_plan * ft_plan_tri_synthesis(const int N, const int M, const unsigned flags);
850ft_triangle_fftw_plan * ft_plan_tri_analysis(const int N, const int M, const unsigned flags);
851
860void ft_execute_tri_synthesis(const char TRANS, const ft_triangle_fftw_plan * P, double * X, const int N, const int M);
869void ft_execute_tri_analysis(const char TRANS, const ft_triangle_fftw_plan * P, double * X, const int N, const int M);
870
871typedef struct {
872 fftw_plan planxyz;
874
875void ft_destroy_tetrahedron_fftw_plan(ft_tetrahedron_fftw_plan * P);
876
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);
878ft_tetrahedron_fftw_plan * ft_plan_tet_synthesis(const int N, const int L, const int M, const unsigned flags);
879ft_tetrahedron_fftw_plan * ft_plan_tet_analysis(const int N, const int L, const int M, const unsigned flags);
880
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);
883
884typedef struct {
885 fftw_plan planr1;
886 fftw_plan planr2;
887 fftw_plan planr3;
888 fftw_plan planr4;
889 fftw_plan plantheta;
890 double * Y;
892
895
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);
903ft_disk_fftw_plan * ft_plan_disk_synthesis(const int N, const int M, const unsigned flags);
910ft_disk_fftw_plan * ft_plan_disk_analysis(const int N, const int M, const unsigned flags);
911
920void ft_execute_disk_synthesis(const char TRANS, const ft_disk_fftw_plan * P, double * X, const int N, const int M);
929void ft_execute_disk_analysis(const char TRANS, const ft_disk_fftw_plan * P, double * X, const int N, const int M);
930
931typedef struct {
932 fftw_plan planr;
933 fftw_plan plantheta;
934 double rho;
935 double * w;
936 double * Y;
938
941
942double ft_get_rho_annulus_fftw_plan(ft_annulus_fftw_plan * P);
943
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);
952ft_annulus_fftw_plan * ft_plan_annulus_synthesis(const int N, const int M, const double rho, const unsigned flags);
960ft_annulus_fftw_plan * ft_plan_annulus_analysis(const int N, const int M, const double rho, const unsigned flags);
961
970void ft_execute_annulus_synthesis(const char TRANS, const ft_annulus_fftw_plan * P, double * X, const int N, const int M);
979void ft_execute_annulus_analysis(const char TRANS, const ft_annulus_fftw_plan * P, double * X, const int N, const int M);
980
981typedef struct {
982 fftw_plan planx1;
983 fftw_plan planx2;
984 fftw_plan plany;
986
989
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);
997ft_rectdisk_fftw_plan * ft_plan_rectdisk_synthesis(const int N, const int M, const unsigned flags);
1004ft_rectdisk_fftw_plan * ft_plan_rectdisk_analysis(const int N, const int M, const unsigned flags);
1005
1014void ft_execute_rectdisk_synthesis(const char TRANS, const ft_rectdisk_fftw_plan * P, double * X, const int N, const int M);
1023void ft_execute_rectdisk_analysis(const char TRANS, const ft_rectdisk_fftw_plan * P, double * X, const int N, const int M);
1024
1025typedef struct {
1026 fftw_plan plantheta1;
1027 fftw_plan plantheta2;
1028 fftw_plan plantheta3;
1029 fftw_plan plantheta4;
1030 fftw_plan planphi;
1031 double * Y;
1032 int S;
1034
1037
1038int ft_get_spin_spinsphere_fftw_plan(const ft_spinsphere_fftw_plan * P);
1039
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);
1048ft_spinsphere_fftw_plan * ft_plan_spinsph_synthesis(const int N, const int M, const int S, const unsigned flags);
1056ft_spinsphere_fftw_plan * ft_plan_spinsph_analysis(const int N, const int M, const int S, const unsigned flags);
1057
1066void ft_execute_spinsph_synthesis(const char TRANS, const ft_spinsphere_fftw_plan * P, ft_complex * X, const int N, const int M);
1075void ft_execute_spinsph_analysis(const char TRANS, const ft_spinsphere_fftw_plan * P, ft_complex * X, const int N, const int M);
1076
1077typedef struct {
1078 ft_banded ** B;
1079 ft_triangular_banded ** T;
1080 int n;
1082
1083void ft_destroy_gradient_plan(ft_gradient_plan * P);
1084
1085ft_gradient_plan * ft_plan_sph_gradient(const int n);
1086
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);
1089
1090typedef struct {
1091 ft_triangular_banded ** T;
1092 ft_banded_qr ** F;
1093 double * X;
1094 int n;
1096
1097void ft_destroy_helmholtzhodge_plan(ft_helmholtzhodge_plan * P);
1098
1099ft_helmholtzhodge_plan * ft_plan_sph_helmholtzhodge(const int n);
1100
1101void ft_execute_sph_helmholtzhodge(ft_helmholtzhodge_plan * P, double * U1, double * U2, double * V1, double * V2, const int N, const int M);
1102
1107typedef struct {
1108 double Q[9];
1110
1130typedef struct {
1131 double s[3];
1132 double c[3];
1133 int sign;
1134} ft_ZYZR;
1135
1139typedef struct {
1140 double w[3];
1142
1143ft_ZYZR ft_create_ZYZR(ft_orthogonal_transformation Q);
1144
1145void ft_apply_ZYZR(ft_ZYZR Q, ft_orthogonal_transformation * U);
1146
1147void ft_apply_reflection(ft_reflection Q, ft_orthogonal_transformation * U);
1148
1149void ft_execute_sph_polar_rotation(double * A, const int N, const int M, double s, double c);
1150
1151void ft_execute_sph_polar_reflection(double * A, const int N, const int M);
1152
1153typedef struct {
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;
1158 int l;
1160
1161typedef struct {
1163 int n;
1165
1166void ft_destroy_partial_sph_isometry_plan(ft_partial_sph_isometry_plan * F);
1167
1168void ft_destroy_sph_isometry_plan(ft_sph_isometry_plan * F);
1169
1170ft_partial_sph_isometry_plan * ft_plan_partial_sph_isometry(const int l);
1171
1172ft_sph_isometry_plan * ft_plan_sph_isometry(const int n);
1173
1174void ft_execute_sph_yz_axis_exchange(ft_sph_isometry_plan * J, double * A, const int N, const int M);
1175
1176void ft_execute_sph_isometry(ft_sph_isometry_plan * J, ft_ZYZR Q, double * A, const int N, const int M);
1177
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);
1179
1180void ft_execute_sph_reflection(ft_sph_isometry_plan * J, ft_reflection W, double * A, const int N, const int M);
1181
1182void ft_execute_sph_orthogonal_transformation(ft_sph_isometry_plan * J, ft_orthogonal_transformation Q, double * A, const int N, const int M);
1183
1184#endif // FASTTRANSFORMS_H
ft_disk_fftw_plan * ft_plan_disk_analysis(const int N, const int M, const unsigned flags)
Plan FFTW analysis on the disk.
ft_tb_eigen_FMMl * ft_plan_ultraspherical_to_ultrasphericall(const int norm1, const int norm2, const int n, const long double lambda, const long double mu)
A long double precision version of ft_plan_ultraspherical_to_ultraspherical.
void ft_execute_spinsph2fourier(const char TRANS, const ft_spin_harmonic_plan *P, ft_complex *A, const int N, const int M)
Transform a spin-weighted spherical harmonic expansion to a bivariate Fourier series.
ft_tb_eigen_FMMl * ft_plan_chebyshev_to_jacobil(const int normcheb, const int normjac, const int n, const long double alpha, const long double beta)
A long double precision version of ft_plan_chebyshev_to_jacobi.
ft_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)
A single precision version of ft_plan_jacobi_to_jacobi.
void ft_execute_cheb2rectdisk(const char TRANS, const ft_harmonic_plan *P, double *A, const int N, const int M)
Transform a Chebyshev series to a rectangularized disk harmonic expansion.
ft_tb_eigen_FMM * ft_plan_laguerre_to_laguerre(const int norm1, const int norm2, const int n, const double alpha, const double beta)
Pre-compute a factorization of the connection coefficients between Laguerre polynomials in double pre...
ft_sphere_fftw_plan * ft_plan_sph_synthesis(const int N, const int M, const unsigned flags)
Plan FFTW synthesis on the sphere.
ft_tb_eigen_FMM * ft_plan_jacobi_to_chebyshev(const int normjac, const int normcheb, const int n, const double alpha, const double beta)
Pre-compute a factorization of the connection coefficients between Jacobi and Chebyshev polynomials i...
void ft_execute_annulus_analysis(const char TRANS, const ft_annulus_fftw_plan *P, double *X, const int N, const int M)
Execute FFTW analysis on the annulus.
void ft_kernel_disk_hi2lo(const ft_rotation_plan *RP, const int m1, const int m2, double *A, const int S)
Convert a single vector of disk harmonic coefficients in A with stride S from order m2 down to order ...
ft_tb_eigen_FMMl * ft_plan_jacobi_to_chebyshevl(const int normjac, const int normcheb, const int n, const long double alpha, const long double beta)
A long double precision version of ft_plan_jacobi_to_chebyshev.
void ft_destroy_spinsphere_fftw_plan(ft_spinsphere_fftw_plan *P)
Destroy a ft_spinsphere_fftw_plan.
ft_modified_planf * ft_plan_modified_hermite_to_hermitef(const int n, const int nu, const float *u, const int nv, const float *v, const int verbose)
A single precision version of ft_plan_modified_hermite_to_hermite.
ft_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)
Pre-compute a factorization of the connection coefficients between modified Jacobi polynomials,...
void ft_execute_disk2cxf(const char TRANS, const ft_harmonic_plan *P, double *A, const int N, const int M)
Transform a disk harmonic expansion to a Chebyshev–Fourier series.
mpfr_t * ft_mpfr_plan_jacobi_to_chebyshev(const int normjac, const int normcheb, const int n, mpfr_srcptr alpha, mpfr_srcptr beta, mpfr_prec_t prec, mpfr_rnd_t rnd)
A multi-precision version of ft_plan_jacobi_to_chebyshev that returns a dense array of connection coe...
void ft_destroy_spin_rotation_plan(ft_spin_rotation_plan *SRP)
Destroy a ft_spin_rotation_plan.
ft_tb_eigen_FMMf * ft_plan_chebyshev_to_jacobif(const int normcheb, const int normjac, const int n, const float alpha, const float beta)
A single precision version of ft_plan_chebyshev_to_jacobi.
ft_rectdisk_fftw_plan * ft_plan_rectdisk_analysis(const int N, const int M, const unsigned flags)
Plan FFTW analysis on the rectangularized disk.
void ft_execute_rectdisk_analysis(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_fourier2spinsph(const char TRANS, const ft_spin_harmonic_plan *P, ft_complex *A, const int N, const int M)
Transform a bivariate Fourier series to a spin-weighted spherical harmonic expansion.
ft_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)
A long double precision version of ft_plan_ultraspherical_to_jacobi.
ft_harmonic_plan * ft_plan_tri2cheb(const int n, const double alpha, const double beta, const double gamma)
Plan a triangular harmonic transform.
struct ft_spin_rotation_plan_s ft_spin_rotation_plan
Data structure to store sines and cosines of Givens rotations for spin-weighted harmonics.
Definition fasttransforms.h:510
void ft_execute_sph_analysis(const char TRANS, const ft_sphere_fftw_plan *P, double *X, const int N, const int M)
Execute FFTW analysis on the sphere.
ft_tb_eigen_FMMf * ft_plan_ultraspherical_to_ultrasphericalf(const int norm1, const int norm2, const int n, const float lambda, const float mu)
A single precision version of ft_plan_ultraspherical_to_ultraspherical.
ft_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)
A long double precision version of ft_plan_jacobi_to_ultraspherical.
void ft_kernel_tri_lo2hi(const ft_rotation_plan *RP, const int m1, const int m2, double *A, const int S)
Convert a single vector of triangular harmonic coefficients in A with stride S from order m1 up to or...
ft_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)
A long double precision version of ft_plan_modified_jacobi_to_jacobi.
ft_modified_planf * ft_plan_modified_laguerre_to_laguerref(const int n, const float alpha, const int nu, const float *u, const int nv, const float *v, const int verbose)
A single precision version of ft_plan_modified_laguerre_to_laguerre.
void ft_execute_tri2cheb(const char TRANS, const ft_harmonic_plan *P, double *A, const int N, const int M)
Transform a triangular harmonic expansion to a bivariate Chebyshev series.
void ft_execute_spinsph_analysis(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.
ft_modified_plan * ft_plan_modified_laguerre_to_laguerre(const int n, const double alpha, const int nu, const double *u, const int nv, const double *v, const int verbose)
Pre-compute a factorization of the connection coefficients between modified Laguerre polynomials,...
ft_harmonic_plan * ft_plan_tet2cheb(const int n, const double alpha, const double beta, const double gamma, const double delta)
Plan a tetrahedral harmonic transform.
void ft_execute_tri_synthesis(const char TRANS, const ft_triangle_fftw_plan *P, double *X, const int N, const int M)
Execute FFTW synthesis on the triangle.
void ft_kernel_spinsph_hi2lo(const ft_spin_rotation_plan *SRP, const int m, ft_complex *A, const int S)
Convert a single vector of spin-weighted spherical harmonic coefficients in A with stride S from orde...
ft_tb_eigen_FMMf * ft_plan_chebyshev_to_legendref(const int normcheb, const int normleg, const int n)
A single precision version of ft_plan_chebyshev_to_legendre.
void ft_kernel_tri_hi2lo(const ft_rotation_plan *RP, const int m1, const int m2, double *A, const int S)
Convert a single vector of triangular harmonic coefficients in A with stride S from order m2 down to ...
void ft_execute_sph2fourier(const char TRANS, const ft_harmonic_plan *P, double *A, const int N, const int M)
Transform a spherical harmonic expansion to a bivariate Fourier series.
ft_tb_eigen_FMMl * ft_plan_chebyshev_to_ultrasphericall(const int normcheb, const int normultra, const int n, const long double lambda)
A long double precision version of ft_plan_chebyshev_to_ultraspherical.
ft_modified_planl * ft_plan_modified_laguerre_to_laguerrel(const int n, const long double alpha, const int nu, const long double *u, const int nv, const long double *v, const int verbose)
A long double precision version of ft_plan_modified_laguerre_to_laguerre.
ft_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)
Pre-compute a factorization of the connection coefficients between Jacobi polynomials in double preci...
ft_spinsphere_fftw_plan * ft_plan_spinsph_analysis(const int N, const int M, const int S, const unsigned flags)
Plan FFTW analysis on the sphere with spin.
ft_spin_harmonic_plan * ft_plan_spinsph2fourier(const int n, const int s)
Plan a spin-weighted spherical harmonic transform.
ft_tb_eigen_FMMf * ft_plan_laguerre_to_laguerref(const int norm1, const int norm2, const int n, const float alpha, const float beta)
A single precision version of ft_plan_laguerre_to_laguerre.
mpfr_t * ft_mpfr_plan_ultraspherical_to_chebyshev(const int normultra, const int normcheb, const int n, mpfr_srcptr lambda, mpfr_prec_t prec, mpfr_rnd_t rnd)
A multi-precision version of ft_plan_ultraspherical_to_chebyshev that returns a dense array of connec...
ft_harmonic_plan * ft_plan_sph2fourier(const int n)
Plan a spherical harmonic transform.
ft_tb_eigen_FMMl * ft_plan_ultraspherical_to_chebyshevl(const int normultra, const int normcheb, const int n, const long double lambda)
A long double precision version of ft_plan_ultraspherical_to_chebyshev.
ft_triangle_fftw_plan * ft_plan_tri_analysis(const int N, const int M, const unsigned flags)
Plan FFTW analysis on the triangle.
void ft_destroy_annulus_fftw_plan(ft_annulus_fftw_plan *P)
Destroy a ft_annulus_fftw_plan.
mpfr_t * ft_mpfr_plan_chebyshev_to_legendre(const int normcheb, const int normleg, const int n, mpfr_prec_t prec, mpfr_rnd_t rnd)
A multi-precision version of ft_plan_chebyshev_to_legendre that returns a dense array of connection c...
void ft_kernel_disk_lo2hi(const ft_rotation_plan *RP, const int m1, const int m2, double *A, const int S)
Convert a single vector of disk harmonic coefficients in A with stride S from order m1 up to order m2...
void ft_execute_cheb2tet(const char TRANS, const ft_harmonic_plan *P, double *A, const int N, const int L, const int M)
Transform a trivariate Chebyshev series to a tetrahedral harmonic expansion.
void ft_destroy_harmonic_plan(ft_harmonic_plan *P)
Destroy a ft_harmonic_plan.
ft_tb_eigen_FMM * ft_plan_chebyshev_to_ultraspherical(const int normcheb, const int normultra, const int n, const double lambda)
Pre-compute a factorization of the connection coefficients between Chebyshev and ultraspherical polyn...
void ft_execute_annulus_synthesis(const char TRANS, const ft_annulus_fftw_plan *P, double *X, const int N, const int M)
Execute FFTW synthesis on the annulus.
void ft_kernel_rectdisk_lo2hi(const ft_rotation_plan *RP, const int m1, const int m2, double *A, const int S)
Convert a single vector of rectangularized disk harmonic coefficients in A with stride S from order m...
mpfr_t * ft_mpfr_plan_legendre_to_chebyshev(const int normleg, const int normcheb, const int n, mpfr_prec_t prec, mpfr_rnd_t rnd)
A multi-precision version of ft_plan_legendre_to_chebyshev that returns a dense array of connection c...
ft_tb_eigen_FMM * ft_plan_ultraspherical_to_chebyshev(const int normultra, const int normcheb, const int n, const double lambda)
Pre-compute a factorization of the connection coefficients between ultraspherical and Chebyshev polyn...
void ft_execute_disk_analysis(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_kernel_sph_lo2hi(const ft_rotation_plan *RP, const int m1, const int m2, double *A, const int S)
Convert a single vector of spherical harmonic coefficients in A with stride S from order m1 up to ord...
ft_sphere_fftw_plan * ft_plan_sph_analysis(const int N, const int M, const unsigned flags)
Plan FFTW analysis on the sphere.
ft_tb_eigen_FMM * ft_plan_jacobi_to_ultraspherical(const int normjac, const int normultra, const int n, const double alpha, const double beta, const double lambda)
Pre-compute a factorization of the connection coefficients between Jacobi and ultraspherical polynomi...
ft_tb_eigen_FMM * ft_plan_chebyshev_to_jacobi(const int normcheb, const int normjac, const int n, const double alpha, const double beta)
Pre-compute a factorization of the connection coefficients between Chebyshev and Jacobi polynomials i...
ft_harmonic_plan * ft_plan_ann2cxf(const int n, const double alpha, const double beta, const double gamma, const double rho)
Plan an annulus harmonic transform.
mpfr_t * ft_mpfr_plan_ultraspherical_to_jacobi(const int normultra, const int normjac, const int n, mpfr_srcptr lambda, mpfr_srcptr alpha, mpfr_srcptr beta, mpfr_prec_t prec, mpfr_rnd_t rnd)
A multi-precision version of ft_plan_ultraspherical_to_jacobi that returns a dense array of connectio...
void ft_destroy_disk_fftw_plan(ft_disk_fftw_plan *P)
Destroy a ft_disk_fftw_plan.
ft_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)
A single precision version of ft_plan_modified_jacobi_to_jacobi.
void ft_destroy_rectdisk_fftw_plan(ft_rectdisk_fftw_plan *P)
Destroy a ft_rectdisk_fftw_plan.
ft_tb_eigen_FMMf * ft_plan_chebyshev_to_ultrasphericalf(const int normcheb, const int normultra, const int n, const float lambda)
A single precision version of ft_plan_chebyshev_to_ultraspherical.
mpfr_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)
A multi-precision version of ft_plan_jacobi_to_jacobi that returns a dense array of connection coeffi...
mpfr_t * ft_mpfr_plan_chebyshev_to_jacobi(const int normcheb, const int normjac, const int n, mpfr_srcptr alpha, mpfr_srcptr beta, mpfr_prec_t prec, mpfr_rnd_t rnd)
A multi-precision version of ft_plan_chebyshev_to_jacobi that returns a dense array of connection coe...
ft_tb_eigen_FMMf * ft_plan_legendre_to_chebyshevf(const int normleg, const int normcheb, const int n)
A single precision version of ft_plan_legendre_to_chebyshev.
ft_annulus_fftw_plan * ft_plan_annulus_synthesis(const int N, const int M, const double rho, const unsigned flags)
Plan FFTW synthesis on the annulus.
ft_harmonic_plan * ft_plan_disk2cxf(const int n, const double alpha, const double beta)
Plan a disk harmonic transform.
void ft_destroy_triangle_fftw_plan(ft_triangle_fftw_plan *P)
Destroy a ft_triangle_fftw_plan.
void ft_kernel_rectdisk_hi2lo(const ft_rotation_plan *RP, const int m1, const int m2, double *A, const int S)
Convert a single vector of rectangularized disk harmonic coefficients in A with stride S from order m...
struct ft_rotation_plan_s ft_rotation_plan
Data structure to store sines and cosines of Givens rotations.
Definition fasttransforms.h:472
void ft_destroy_spin_harmonic_plan(ft_spin_harmonic_plan *P)
Destroy a ft_spin_harmonic_plan.
ft_spinsphere_fftw_plan * ft_plan_spinsph_synthesis(const int N, const int M, const int S, const unsigned flags)
Plan FFTW synthesis on the sphere with spin.
void ft_execute_cxf2disk(const char TRANS, const ft_harmonic_plan *P, double *A, const int N, const int M)
Transform a Chebyshev–Fourier series to a disk harmonic expansion.
void ft_execute_fourier2sph(const char TRANS, const ft_harmonic_plan *P, double *A, const int N, const int M)
Transform a bivariate Fourier series to a spherical harmonic expansion.
ft_tb_eigen_FMMl * ft_plan_laguerre_to_laguerrel(const int norm1, const int norm2, const int n, const long double alpha, const long double beta)
A long double precision version of ft_plan_laguerre_to_laguerre.
void ft_execute_ann2cxf(const char TRANS, const ft_harmonic_plan *P, double *A, const int N, const int M)
Transform an annulus harmonic expansion to a Chebyshev–Fourier series.
ft_tb_eigen_FMMl * ft_plan_chebyshev_to_legendrel(const int normcheb, const int normleg, const int n)
A long double precision version of ft_plan_chebyshev_to_legendre.
ft_tb_eigen_FMMl * ft_plan_legendre_to_chebyshevl(const int normleg, const int normcheb, const int n)
A long double precision version of ft_plan_legendre_to_chebyshev.
ft_triangle_fftw_plan * ft_plan_tri_synthesis(const int N, const int M, const unsigned flags)
Plan FFTW synthesis on the triangle.
ft_annulus_fftw_plan * ft_plan_annulus_analysis(const int N, const int M, const double rho, const unsigned flags)
Plan FFTW analysis on the annulus.
mpfr_t * ft_mpfr_plan_ultraspherical_to_ultraspherical(const int norm1, const int norm2, const int n, mpfr_srcptr lambda, mpfr_srcptr mu, mpfr_prec_t prec, mpfr_rnd_t rnd)
A multi-precision version of ft_plan_ultraspherical_to_ultraspherical that returns a dense array of c...
void ft_kernel_spinsph_lo2hi(const ft_spin_rotation_plan *SRP, const int m, ft_complex *A, const int S)
Convert a single vector of spin-weighted spherical harmonic coefficients in A with stride S from orde...
ft_disk_fftw_plan * ft_plan_disk_synthesis(const int N, const int M, const unsigned flags)
Plan FFTW synthesis on the disk.
ft_tb_eigen_FMM * ft_plan_ultraspherical_to_ultraspherical(const int norm1, const int norm2, const int n, const double lambda, const double mu)
Pre-compute a factorization of the connection coefficients between ultraspherical polynomials in doub...
void ft_kernel_sph_hi2lo(const ft_rotation_plan *RP, const int m1, const int m2, double *A, const int S)
Convert a single vector of spherical harmonic coefficients in A with stride S from order m2 down to o...
ft_tb_eigen_FMM * ft_plan_legendre_to_chebyshev(const int normleg, const int normcheb, const int n)
Pre-compute a factorization of the connection coefficients between Legendre and Chebyshev polynomials...
ft_harmonic_plan * ft_plan_rectdisk2cheb(const int n, const double beta)
Plan a rectangularized disk harmonic transform.
ft_rectdisk_fftw_plan * ft_plan_rectdisk_synthesis(const int N, const int M, const unsigned flags)
Plan FFTW synthesis on the rectangularized disk.
mpfr_t * ft_mpfr_plan_laguerre_to_laguerre(const int norm1, const int norm2, const int n, mpfr_srcptr alpha, mpfr_srcptr beta, mpfr_prec_t prec, mpfr_rnd_t rnd)
A multi-precision version of ft_plan_laguerre_to_laguerre that returns a dense array of connection co...
void ft_destroy_sphere_fftw_plan(ft_sphere_fftw_plan *P)
Destroy a ft_sphere_fftw_plan.
void ft_execute_rectdisk2cheb(const char TRANS, const ft_harmonic_plan *P, double *A, const int N, const int M)
Transform a rectangularized disk harmonic expansion to a Chebyshev series.
mpfr_t * ft_mpfr_plan_jacobi_to_ultraspherical(const int normjac, const int normultra, const int n, mpfr_srcptr alpha, mpfr_srcptr beta, mpfr_srcptr lambda, mpfr_prec_t prec, mpfr_rnd_t rnd)
A multi-precision version of ft_plan_jacobi_to_ultraspherical that returns a dense array of connectio...
ft_tb_eigen_FMM * ft_plan_ultraspherical_to_jacobi(const int normultra, const int normjac, const int n, const double lambda, const double alpha, const double beta)
Pre-compute a factorization of the connection coefficients between ultraspherical and Jacobi polynomi...
void ft_execute_tet2cheb(const char TRANS, const ft_harmonic_plan *P, double *A, const int N, const int L, const int M)
Transform a tetrahedral harmonic expansion to a trivariate Chebyshev series.
mpfr_t * ft_mpfr_plan_chebyshev_to_ultraspherical(const int normcheb, const int normultra, const int n, mpfr_srcptr lambda, mpfr_prec_t prec, mpfr_rnd_t rnd)
A multi-precision version of ft_plan_chebyshev_to_ultraspherical that returns a dense array of connec...
void ft_execute_cheb2tri(const char TRANS, const ft_harmonic_plan *P, double *A, const int N, const int M)
Transform a bivariate Chebyshev series to a triangular harmonic expansion.
ft_modified_plan * ft_plan_modified_hermite_to_hermite(const int n, const int nu, const double *u, const int nv, const double *v, const int verbose)
Pre-compute a factorization of the connection coefficients between modified Hermite polynomials,...
void ft_execute_disk_synthesis(const char TRANS, const ft_disk_fftw_plan *P, double *X, const int N, const int M)
Execute FFTW synthesis on the disk.
void ft_execute_cxf2ann(const char TRANS, const ft_harmonic_plan *P, double *A, const int N, const int M)
Transform a Chebyshev–Fourier series to an annulus harmonic expansion.
void ft_execute_tri_analysis(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_sph_synthesis(const char TRANS, const ft_sphere_fftw_plan *P, double *X, const int N, const int M)
Execute FFTW synthesis on the sphere.
void ft_destroy_rotation_plan(ft_rotation_plan *RP)
Destroy a ft_rotation_plan.
ft_tb_eigen_FMMf * ft_plan_ultraspherical_to_chebyshevf(const int normultra, const int normcheb, const int n, const float lambda)
A single precision version of ft_plan_ultraspherical_to_chebyshev.
ft_tb_eigen_FMMf * ft_plan_jacobi_to_chebyshevf(const int normjac, const int normcheb, const int n, const float alpha, const float beta)
A single precision version of ft_plan_jacobi_to_chebyshev.
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 synthesis on the sphere with spin.
ft_tb_eigen_FMMf * ft_plan_jacobi_to_ultrasphericalf(const int normjac, const int normultra, const int n, const float alpha, const float beta, const float lambda)
A single precision version of ft_plan_jacobi_to_ultraspherical.
void ft_set_num_threads(const int n)
Set the number of OpenMP threads.
ft_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)
A long double precision version of ft_plan_jacobi_to_jacobi.
void ft_execute_rectdisk_synthesis(const char TRANS, const ft_rectdisk_fftw_plan *P, double *X, const int N, const int M)
Execute FFTW synthesis on the rectangularized disk.
ft_tb_eigen_FMM * ft_plan_chebyshev_to_legendre(const int normcheb, const int normleg, const int n)
Pre-compute a factorization of the connection coefficients between Chebyshev and Legendre polynomials...
ft_tb_eigen_FMMf * ft_plan_ultraspherical_to_jacobif(const int normultra, const int normjac, const int n, const float lambda, const float alpha, const float beta)
A single precision version of ft_plan_ultraspherical_to_jacobi.
ft_modified_planl * ft_plan_modified_hermite_to_hermitel(const int n, const int nu, const long double *u, const int nv, const long double *v, const int verbose)
A long double precision version of ft_plan_modified_hermite_to_hermite.
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
A static struct to store an orthogonal matrix , such that . has column-major storage.
Definition fasttransforms.h:1107
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