#define CMD_LEN_MAX 20 /* maximum length of command argument */ /* global flags */ #define NFFT_MEX_FIRST_CALL (1U << 0) unsigned short gflags = NFFT_MEX_FIRST_CALL; nfft_plan* plans[PLANS_MAX]; /* plans */ char cmd[CMD_LEN_MAX]; static inline void get_nm(const mxArray *prhs[], int *n, int *m) { int t = nfft_mex_get_int(prhs[1],"nfft: Input argument N must be a scalar."); DM(if ((t < 0) || (t%2!=0)) mexErrMsgTxt("nfft: Input argument N must be non-negative and multiple of two.");) *n = t; t = nfft_mex_get_int(prhs[2],"nfft: Input argument M must be a scalar."); DM(if (t < 1) mexErrMsgTxt("nfft: Input argument M must be positive.");) *m = t; } static inline void get_n1n2m(const mxArray *prhs[], int *n1, int *n2, int *m) { int t = nfft_mex_get_int(prhs[1],"nfft: Input argument N1 must be a scalar."); DM(if ((t < 0) || (t%2!=0)) mexErrMsgTxt("nfft: Input argument N1 must be non-negative and even.");) *n1 = t; t = nfft_mex_get_int(prhs[2],"nfft: Input argument N2 must be a scalar."); DM(if ((t < 0) || (t%2!=0)) mexErrMsgTxt("nfft: Input argument N2 must be non-negative and even.");)
static inline void get_nm(const mxArray *prhs[], int *n, int *m) { int t = nfft_mex_get_int(prhs[1],"nfft: Input argument N must be a scalar."); DM(if ((t < 0) || (t%2!=0)) mexErrMsgTxt("nfft: Input argument N must be non-negative and multiple of two.");)
static inline void get_nm(const mxArray *prhs[], int *n, int *m) { int t = nfft_mex_get_int(prhs[1],"nfsft: Input argument N must be a scalar."); DM(if (t < 0) mexErrMsgTxt("nfsft: Input argument N must be non-negative.");)