MAOS
Multithreaded Adaptive Optics Simulator
|
Macros | |
#define | ARR(T) |
#define | CELLDEF(T, S) |
#define | MATARR(T, S) |
#define | MATDEF(T, S) typedef MATARR(T,S) S |
#define | SPMATDEF(T, S) |
#define | reshape(in, nx_, ny_) |
#define | types_anyarray(T, S) |
#define | types_anycell(T, S) |
#define | types_anydmat(T, S) |
#define | types_anyloc(T, S) |
#define | def_anyarray(T, S, C) |
#define | def_anycell(T, S, C) |
#define | def_anydmat(T, S, C) |
#define | def_anyloc(T, S, C) |
#define | index_1d(i, nx, ny) (i) |
#define | index_2d(ix, iy, nx, ny) ((ix)+(iy)*(nx)) |
#define | index_col(iy, nx, ny) ((iy)*(nx)) |
#define | P0(A) (A)->p |
#define | P1(A, i) (A)->p[index_1d((i), (A)->nx, (A)->ny)] |
#define | P2(A, ix, iy) (A)->p[index_2d((ix), (iy), (A)->nx, (A)->ny)] |
#define | P3(Ac, icx, ix, iy) P2(P1(Ac,icx),ix,iy) |
#define | P4(Ac, icx, icy, ix, iy) P2(P2(Ac,icx,icy),ix,iy) |
#define | P_GET5(_0, _1, _2, _3, _4, _5, NAME, ...) NAME |
#define | P(...) P_GET5(_0,__VA_ARGS__,P4,P3,P2,P1,P0)(__VA_ARGS__) |
#define | PCOL(A, iy) ((A)->p+index_col((iy), (A)->nx, (A)->ny)) |
#define | P_GET3(_0, _1, _2, _3, NAME, ...) NAME |
#define | PR1(A, ix) P1((A), (((A)->nx==1 && (A)->ny==1)?0:ix)) |
#define | PR2(A, ix, iy) P2((A), ((A)->nx==1?0:ix), ((A)->ny==1?0:iy)) |
#define | PR(...) P_GET3(_0,__VA_ARGS__,PR2,PR1,P0)(__VA_ARGS__) |
#define | PCOLR(A, iy) PCOL((A),((A)->ny==1?0:iy)) |
#define | PN0(A) ((A)?((A)->nx*(A)->ny):0) |
#define | NX0(A) ((A)?(A)->nx:0) |
#define | NY0(A) ((A)?(A)->ny:0) |
#define | PN1(A, i) PN0(P1(A,i)) |
#define | PN2(A, ix, iy) PN0(P2(A,ix,iy)) |
#define | PN(...) P_GET3(_0,__VA_ARGS__,PN2,PN1,PN0)(__VA_ARGS__) |
#define | NX1(A, i) NX0(P1(A,i)) |
#define | NX2(A, ix, iy) NX0(P2(A,ix,iy)) |
#define | NX(...) P_GET3(_0,__VA_ARGS__,NX2,NX1,NX0)(__VA_ARGS__) |
#define | NY1(A, i) NY0(P1(A,i)) |
#define | NY2(A, ix, iy) NY0(P2(A,ix,iy)) |
#define | NY(...) P_GET3(_0,__VA_ARGS__,NY2,NY1,NY0)(__VA_ARGS__) |
#define | NE0(A) ((A) && (A)->nx && (A)->ny) |
#define | NE1(A, i) ((A) && NE0(P(A,i))) |
#define | NE2(A, ix, iy) ((A) && NE0(P(A,ix,iy))) |
#define | NE(...) P_GET3(_0,__VA_ARGS__,NE2,NE1,NE0)(__VA_ARGS__) |
Enumerations | |
enum | CEMBED { C_FULL, C_ABS2, C_REAL, C_ABS, C_LITERAL } |
Functions | |
union | __attribute__ ((__transparent_union__)) |
Defines the math data types like dmat, cmat, dcell, ccell, dsp, csp data types.
Don't use ulong for dimensions because subtracting a bigger ulong from a smaller ulong overflows.
Remember to update interface.py after updating the structs below.
struct smat |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type. |
float *__restrict | p |
The data pointer |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
The keywords as a string |
file_t * | fp |
Opened file to be saved to |
struct fft_t * | fft |
<For FFT plan |
mem_t * | mem |
Memory management |
async_t * | async |
async io |
struct zmat |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type. |
fcomplex *__restrict | p |
The data pointer |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
The keywords as a string |
file_t * | fp |
Opened file to be saved to |
struct fft_t * | fft |
<For FFT plan |
mem_t * | mem |
Memory management |
async_t * | async |
async io |
struct dmat |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type. |
real *__restrict | p |
The data pointer |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
The keywords as a string |
file_t * | fp |
Opened file to be saved to |
struct fft_t * | fft |
<For FFT plan |
mem_t * | mem |
Memory management |
async_t * | async |
async io |
struct cmat |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type. |
comp *__restrict | p |
The data pointer |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
The keywords as a string |
file_t * | fp |
Opened file to be saved to |
struct fft_t * | fft |
<For FFT plan |
mem_t * | mem |
Memory management |
async_t * | async |
async io |
struct lmat |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type. |
long *__restrict | p |
The data pointer |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
The keywords as a string |
file_t * | fp |
Opened file to be saved to |
struct fft_t * | fft |
<For FFT plan |
mem_t * | mem |
Memory management |
async_t * | async |
async io |
struct imat |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type. |
int *__restrict | p |
The data pointer |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
The keywords as a string |
file_t * | fp |
Opened file to be saved to |
struct fft_t * | fft |
<For FFT plan |
mem_t * | mem |
Memory management |
async_t * | async |
async io |
struct ssp |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type |
float *__restrict | px |
numerical values, size nzmax |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
the keywords as a string |
file_t * | fp |
The file, to be saved upon free |
long | nzmax |
maximum number of entries |
spint *__restrict | pp |
col indices (size ny+1) |
spint *__restrict | pi |
row indices (size nzmax) |
unsigned int * | nref |
reference counting for px, pp, pi |
struct zsp |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type |
fcomplex *__restrict | px |
numerical values, size nzmax |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
the keywords as a string |
file_t * | fp |
The file, to be saved upon free |
long | nzmax |
maximum number of entries |
spint *__restrict | pp |
col indices (size ny+1) |
spint *__restrict | pi |
row indices (size nzmax) |
unsigned int * | nref |
reference counting for px, pp, pi |
struct dsp |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type |
real *__restrict | px |
numerical values, size nzmax |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
the keywords as a string |
file_t * | fp |
The file, to be saved upon free |
long | nzmax |
maximum number of entries |
spint *__restrict | pp |
col indices (size ny+1) |
spint *__restrict | pi |
row indices (size nzmax) |
unsigned int * | nref |
reference counting for px, pp, pi |
struct csp |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type |
comp *__restrict | px |
numerical values, size nzmax |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
the keywords as a string |
file_t * | fp |
The file, to be saved upon free |
long | nzmax |
maximum number of entries |
spint *__restrict | pp |
col indices (size ny+1) |
spint *__restrict | pi |
row indices (size nzmax) |
unsigned int * | nref |
reference counting for px, pp, pi |
struct map_t |
OPD or Amplitude map defined on square/rectangular grids. with equal spacing on x/y. Can be casted to dmat.
Data Fields | ||
---|---|---|
union map_t | __unnamed__ | |
real | ox |
Origin in x |
real | oy |
Origin in y |
real | dx |
Sampling along x |
real | dy |
Sampling along y |
real | h |
Heigh conjugation of this surface |
real | vx | |
real | vy |
Wind velocity. Useful for atmospheric grid |
real | iac |
Wind velocity. Useful for atmospheric grid Inter-actuator coupling. >0: use cubic influence function |
real | dratio |
demagnification ratio (>1 for shrinking beam) |
struct rmap_t |
Map with different x/y sampling. Can be cased to dmat
Data Fields | ||
---|---|---|
union rmap_t | __unnamed__ | |
real | ox |
Origin in x |
real | oy |
Origin in y |
real | dx |
Sampling along x (first dimension) |
real | dy |
Sampling along y (second dimension) |
real | txdeg |
the x tilt angle in degree wrt beam (90 is prep), |
real | tydeg |
the y tilt angle in degree wrt beam (90 is prep), |
real | ftel |
Effective focal length of the telescope |
real | fexit |
The distance between the exit pupil and the focus |
real | fsurf |
The distance between the tilted surface (M3) and the focus |
struct locstatcol_t |
Store starting x,y for each col
Data Fields | ||
---|---|---|
real | xstart |
starting x of this column |
real | ystart |
starting y of this column |
long | pos |
starting index of this column |
struct locstat_t |
Stores array of locstatcol_t
Data Fields | ||
---|---|---|
locstatcol_t * | cols |
Information about each column |
real | dx |
Sampling of the grid along x |
real | dy |
Sampling of the grid along y |
real | xmin |
Minimum x |
real | ymin |
Minimum y |
long | ncol |
Number of consecutive columns found |
long | nx | |
long | ny |
Size for embedding |
struct loc_t |
struct pts_t |
low left point of each subaperture.
don't change the leading elements. so that pts_t can be used as loc_t.
Data Fields | ||
---|---|---|
union pts_t | __unnamed__ | |
int | nxsa |
number of cols per subaperture |
int | nysa |
number of rows per subaperture |
real | dx |
sampling of points in each subaperture |
real | dy |
sampling of points in each subaperture. dy=dx normally required. |
struct cell |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type. |
struct cell **__restrict | p |
The data pointer |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
The keywords as a string |
file_t * | fp |
Opened file to be saved to |
struct fft_t * | fft |
<For FFT plan |
struct cell * | m | |
void * | dummy1 |
struct ccell |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type. |
struct cmat **__restrict | p |
The data pointer |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
The keywords as a string |
file_t * | fp |
Opened file to be saved to |
struct fft_t * | fft |
<For FFT plan |
struct cmat * | m | |
void * | dummy1 |
struct zcell |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type. |
struct zmat **__restrict | p |
The data pointer |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
The keywords as a string |
file_t * | fp |
Opened file to be saved to |
struct fft_t * | fft |
<For FFT plan |
struct zmat * | m | |
void * | dummy1 |
struct dcell |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type. |
struct dmat **__restrict | p |
The data pointer |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
The keywords as a string |
file_t * | fp |
Opened file to be saved to |
struct fft_t * | fft |
<For FFT plan |
struct dmat * | m | |
void * | dummy1 |
struct scell |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type. |
struct smat **__restrict | p |
The data pointer |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
The keywords as a string |
file_t * | fp |
Opened file to be saved to |
struct fft_t * | fft |
<For FFT plan |
struct smat * | m | |
void * | dummy1 |
struct lcell |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type. |
struct lmat **__restrict | p |
The data pointer |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
The keywords as a string |
file_t * | fp |
Opened file to be saved to |
struct fft_t * | fft |
<For FFT plan |
struct lmat * | m | |
void * | dummy1 |
struct dspcell |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type. |
struct dsp **__restrict | p |
The data pointer |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
The keywords as a string |
file_t * | fp |
Opened file to be saved to |
struct fft_t * | fft |
<For FFT plan |
struct dsp * | m | |
void * | dummy1 |
struct sspcell |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type. |
struct ssp **__restrict | p |
The data pointer |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
The keywords as a string |
file_t * | fp |
Opened file to be saved to |
struct fft_t * | fft |
<For FFT plan |
struct ssp * | m | |
void * | dummy1 |
struct cspcell |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type. |
struct csp **__restrict | p |
The data pointer |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
The keywords as a string |
file_t * | fp |
Opened file to be saved to |
struct fft_t * | fft |
<For FFT plan |
struct csp * | m | |
void * | dummy1 |
struct zspcell |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type. |
struct zsp **__restrict | p |
The data pointer |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
The keywords as a string |
file_t * | fp |
Opened file to be saved to |
struct fft_t * | fft |
<For FFT plan |
struct zsp * | m | |
void * | dummy1 |
struct cccell |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type. |
struct ccell **__restrict | p |
The data pointer |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
The keywords as a string |
file_t * | fp |
Opened file to be saved to |
struct fft_t * | fft |
<For FFT plan |
struct ccell * | m | |
void * | dummy1 |
struct zccell |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type. |
struct zcell **__restrict | p |
The data pointer |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
The keywords as a string |
file_t * | fp |
Opened file to be saved to |
struct fft_t * | fft |
<For FFT plan |
struct zcell * | m | |
void * | dummy1 |
struct dccell |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type. |
struct dcell **__restrict | p |
The data pointer |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
The keywords as a string |
file_t * | fp |
Opened file to be saved to |
struct fft_t * | fft |
<For FFT plan |
struct dcell * | m | |
void * | dummy1 |
struct sccell |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type. |
struct scell **__restrict | p |
The data pointer |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
The keywords as a string |
file_t * | fp |
Opened file to be saved to |
struct fft_t * | fft |
<For FFT plan |
struct scell * | m | |
void * | dummy1 |
struct lccell |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type. |
struct lcell **__restrict | p |
The data pointer |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
The keywords as a string |
file_t * | fp |
Opened file to be saved to |
struct fft_t * | fft |
<For FFT plan |
struct lcell * | m | |
void * | dummy1 |
struct ccccell |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type. |
struct cccell **__restrict | p |
The data pointer |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
The keywords as a string |
file_t * | fp |
Opened file to be saved to |
struct fft_t * | fft |
<For FFT plan |
struct cccell * | m | |
void * | dummy1 |
struct zcccell |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type. |
struct zccell **__restrict | p |
The data pointer |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
The keywords as a string |
file_t * | fp |
Opened file to be saved to |
struct fft_t * | fft |
<For FFT plan |
struct zccell * | m | |
void * | dummy1 |
struct dcccell |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type. |
struct dccell **__restrict | p |
The data pointer |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
The keywords as a string |
file_t * | fp |
Opened file to be saved to |
struct fft_t * | fft |
<For FFT plan |
struct dccell * | m | |
void * | dummy1 |
struct scccell |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type. |
struct sccell **__restrict | p |
The data pointer |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
The keywords as a string |
file_t * | fp |
Opened file to be saved to |
struct fft_t * | fft |
<For FFT plan |
struct sccell * | m | |
void * | dummy1 |
struct lcccell |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type. |
struct lccell **__restrict | p |
The data pointer |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
The keywords as a string |
file_t * | fp |
Opened file to be saved to |
struct fft_t * | fft |
<For FFT plan |
struct lccell * | m | |
void * | dummy1 |
struct mapcell |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type. |
struct map_t **__restrict | p |
The data pointer |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
The keywords as a string |
file_t * | fp |
Opened file to be saved to |
struct fft_t * | fft |
<For FFT plan |
struct map_t * | m | |
void * | dummy1 |
struct rmapcell |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type. |
struct rmap_t **__restrict | p |
The data pointer |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
The keywords as a string |
file_t * | fp |
Opened file to be saved to |
struct fft_t * | fft |
<For FFT plan |
struct rmap_t * | m | |
void * | dummy1 |
struct loccell |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type. |
struct loc_t **__restrict | p |
The data pointer |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
The keywords as a string |
file_t * | fp |
Opened file to be saved to |
struct fft_t * | fft |
<For FFT plan |
struct loc_t * | m | |
void * | dummy1 |
struct mapccell |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type. |
struct mapcell **__restrict | p |
The data pointer |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
The keywords as a string |
file_t * | fp |
Opened file to be saved to |
struct fft_t * | fft |
<For FFT plan |
struct mapcell * | m | |
void * | dummy1 |
struct rmapccell |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type. |
struct rmapcell **__restrict | p |
The data pointer |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
The keywords as a string |
file_t * | fp |
Opened file to be saved to |
struct fft_t * | fft |
<For FFT plan |
struct rmapcell * | m | |
void * | dummy1 |
struct locccell |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type. |
struct loccell **__restrict | p |
The data pointer |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
The keywords as a string |
file_t * | fp |
Opened file to be saved to |
struct fft_t * | fft |
<For FFT plan |
struct loccell * | m | |
void * | dummy1 |
union map_t.__unnamed__ |
struct map_t.__unnamed__.__unnamed__ |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type. |
real *__restrict | p |
The data pointer |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
The keywords as a string |
file_t * | fp |
Opened file to be saved to |
struct fft_t * | fft |
<For FFT plan |
mem_t * | mem |
Memory management |
async_t * | async |
async io |
union rmap_t.__unnamed__ |
struct rmap_t.__unnamed__.__unnamed__ |
Data Fields | ||
---|---|---|
M_ID | id |
to identify the array type. |
real *__restrict | p |
The data pointer |
long | nx |
number of rows |
long | ny |
number of columns |
char * | keywords |
The keywords as a string |
file_t * | fp |
Opened file to be saved to |
struct fft_t * | fft |
<For FFT plan |
mem_t * | mem |
Memory management |
async_t * | async |
async io |
union loc_t.__unnamed__ |
struct loc_t.__unnamed__.__unnamed__ |
struct loc_t.__unnamed__ |
Data Fields | ||
---|---|---|
real * | locy |
y coordinates of each point |
locstat_t * | stat |
points to column statistics |
map_t * | map |
point to the map used for identifying neihboring points. |
unsigned int * | nref |
Reference counting |
real | dx |
Sampling along x |
real | dy |
Sampling along y |
real | ht |
Conjugation height of the loc grid. |
real | iac |
Inter-actuator coupling. >0: use cubic influence function for ray tracing |
int | npad |
union pts_t.__unnamed__ |
struct pts_t.__unnamed__.__unnamed__ |
Data Fields | ||
---|---|---|
__unnamed__ | __unnamed__ | |
real * | origy |
The y origin of each subaperture |
locstat_t * | stat |
padding so that we can be casted to loc_t |
map_t * | map | |
unsigned int * | nref |
Reference counting |
__unnamed__ | __unnamed__ | |
real | dsay |
side length of subaperture. |
real | dummy_ht |
Place holder |
real | dummy_iac |
Place holder |
int | npad |
padding when create map |
union pts_t.__unnamed__.__unnamed__.__unnamed__ |
Data Fields | ||
---|---|---|
dmat | dmat[1] | |
__unnamed__ | __unnamed__ |
struct pts_t.__unnamed__.__unnamed__.__unnamed__.__unnamed__ |
Data Fields | ||
---|---|---|
M_ID | id | |
real * | origx |
The x origin of each subaperture. Contains memory for origy |
long | nsa |
number of subapertures. |
long | two |
Constant 2. to be binary compatble with rmat |
char * | keywords |
The keywords as a string |
union pts_t.__unnamed__.__unnamed__.__unnamed__ |
#define ARR | ( | T | ) |
For FFT plan
#define CELLDEF | ( | T, | |
S | |||
) |
#define MATARR | ( | T, | |
S | |||
) |
#define types_anydmat | ( | T, | |
S | |||
) |
#define types_anyloc | ( | T, | |
S | |||
) |
#define def_anyarray | ( | T, | |
S, | |||
C | |||
) |
#define def_anycell | ( | T, | |
S, | |||
C | |||
) |
#define def_anydmat | ( | T, | |
S, | |||
C | |||
) |
#define def_anyloc | ( | T, | |
S, | |||
C | |||
) |
#define P | ( | ... | ) | P_GET5(_0,__VA_ARGS__,P4,P3,P2,P1,P0)(__VA_ARGS__) |
#define PCOL | ( | A, | |
iy | |||
) | ((A)->p+index_col((iy), (A)->nx, (A)->ny)) |
Used to obtain pointer to columns iy of array A
#define PR | ( | ... | ) | P_GET3(_0,__VA_ARGS__,PR2,PR1,P0)(__VA_ARGS__) |
Calls P() with wrapping of index
#define PCOLR | ( | A, | |
iy | |||
) | PCOL((A),((A)->ny==1?0:iy)) |
Calls PCOL(A, iy) with wrapping of index
#define PN | ( | ... | ) | P_GET3(_0,__VA_ARGS__,PN2,PN1,PN0)(__VA_ARGS__) |
Return number of elements
#define NX | ( | ... | ) | P_GET3(_0,__VA_ARGS__,NX2,NX1,NX0)(__VA_ARGS__) |
Return number of rows (inner dimension)
#define NY | ( | ... | ) | P_GET3(_0,__VA_ARGS__,NY2,NY1,NY0)(__VA_ARGS__) |
Return number of cols (outer dimension)