![]() |
|
Data Structures | |
struct | nfsoft_plan_ |
Structure for a NFSOFT transform plan. More... | |
Defines | |
#define | NFSOFT_NORMALIZED (1U << 0) |
By default, all computations are performed with respect to the unnormalized basis functions
If this flag is set, all computations are carried out using the
| |
#define | NFSOFT_USE_NDFT (1U << 1) |
If this flag is set, the fast NFSOFT algorithms (see nfsoft_trafo, nfsoft_adjoint) will use internally the exact but usually slower direct NDFT algorithm in favor of fast but approximative NFFT algorithm. | |
#define | NFSOFT_USE_DPT (1U << 2) |
If this flag is set, the fast NFSOFT algorithms (see nfsoft_trafo, nfsoft_adjoint) will use internally the usually slower direct DPT algorithm in favor of the fast FPT algorithm. | |
#define | NFSOFT_MALLOC_X (1U << 3) |
If this flag is set, the init methods (see nfsoft_init , nfsoft_init_advanced , and nfsoft_init_guru) will allocate memory and the method nfsoft_finalize will free the array x for you. | |
#define | NFSOFT_REPRESENT (1U << 4) |
If this flag is set, the Wigner-D functions will be normed such that they satisfy the representation property of the spherical harmonics as defined in the NFFT software package. | |
#define | NFSOFT_MALLOC_F_HAT (1U << 5) |
If this flag is set, the init methods (see nfsoft_init , nfsoft_init_advanced , and nfsoft_init_guru) will allocate memory and the method nfsoft_finalize will free the array f_hat for you. | |
#define | NFSOFT_MALLOC_F (1U << 6) |
If this flag is set, the init methods (see nfsoft_init , nfsoft_init_advanced , and nfsoft_init_guru) will allocate memory and the method nfsoft_finalize will free the array f for you. | |
#define | NFSOFT_PRESERVE_F_HAT (1U << 7) |
If this flag is set, it is guaranteed that during an execution of nfsoft_trafo the content of f_hat remains unchanged. | |
#define | NFSOFT_PRESERVE_X (1U << 8) |
If this flag is set, it is guaranteed that during an execution of nfsoft_trafo or nfsoft_adjoint the content of x remains unchanged. | |
#define | NFSOFT_PRESERVE_F (1U << 9) |
If this flag is set, it is guaranteed that during an execution of ndsoft_adjoint or nfsoft_adjoint the content of f remains unchanged. | |
#define | NFSOFT_DESTROY_F_HAT (1U << 10) |
If this flag is set, it is explicitely allowed that during an execution of nfsoft_trafo the content of f_hat may be changed. | |
#define | NFSOFT_DESTROY_X (1U << 11) |
If this flag is set, it is explicitely allowed that during an execution of nfsoft_trafo or nfsoft_adjoint the content of x may be changed. | |
#define | NFSOFT_DESTROY_F (1U << 12) |
If this flag is set, it is explicitely allowed that during an execution of ndsoft_adjoint or nfsoft_adjoint the content of f may be changed. | |
#define | NFSOFT_NO_STABILIZATION (1U << 13) |
If this flag is set, the fast NFSOFT algorithms (see nfsoft_trafo, nfsoft_adjoint) will use internally the FPT algorithm without the stabilization scheme and thus making bigger errors for higher bandwidth but becoming significantly faster. | |
#define | NFSOFT_CHOOSE_DPT (1U << 14) |
If this flag is set, the fast NFSOFT algorithms (see nfsoft_trafo, nfsoft_adjoint) will decide whether to use the DPT or FPT algorithm depending on which is faster for the chosen orders. | |
#define | NFSOFT_SOFT (1U << 15) |
If this flag is set, the fast NFSOFT algorithms (see nfsoft_trafo, nfsoft_adjoint) becomes a SOFT, i.e., we use equispaced nodes. | |
#define | NFSOFT_ZERO_F_HAT (1U << 16) |
If this flag is set, the transform nfsoft_adjoint sets all unused entries in f_hat not corresponding to SO(3) Fourier coefficients to zero. | |
#define | NFSOFT_INDEX(m, n, l, B) (((l)+((B)+1))+(2*(B)+2)*(((n)+((B)+1))+(2*(B)+2)*((m)+((B)+1)))) |
These macro expands to the index ![]() ![]() ![]() ![]() | |
#define | NFSOFT_INDEX_TWO(m, n, l, B) ((B+1)*(B+1)+(B+1)*(B+1)*(m+B)-((m-1)*m*(2*m-1)+(B+1)*(B+2)*(2*B+3))/6)+(posN(n,m,B))+(l-MAX(ABS(m),ABS(n))) |
#define | NFSOFT_F_HAT_SIZE(B) (((B)+1)*(4*((B)+1)*((B)+1)-1)/3) |
This macro expands to the logical size of a SO(3) Fourier coefficients array for a bandwidth B. | |
Typedefs | |
typedef struct nfsoft_plan_ | nfsoft_plan |
Structure for a NFSOFT transform plan. | |
Functions | |
int | posN (int n, int m, int B) |
void | nfsoft_precompute (nfsoft_plan *plan) |
Functions for NFSOFT plans. | |
fpt_set | SO3_single_fpt_init (int l, int k, int m, unsigned int flags, int kappa) |
Computes the FPT transform. | |
void | SO3_fpt (fftw_complex *coeffs, fpt_set set, int l, int k, int m, unsigned int nfsoft_flags) |
void | SO3_fpt_transposed (fftw_complex *coeffs, fpt_set set, int l, int k, int m, unsigned int nfsoft_flags) |
void | nfsoft_init (nfsoft_plan *plan, int N, int M) |
Creates a NFSOFT transform plan. | |
void | nfsoft_init_advanced (nfsoft_plan *plan, int N, int M, unsigned int nfsoft_flags) |
Creates a NFSOFT transform plan. | |
void | nfsoft_init_guru (nfsoft_plan *plan, int N, int M, unsigned int nfsoft_flags, unsigned int nfft_flags, int nfft_cutoff, int fpt_kappa) |
Creates a NFSOFT transform plan. | |
void | nfsoft_trafo (nfsoft_plan *plan_nfsoft) |
Executes a NFSOFT, i.e. | |
void | nfsoft_adjoint (nfsoft_plan *plan_nfsoft) |
Executes an adjoint NFSOFT, i.e. | |
void | nfsoft_finalize (nfsoft_plan *plan) |
Destroys a plan. |
In the following, we abbreviate the term "nonuniform fast SO(3) Fourier transform" by NFSOFT.
#define NFSOFT_NORMALIZED (1U << 0) |
By default, all computations are performed with respect to the unnormalized basis functions
If this flag is set, all computations are carried out using the - normalized basis functions
.
Definition at line 2323 of file nfft3.h.
Referenced by nfsoft_adjoint(), and nfsoft_trafo().
#define NFSOFT_USE_NDFT (1U << 1) |
If this flag is set, the fast NFSOFT algorithms (see nfsoft_trafo, nfsoft_adjoint) will use internally the exact but usually slower direct NDFT algorithm in favor of fast but approximative NFFT algorithm.
Definition at line 2335 of file nfft3.h.
Referenced by nfsoft_adjoint(), and nfsoft_trafo().
#define NFSOFT_USE_DPT (1U << 2) |
If this flag is set, the fast NFSOFT algorithms (see nfsoft_trafo, nfsoft_adjoint) will use internally the usually slower direct DPT algorithm in favor of the fast FPT algorithm.
#define NFSOFT_MALLOC_X (1U << 3) |
If this flag is set, the init methods (see nfsoft_init , nfsoft_init_advanced , and nfsoft_init_guru) will allocate memory and the method nfsoft_finalize will free the array x
for you.
Otherwise, you have to assure by yourself that x
points to an array of proper size before excuting a transform and you are responsible for freeing the corresponding memory before program termination.
Definition at line 2362 of file nfft3.h.
Referenced by nfsoft_finalize(), nfsoft_init(), and nfsoft_init_guru().
#define NFSOFT_REPRESENT (1U << 4) |
If this flag is set, the Wigner-D functions will be normed such that they satisfy the representation property of the spherical harmonics as defined in the NFFT software package.
Definition at line 2371 of file nfft3.h.
Referenced by nfsoft_adjoint(), and nfsoft_trafo().
#define NFSOFT_MALLOC_F_HAT (1U << 5) |
If this flag is set, the init methods (see nfsoft_init , nfsoft_init_advanced , and nfsoft_init_guru) will allocate memory and the method nfsoft_finalize will free the array f_hat
for you.
Otherwise, you have to assure by yourself that f_hat
points to an array of proper size before excuting a transform and you are responsible for freeing the corresponding memory before program termination.
Definition at line 2387 of file nfft3.h.
Referenced by nfsoft_finalize(), nfsoft_init(), and nfsoft_init_guru().
#define NFSOFT_MALLOC_F (1U << 6) |
If this flag is set, the init methods (see nfsoft_init , nfsoft_init_advanced , and nfsoft_init_guru) will allocate memory and the method nfsoft_finalize will free the array f
for you.
Otherwise, you have to assure by yourself that f
points to an array of proper size before excuting a transform and you are responsible for freeing the corresponding memory before program termination.
Definition at line 2402 of file nfft3.h.
Referenced by nfsoft_finalize(), nfsoft_init(), and nfsoft_init_guru().
#define NFSOFT_PRESERVE_F_HAT (1U << 7) |
If this flag is set, it is guaranteed that during an execution of nfsoft_trafo the content of f_hat
remains unchanged.
#define NFSOFT_PRESERVE_X (1U << 8) |
If this flag is set, it is guaranteed that during an execution of nfsoft_trafo or nfsoft_adjoint the content of x
remains unchanged.
#define NFSOFT_PRESERVE_F (1U << 9) |
If this flag is set, it is guaranteed that during an execution of ndsoft_adjoint or nfsoft_adjoint the content of f
remains unchanged.
#define NFSOFT_DESTROY_F_HAT (1U << 10) |
If this flag is set, it is explicitely allowed that during an execution of nfsoft_trafo the content of f_hat
may be changed.
#define NFSOFT_DESTROY_X (1U << 11) |
If this flag is set, it is explicitely allowed that during an execution of nfsoft_trafo or nfsoft_adjoint the content of x
may be changed.
#define NFSOFT_DESTROY_F (1U << 12) |
If this flag is set, it is explicitely allowed that during an execution of ndsoft_adjoint or nfsoft_adjoint the content of f
may be changed.
#define NFSOFT_NO_STABILIZATION (1U << 13) |
If this flag is set, the fast NFSOFT algorithms (see nfsoft_trafo, nfsoft_adjoint) will use internally the FPT algorithm without the stabilization scheme and thus making bigger errors for higher bandwidth but becoming significantly faster.
#define NFSOFT_CHOOSE_DPT (1U << 14) |
If this flag is set, the fast NFSOFT algorithms (see nfsoft_trafo, nfsoft_adjoint) will decide whether to use the DPT or FPT algorithm depending on which is faster for the chosen orders.
not yet included in the checked-in version
#define NFSOFT_SOFT (1U << 15) |
If this flag is set, the fast NFSOFT algorithms (see nfsoft_trafo, nfsoft_adjoint) becomes a SOFT, i.e., we use equispaced nodes.
The FFTW will be used instead of the NFFT.-->not included yet
#define NFSOFT_ZERO_F_HAT (1U << 16) |
If this flag is set, the transform nfsoft_adjoint sets all unused entries in f_hat
not corresponding to SO(3) Fourier coefficients to zero.
void nfsoft_precompute | ( | nfsoft_plan * | plan | ) |
Functions for NFSOFT plans.
Does all node-dependent and node-independent precomputations needed for the NFSOFT.
Definition at line 424 of file nfsoft.c.
References nfft_plan::f_hat, FG_PSI, nfsoft_plan_::flags, nfsoft_plan_::fpt_kappa, nfsoft_plan_::fpt_set, nfft_plan::M_total, nfsoft_plan_::M_total, MALLOC_F_HAT, nfft_plan::N_total, nfsoft_plan_::N_total, nfft_precompute_one_psi(), nfsoft_plan_::p_nfft, PI, PRE_PSI, nfsoft_plan_::x, and nfft_plan::x.
fpt_set SO3_single_fpt_init | ( | int | l, | |
int | k, | |||
int | m, | |||
unsigned int | flags, | |||
int | kappa | |||
) |
Computes the FPT transform.
Definition at line 214 of file nfsoft.c.
References fpt_init(), FPT_NO_STABILIZATION, fpt_precompute(), nfft_malloc(), and nfft_next_power_of_2().
void nfsoft_init | ( | nfsoft_plan * | plan, | |
int | N, | |||
int | M | |||
) |
Creates a NFSOFT transform plan.
Definition at line 34 of file nfsoft.c.
References nfsoft_init_advanced(), NFSOFT_MALLOC_F, NFSOFT_MALLOC_F_HAT, and NFSOFT_MALLOC_X.
void nfsoft_init_advanced | ( | nfsoft_plan * | plan, | |
int | N, | |||
int | M, | |||
unsigned int | nfsoft_flags | |||
) |
Creates a NFSOFT transform plan.
Definition at line 40 of file nfsoft.c.
References FFT_OUT_OF_PLACE, FFTW_INIT, MALLOC_F, MALLOC_F_HAT, MALLOC_X, nfsoft_init_guru(), PRE_PHI_HUT, and PRE_PSI.
Referenced by nfsoft_init().
void nfsoft_init_guru | ( | nfsoft_plan * | plan, | |
int | N, | |||
int | M, | |||
unsigned int | nfsoft_flags, | |||
unsigned int | nfft_flags, | |||
int | nfft_cutoff, | |||
int | fpt_kappa | |||
) |
Creates a NFSOFT transform plan.
Definition at line 48 of file nfsoft.c.
References nfsoft_plan_::aux, nfsoft_plan_::cheby, nfsoft_plan_::f, nfsoft_plan_::f_hat, nfsoft_plan_::flags, nfsoft_plan_::fpt_kappa, nfsoft_plan_::fpt_set, nfsoft_plan_::M_total, nfsoft_plan_::mv_adjoint, nfsoft_plan_::mv_trafo, nfsoft_plan_::N_total, nfft_init_guru(), nfft_malloc(), nfft_next_power_of_2(), nfft_precompute_lin_psi(), nfsoft_adjoint(), NFSOFT_MALLOC_F, NFSOFT_MALLOC_F_HAT, NFSOFT_MALLOC_X, nfsoft_trafo(), nfsoft_plan_::p_nfft, PRE_LIN_PSI, nfsoft_plan_::wig_coeffs, and nfsoft_plan_::x.
Referenced by nfsoft_init_advanced().
void nfsoft_trafo | ( | nfsoft_plan * | plan_nfsoft | ) |
Executes a NFSOFT, i.e.
computes for
Definition at line 463 of file nfsoft.c.
References c2e(), nfsoft_plan_::cheby, nfft_plan::f, nfsoft_plan_::f, nfft_plan::f_hat, nfsoft_plan_::f_hat, nfsoft_plan_::flags, nfsoft_plan_::fpt_set, nfsoft_plan_::M_total, nfft_plan::N_total, nfsoft_plan_::N_total, ndft_trafo(), nfft_next_power_of_2(), nfft_trafo(), NFSOFT_INDEX, NFSOFT_NORMALIZED, NFSOFT_REPRESENT, NFSOFT_USE_NDFT, nfsoft_plan_::p_nfft, PI, and nfsoft_plan_::wig_coeffs.
Referenced by nfsoft_init_guru().
void nfsoft_adjoint | ( | nfsoft_plan * | plan_nfsoft | ) |
Executes an adjoint NFSOFT, i.e.
computes for
Definition at line 588 of file nfsoft.c.
References nfsoft_plan_::cheby, nfft_plan::f, nfsoft_plan_::f, nfft_plan::f_hat, nfsoft_plan_::f_hat, nfsoft_plan_::flags, nfsoft_plan_::fpt_set, nfsoft_plan_::M_total, nfsoft_plan_::N_total, ndft_adjoint(), nfft_adjoint(), NFSOFT_INDEX, NFSOFT_NORMALIZED, NFSOFT_REPRESENT, NFSOFT_USE_NDFT, nfsoft_plan_::p_nfft, PI, and nfsoft_plan_::wig_coeffs.
Referenced by nfsoft_init_guru().
void nfsoft_finalize | ( | nfsoft_plan * | plan | ) |
Destroys a plan.
Definition at line 677 of file nfsoft.c.
References nfsoft_plan_::aux, nfsoft_plan_::cheby, nfsoft_plan_::f, nfsoft_plan_::f_hat, nfsoft_plan_::flags, nfsoft_plan_::fpt_set, nfft_finalize(), NFSOFT_MALLOC_F, NFSOFT_MALLOC_F_HAT, NFSOFT_MALLOC_X, nfsoft_plan_::p_nfft, nfsoft_plan_::wig_coeffs, and nfsoft_plan_::x.