MAOS
Multithreaded Adaptive Optics Simulator
|
Macros | |
#define | isempty(A) (!(A) || !(A)->nx || !(A)->ny) |
#define | A A |
#define | DMAT(A) ((A)?(A)->dmat:(dmat*)0) |
#define | LOC(A) ((A)?(A)->loc:(loc_t*)0) |
#define | abs2(A) ((A)*(A)) |
#define | cabs2f(A) (abs2(crealf(A))+abs2(cimagf(A))) |
#define | cabs2(A) (abs2(creal(A))+abs2(cimag(A))) |
#define | dfree(A) if(A){dfree_do(A);A=NULL;} |
#define | dcellfree(A) if(A){cellfree_do(A);A=NULL;} |
#define | dcellfreearr(A, n) if((A)&&(n)>0){for(int in=0; in<n; in++){dcellfree(A[in]);};free(A);A=NULL;} |
#define | sfree(A) if(A){sfree_do(A);A=NULL;} |
#define | scellfree(A) if(A){cellfree_do(A);A=NULL;} |
#define | scellfreearr(A, n) if((A)&&(n)>0){for(int in=0; A&&in<n; in++){scellfree(A[in]);};free(A);A=NULL;} |
#define | cfree(A) if(A){cfree_do(A);A=NULL;} |
#define | ccellfree(A) if(A){cellfree_do(A);A=NULL;} |
#define | ccellfreearr(A, n) if((A)&&(n)>0){for(int in=0; A&&in<n; in++){ccellfree(A[in]);};free(A);A=NULL;} |
#define | zfree(A) if(A){zfree_do(A);A=NULL;} |
#define | zcellfree(A) if(A){cellfree_do(A);A=NULL;} |
#define | lfree(A) if(A){lfree_do(A);A=NULL;} |
#define | lcellfree(A) if(A){cellfree_do(A);A=NULL;} |
#define | dspfree(A) if(A){dspfree_do(A); A=NULL;} |
#define | dspcellfree(A) if(A){cellfree_do(A); A=NULL;} |
#define | sspfree(A) if(A){sspfree_do(A); A=NULL;} |
#define | sspcellfree(A) if(A){cellfree_do(A); A=NULL;} |
#define | cspfree(A) if(A){cspfree_do(A); A=NULL;} |
#define | cspcellfree(A) if(A){cellfree_do(A); A=NULL;} |
#define | zspfree(A) if(A){zspfree_do(A); A=NULL;} |
#define | zspcellfree(A) if(A){cellfree_do(A); A=NULL;} |
#define | mapwrite(out, A...) write_by_id(out?out:NULL, M_MAP, A) |
#define | mapread(A...) (map_t*)read_by_id(M_MAP, 0, A) |
#define | mapcellread(A...) (mapcell*)read_by_id(M_MAP, 1, A) |
#define | mapcellnew (mapcell*)cellnew |
#define | mapccellnew (mapccell*)cellnew |
#define | rmapread(A...) (rmap_t*)read_by_id(M_RECTMAP, 0, A) |
#define | rmapwrite(out, A...) write_by_id(out?out:NULL, M_RECTMAP, A) |
#define | rmapcellnew (rmapcell*)cellnew |
#define | rmapccellnew (rmapccell*)cellnew |
#define | locwrite(out, A...) write_by_id(out?out:NULL, M_LOC, A) |
#define | locread(A...) (loc_t*)read_by_id(M_LOC, 0, A) |
#define | loccellread(A...) (loccell*)read_by_id(M_LOC, 1, A) |
#define | loccellnew (loccell*)cellnew |
#define | locccellnew (locccell*)cellnew |
#define | dread(A...) dmat_cast(read_by_id(M_REAL, 0, A)) |
#define | dcellnew (dcell*)cellnew |
#define | dccellnew (dccell*)cellnew |
#define | dcellreaddata(fp, header) dcell_cast(readdata_by_id(fp, M_REAL, 1, header)) |
#define | dcellread(A...) (dcell*)read_by_id(M_REAL, 1, A) |
#define | dccellread(A...) (dccell*)read_by_id(M_REAL, 2, A) |
#define | dcccellread(A...) (dcccell*)read_by_id(M_REAL, 3, A) |
#define | sread(A...) smat_cast(read_by_id(M_FLT, 0, A)) |
#define | scellnew (scell*)cellnew |
#define | sccellnew (sccell*)cellnew |
#define | scellreaddata(fp, header) scell_cast(readdata_by_id(fp, M_FLT, 1, header)) |
#define | scellread(A...) (scell*)read_by_id(M_FLT, 1, A) |
#define | sccellread(A...) (sccell*)read_by_id(M_FLT, 2, A) |
#define | scccellread(A...) (scccell*)read_by_id(M_FLT, 3, A) |
#define | cread(A...) cmat_cast(read_by_id(M_COMP, 0, A)) |
#define | ccellnew (ccell*)cellnew |
#define | cccellnew (cccell*)cellnew |
#define | ccellreaddata(fp, header) ccell_cast(readdata_by_id(fp, M_COMP, 1, header)) |
#define | ccellread(A...) (ccell*)read_by_id(M_COMP, 1, A) |
#define | cccellread(A...) (cccell*)read_by_id(M_COMP, 2, A) |
#define | ccccellread(A...) (ccccell*)read_by_id(M_COMP, 3, A) |
#define | zread(A...) zmat_cast(read_by_id(M_ZMP, 0, A)) |
#define | zcellnew (zcell*)cellnew |
#define | zccellnew (zccell*)cellnew |
#define | zcellreaddata(fp, header) zcell_cast(readdata_by_id(fp, M_ZMP, 1, header)) |
#define | zcellread(A...) (zcell*)read_by_id(M_ZMP, 1, A) |
#define | zccellread(A...) (zccell*)read_by_id(M_ZMP, 2, A) |
#define | zcccellread(A...) (zcccell*)read_by_id(M_ZMP, 3, A) |
#define | lread(A...) lmat_cast(read_by_id(M_LONG, 0, A)) |
#define | lcellnew (lcell*)cellnew |
#define | lccellnew (lccell*)cellnew |
#define | lcellreaddata(fp, header) lcell_cast(readdata_by_id(fp, M_LONG, 1, header)) |
#define | lcellread(A...) (lcell*)read_by_id(M_LONG, 1, A) |
#define | lccellread(A...) (lccell*)read_by_id(M_LONG, 2, A) |
#define | lcccellread(A...) (lcccell*)read_by_id(M_LONG, 3, A) |
#define | dspread(A...) dsp_cast(read_by_id(M_DSP, 0, A)) |
#define | dspcellread(A...) dspcell_cast(read_by_id(M_DSP, 1, A)) |
#define | sspread(A...) ssp_cast(read_by_id(M_SSP, 0, A)) |
#define | sspcellread(A...) sspcell_cast(read_by_id(M_SSP, 1, A)) |
#define | cspread(A...) csp_cast(read_by_id(M_CSP, 0, A)) |
#define | cspcellread(A...) cspcell_cast(read_by_id(M_CSP, 1, A)) |
#define | zspread(A...) zsp_cast(read_by_id(M_ZSP, 0, A)) |
#define | zspcellread(A...) zspcell_cast(read_by_id(M_ZSP, 1, A)) |
#define | dspcellnew (dspcell*)cellnew |
#define | dspccellnew (dspccell*)cellnew |
#define | cspcellnew (cspcell*)cellnew |
#define | cspccellnew (cspccell*)cellnew |
#define | dcellresize(A, nx, ny) cellresize(A,nx,ny) |
Functions | |
void | fft_threads (long nx, long ny) |
Includes macro definitions for all types.
#define dfree | ( | A | ) | if(A){dfree_do(A);A=NULL;} |
free a dmat and zero the pointer.
#define sfree | ( | A | ) | if(A){sfree_do(A);A=NULL;} |
free a smat and zero the pointer.
#define cfree | ( | A | ) | if(A){cfree_do(A);A=NULL;} |
free a cmat and zero the pointer.
#define zfree | ( | A | ) | if(A){zfree_do(A);A=NULL;} |
free a zmat and zero the pointer.
#define lfree | ( | A | ) | if(A){lfree_do(A);A=NULL;} |
free a lmat and zero the pointer.
#define dspfree | ( | A | ) | if(A){dspfree_do(A); A=NULL;} |
free a dsp and zero the pointer
#define sspfree | ( | A | ) | if(A){sspfree_do(A); A=NULL;} |
free a ssp and zero the pointer
#define cspfree | ( | A | ) | if(A){cspfree_do(A); A=NULL;} |
free a ssp and zero the pointer
#define zspfree | ( | A | ) | if(A){zspfree_do(A); A=NULL;} |
free a zsp and zero the pointer
#define dread | ( | A... | ) | dmat_cast(read_by_id(M_REAL, 0, A)) |
read a dmat
#define sread | ( | A... | ) | smat_cast(read_by_id(M_FLT, 0, A)) |
read a smat
#define cread | ( | A... | ) | cmat_cast(read_by_id(M_COMP, 0, A)) |
read a cmat
#define zread | ( | A... | ) | zmat_cast(read_by_id(M_ZMP, 0, A)) |
read a cmat
#define lread | ( | A... | ) | lmat_cast(read_by_id(M_LONG, 0, A)) |
read a lmat
#define dspread | ( | A... | ) | dsp_cast(read_by_id(M_DSP, 0, A)) |
read a dsp
#define cspread | ( | A... | ) | csp_cast(read_by_id(M_CSP, 0, A)) |
read a zsp