![]() |
NFFT 3.5.3alpha
|
Internal header file for auxiliary definitions and functions. More...
#include "config.h"#include <math.h>#include <float.h>#include <stdio.h>#include <string.h>#include <stdlib.h>#include <stdarg.h>#include <stddef.h>#include <fftw3.h>#include "ticks.h"
Go to the source code of this file.
Macros | |
| #define | CONCAT(prefix, name) prefix ## name |
| #define | Y(name) CONCAT(nfft_,name) |
| #define | FFTW(name) CONCAT(fftw_,name) |
| #define | NFFT(name) CONCAT(nfft_,name) |
| #define | NFCT(name) CONCAT(nfct_,name) |
| #define | NFST(name) CONCAT(nfst_,name) |
| #define | NFSFT(name) CONCAT(nfsft_,name) |
| #define | SOLVER(name) CONCAT(solver_,name) |
| #define | X(name) Y(name) |
| #define | STRINGIZEx(x) #x |
| #define | STRINGIZE(x) STRINGIZEx(x) |
| #define | K(x) ((R) x) |
| #define | DK(name, value) const R name = K(value) |
| #define | KPI K(3.1415926535897932384626433832795028841971693993751) |
| #define | K2PI K(6.2831853071795864769252867665590057683943387987502) |
| #define | K4PI K(12.5663706143591729538505735331180115367886775975004) |
| #define | KE K(2.7182818284590452353602874713526624977572470937000) |
| #define | IF(x, a, b) ((x)?(a):(b)) |
| #define | MIN(a, b) (((a)<(b))?(a):(b)) |
| #define | MAX(a, b) (((a)>(b))?(a):(b)) |
| #define | ABS(x) (((x)>K(0.0))?(x):(-(x))) |
| #define | SIGN(a) (((a)>=0)?1:-1) |
| #define | SIGN(a) (((a)>=0)?1:-1) |
| #define | SIGNF(a) IF((a)<K(0.0),K(-1.0),K(1.0)) |
| #define | SIZE(x) sizeof(x)/sizeof(x[0]) |
| #define | CSWAP(x, y) |
| Swap two vectors. | |
| #define | RSWAP(x, y) |
| Swap two vectors. | |
| #define | PHI_HUT(n, k, d) (Y(bessel_i0)((R)(ths->m) * SQRT(ths->b[d] * ths->b[d] - (K(2.0) * KPI * (R)(k) / (R)(n)) * (K(2.0) * KPI * (R)(k) / (R)(n))))) |
| #define | PHI(n, x, d) |
| #define | WINDOW_HELP_INIT |
| #define | WINDOW_HELP_FINALIZE {Y(free)(ths->b);} |
| #define | WINDOW_HELP_ESTIMATE_m 8 |
| #define | COPYSIGN copysign |
| #define | NEXTAFTER nextafter |
| #define | MKNAN nan |
| #define | CEIL ceil |
| #define | FLOOR floor |
| #define | NEARBYINT nearbyint |
| #define | RINT rint |
| #define | ROUND round |
| #define | LRINT lrint |
| #define | LROUND lround |
| #define | LLRINT llrint |
| #define | LLROUND llround |
| #define | TRUNC trunc |
| #define | FMOD fmod |
| #define | REMAINDER remainder |
| #define | REMQUO remquo |
| #define | FDIM fdim |
| #define | FMAX fmax |
| #define | FMIN fmin |
| #define | FFMA fma |
| #define | FABS fabs |
| #define | SQRT sqrt |
| #define | CBRT cbrt |
| #define | HYPOT hypot |
| #define | EXP exp |
| #define | EXP2 exp2 |
| #define | EXPM1 expm1 |
| #define | LOG log |
| #define | LOG2 log2 |
| #define | LOG10 log10 |
| #define | LOG1P log1p |
| #define | LOGB logb |
| #define | ILOGB ilogb |
| #define | MODF modf |
| #define | FREXP frexp |
| #define | LDEXP ldexp |
| #define | SCALBN scalbn |
| #define | SCALBLN scalbln |
| #define | POW pow |
| #define | COS cos |
| #define | SIN sin |
| #define | TAN tan |
| #define | COSH cosh |
| #define | SINH sinh |
| #define | TANH tanh |
| #define | ACOS acos |
| #define | ASIN asin |
| #define | ATAN atan |
| #define | ATAN2 atan2 |
| #define | ACOSH acosh |
| #define | ASINH asinh |
| #define | ATANH atanh |
| #define | TGAMMA tgamma |
| #define | LGAMMA lgamma |
| #define | J0 j0 |
| #define | J1 j1 |
| #define | JN jn |
| #define | Y0 y0 |
| #define | Y1 y1 |
| #define | YN yn |
| #define | ERF erf |
| #define | ERFC erfc |
| #define | CREAL creal |
| #define | CIMAG cimag |
| #define | CABS cabs |
| #define | CARG carg |
| #define | CONJ conj |
| #define | CPROJ cproj |
| #define | CSQRT csqrt |
| #define | CEXP cexp |
| #define | CLOG clog |
| #define | CPOW cpow |
| #define | CSIN csin |
| #define | CCOS ccos |
| #define | CTAN ctan |
| #define | CASIN casin |
| #define | CACOS cacos |
| #define | CATAN catan |
| #define | CSINH csinh |
| #define | CCOSH ccosh |
| #define | CTANH ctanh |
| #define | CASINH casinh |
| #define | CACOSH cacosh |
| #define | CATANH catanh |
| #define | MANT_DIG DBL_MANT_DIG |
| #define | MIN_EXP DBL_MIN_EXP |
| #define | MAX_EXP DBL_MAX_EXP |
| #define | EPSILON DBL_EPSILON |
| #define | FLTROUND 0.0 |
| #define | R_RADIX FLT_RADIX |
| #define | II _Complex_I |
| #define | __FGS__ "lg" |
| #define | __FES__ "lE" |
| #define | __FE__ "% 20.16lE" |
| #define | __FI__ "%lf" |
| #define | __FIS__ "lf" |
| #define | __FR__ "%le" |
| #define | TRUE 1 |
| #define | FALSE 0 |
| #define | __D__ "%td" |
| #define | UNUSED(x) (void)x |
| Dummy use of unused parameters to silence compiler warnings. | |
| #define | STACK_MALLOC(T, p, x) p = (T)Y(malloc)(x) |
| #define | STACK_FREE(x) Y(free)(x) |
| #define | UNUSED(x) (void)x |
| Dummy use of unused parameters to silence compiler warnings. | |
| #define | TIC(a) |
| Timing, method works since the inaccurate timer is updated mostly in the measured function. | |
| #define | TOC(a) |
| #define | TIC_FFTW(a) |
| #define | TOC_FFTW(a) |
| #define | CK(ex) (void)((ex) || (Y(assertion_failed)(#ex, __LINE__, __FILE__), 0)) |
| #define | A(ex) /* nothing */ |
Typedefs | |
| typedef double | R |
| typedef double _Complex | C |
| typedef ptrdiff_t | INT |
Functions | |
| INT | nfft_m2K (const INT m) |
| double | copysign (double, double) |
| double | nextafter (double, double) |
| double | nan (const char *tag) |
| double | ceil (double) |
| double | floor (double) |
| double | nearbyint (double) |
| double | rint (double) |
| double | round (double) |
| long int | lrint (double) |
| long int | lround (double) |
| long long int | llrint (double) |
| long long int | llround (double) |
| double | trunc (double) |
| double | fmod (double, double) |
| double | remainder (double, double) |
| double | remquo (double x, double y, int *) |
| double | fdim (double, double) |
| double | fmax (double, double) |
| double | fmin (double, double) |
| double | fma (double x, double y, double z) |
| double | fabs (double) |
| double | sqrt (double) |
| double | cbrt (double) |
| double | hypot (double, double) |
| double | exp (double) |
| double | exp2 (double) |
| double | expm1 (double) |
| double | log (double) |
| double | log2 (double) |
| double | log10 (double) |
| double | log1p (double) |
| double | logb (double) |
| int | ilogb (double) |
| double | modf (double, double *) |
| double | frexp (double, int *) |
| double | ldexp (double, int) |
| double | scalbn (double, int) |
| double | scalbln (double, long int) |
| double | pow (double, double) |
| double | cos (double) |
| double | sin (double) |
| double | tan (double) |
| double | cosh (double) |
| double | sinh (double) |
| double | tanh (double) |
| double | acos (double) |
| double | asin (double) |
| double | atan (double) |
| double | atan2 (double, double) |
| double | acosh (double) |
| double | asinh (double) |
| double | atanh (double) |
| double | tgamma (double) |
| double | lgamma (double) |
| double | j0 (double) |
| double | j1 (double) |
| double | jn (int, double) |
| double | y0 (double) |
| double | y1 (double) |
| double | yn (int, double) |
| double | erf (double) |
| double | erfc (double) |
| double | creal (double _Complex z) |
| double | cimag (double _Complex z) |
| double | cabs (double _Complex z) |
| double | carg (double _Complex z) |
| double _Complex | conj (double _Complex z) |
| double _Complex | cproj (double _Complex z) |
| double _Complex | csqrt (double _Complex z) |
| double _Complex | cexp (double _Complex z) |
| double _Complex | clog (double _Complex z) |
| double _Complex | cpow (double _Complex z, double _Complex w) |
| double _Complex | csin (double _Complex z) |
| double _Complex | ccos (double _Complex z) |
| double _Complex | ctan (double _Complex z) |
| double _Complex | casin (double _Complex z) |
| double _Complex | cacos (double _Complex z) |
| double _Complex | catan (double _Complex z) |
| double _Complex | csinh (double _Complex z) |
| double _Complex | ccosh (double _Complex z) |
| double _Complex | ctanh (double _Complex z) |
| double _Complex | casinh (double _Complex z) |
| double _Complex | cacosh (double _Complex z) |
| double _Complex | catanh (double _Complex z) |
| double | drand48 (void) |
| void | srand48 (long int) |
| R | nfft_elapsed_seconds (ticks t1, ticks t0) |
| Return number of elapsed seconds between two time points. | |
| R | nfft_sinc (R x) |
| R | nfft_lambda (R z, R eps) |
| R | nfft_lambda2 (R mu, R nu) |
| R | nfft_bessel_i0 (R x) |
| R | nfft_bsplines (const INT, const R x) |
| R | nfft_float_property (float_property) |
| R | nfft_prod_real (R *vec, INT d) |
| INT | nfft_log2i (const INT m) |
| void | nfft_next_power_of_2_exp (const INT N, INT *N2, INT *t) |
| void | nfft_next_power_of_2_exp_int (const int N, int *N2, int *t) |
| R | nfft_error_l_infty_double (const R *x, const R *y, const INT n) |
| R | nfft_error_l_infty_1_double (const R *x, const R *y, const INT n, const R *z, const INT m) |
| R | nfft_error_l_2_complex (const C *x, const C *y, const INT n) |
| R | nfft_error_l_2_double (const R *x, const R *y, const INT n) |
| void | nfft_sort_node_indices_radix_msdf (INT n, INT *keys0, INT *keys1, INT rhigh) |
| void | nfft_sort_node_indices_radix_lsdf (INT n, INT *keys0, INT *keys1, INT rhigh) |
| void | nfft_assertion_failed (const char *s, int line, const char *file) |
| R | nfft_dot_double (R *x, INT n) |
Computes the inner/dot product ![]() | |
| R | nfft_dot_w_complex (C *x, R *w, INT n) |
Computes the weighted inner/dot product ![]() | |
| R | nfft_dot_w_double (R *x, R *w, INT n) |
Computes the weighted inner/dot product ![]() | |
| R | nfft_dot_w_w2_complex (C *x, R *w, R *w2, INT n) |
Computes the weighted inner/dot product ![]() | |
| R | nfft_dot_w2_complex (C *x, R *w2, INT n) |
Computes the weighted inner/dot product ![]() | |
| void | nfft_cp_complex (C *x, C *y, INT n) |
Copies ![]() | |
| void | nfft_cp_double (R *x, R *y, INT n) |
Copies ![]() | |
| void | nfft_cp_a_complex (C *x, R a, C *y, INT n) |
Copies ![]() | |
| void | nfft_cp_a_double (R *x, R a, R *y, INT n) |
Copies ![]() | |
| void | nfft_cp_w_complex (C *x, R *w, C *y, INT n) |
Copies ![]() | |
| void | nfft_cp_w_double (R *x, R *w, R *y, INT n) |
Copies ![]() | |
| void | nfft_upd_axpy_double (R *x, R a, R *y, INT n) |
Updates ![]() | |
| void | nfft_upd_xpay_complex (C *x, R a, C *y, INT n) |
Updates ![]() | |
| void | nfft_upd_xpay_double (R *x, R a, R *y, INT n) |
Updates ![]() | |
| void | nfft_upd_axpby_complex (C *x, R a, C *y, R b, INT n) |
Updates ![]() | |
| void | nfft_upd_axpby_double (R *x, R a, R *y, R b, INT n) |
Updates ![]() | |
| void | nfft_upd_xpawy_complex (C *x, R a, R *w, C *y, INT n) |
Updates ![]() | |
| void | nfft_upd_xpawy_double (R *x, R a, R *w, R *y, INT n) |
Updates ![]() | |
| void | nfft_upd_axpwy_complex (C *x, R a, R *w, C *y, INT n) |
Updates ![]() | |
| void | nfft_upd_axpwy_double (R *x, R a, R *w, R *y, INT n) |
Updates ![]() | |
| void | nfft_voronoi_weights_1d (R *w, R *x, const INT M) |
| R | nfft_modified_fejer (const INT N, const INT kk) |
| Compute damping factor for modified Fejer kernel: /f$\frac{2}{N}\left(1-\frac{\left|2k+1\right|}{N}\right)/f$. | |
| R | nfft_modified_jackson2 (const INT N, const INT kk) |
| Compute damping factor for modified Jackson kernel. | |
| R | nfft_modified_jackson4 (const INT N, const INT kk) |
| Compute damping factor for modified generalised Jackson kernel. | |
| R | nfft_modified_sobolev (const R mu, const INT kk) |
| Compute damping factor for modified Sobolev kernel. | |
| R | nfft_modified_multiquadric (const R mu, const R c, const INT kk) |
| Comput damping factor for modified multiquadric kernel. | |
Internal header file for auxiliary definitions and functions.
Definition in file infft.h.