MAOS
Multithreaded Adaptive Optics Simulator
Loading...
Searching...
No Matches
zmath.h File Reference

Macros

#define AOS_LIB_TYPE
#define AOS_SMAT(A)
#define AOS_ZMAT(A)

Typedefs

typedef fcomplex(* zminsearch_fun) (const fcomplex *x, void *info)

Functions

zmat * znew (long nx, long ny)
zmat * znew_file (long nx, long ny, const char *keywords, const char *format,...)
zmat * znew_do (long nx, long ny, fcomplex *p, mem_t *mem)
zmat * zmat_cast (const_anyarray A)
int zinit (zmat **A, long nx, long ny)
void zfree_content (zmat *A)
void zfree_do (zmat *A)
zmat * zref (const zmat *in)
zmat * zref_reshape (const zmat *in, long nx, long ny)
zmat * zrefcols (const zmat *in, long icol, long ncol)
void zcols (zmat *out, const zmat *in, long icol, long ncol)
int zresize (zmat *A, long nx, long ny)
zmat * zsub (const zmat *in, long sx, long nx, long sy, long ny)
zmat * zcat (const zmat *in1, const zmat *in2, int dim)
zmat * zdup (const zmat *in)
void zzero (zmat *A)
int zzerocol (zmat *A, int icol)
uint32_t zhash (const zmat *A, uint32_t key)
void zcp (zmat **out0, const zmat *in)
zmat * ztrans (const zmat *A)
void zset (zmat *A, const fcomplex val)
void zshow (const zmat *A, const char *format,...)
void zshow_diag (const zmat *A, const char *format,...)
void zvecperm (zmat *out, const zmat *in, const long *perm)
void zvecpermi (zmat *out, const zmat *in, const long *perm)
int zflip (zmat *A, int axis)
fcomplex zvecsum (const fcomplex *__restrict p, long np)
fcomplex zsum (const zmat *A)
void znormalize_sum (zmat *A, fcomplex sum)
void znormalize_sumabs (zmat *A, float sum)
fcomplex zmean (const zmat *A)
fcomplex ztrace (const zmat *A)
void zsort (zmat *A, int ascend)
void zvecmaxmin (const fcomplex *__restrict p, long N, float *max, float *min)
fcomplex zvecdot (const fcomplex *__restrict p1, const fcomplex *__restrict p2, const float *__restrict p3, long n)
void zvecnormalize_sum (fcomplex *__restrict p, long nloc, fcomplex norm)
void zvecnormalize_sumabs (fcomplex *__restrict p, long nloc, fcomplex norm)
float zvecmaxabs (const fcomplex *__restrict p, long n)
void zmaxmin (const zmat *A, float *max, float *min)
float zmax (const zmat *A)
float zmaxabs (const zmat *A)
float zmin (const zmat *A)
float zsumabs (const zmat *in)
float zsumsq (const zmat *in)
float zsumdiffsq (const zmat *A, const zmat *B)
zmat * zunique (const zmat *input, int ascend)
void zfftshift (zmat *A)
int zcpcorner2center (zmat *A, const zmat *B)
int zshift (zmat **B0, const zmat *A, int sx, int sy)
zcell * zcell_cast (const cell *A)
zcell * zcellnew2 (const zcell *A)
zcell * zcellnew3 (long nx, long ny, long *nnx, long *nny)
zcell * zcellnew_same (long nx, long ny, long mx, long my)
zcell * zcellnew_file (long nx, long ny, long *nnx, long *nny, const char *keywords, const char *format,...)
zcell * zcellnewsame_file (long nx, long ny, long mx, long my, const char *keywords, const char *format,...)
void zcellzero (zcell *dc)
void zcellset (zcell *dc, fcomplex alpha)
zcell * zcelltrans (const zcell *A)
zcell * zcellref (const zcell *in)
zcell * zcelldup (const zcell *in)
void zcellcp (zcell **out0, const zcell *in)
zcell * zcellreduce (const zcell *A, int dim)
zcell * zcellcat (const zcell *A, const zcell *B, int dim)
void zcellcat2 (zcell **A, const zcell *B, int dim)
zcell * zcellcat_each (const zcell *A, const zcell *B, int dim)
zcell * z2cellref (const zmat *A, long *dims, long ndim)
void z2cell (zcell **B, const zmat *A, const zcell *ref)
zmat * zcell_col (zcell *input, long icol)
fcomplex zcellsum (const zcell *A)
zmat * zcellsum_each (const zcell *A)
int zisnan (const zmat *A)
float znorm (const zmat *in)
float zstd (const zmat *in)
void zrandu (zmat *A, const fcomplex mean, rand_t *rstat)
void zrandn (zmat *A, const fcomplex sigma, rand_t *rstat)
void zscale (zmat *A, float w)
fcomplex zdot (const zmat *A, const zmat *B)
fcomplex zwdot (const fcomplex *a, const zmat *w, const fcomplex *b)
void zcwm (zmat *A, const zmat *B)
void zcwm2 (zmat *A, const zmat *B1, float wt1, const zmat *B2, float wt2)
void zcwm3 (zmat *__restrict A, const zmat *__restrict W, const zmat *__restrict B1, const float wt1, const zmat *__restrict B2, const float wt2)
void zcwmcol (zmat *__restrict A, const zmat *__restrict B)
void zcwmrow (zmat *__restrict A, const zmat *__restrict B)
void zcwdiv (zmat *B, const zmat *A, fcomplex value)
void zmulvec (fcomplex *__restrict y, const zmat *__restrict A, const fcomplex *__restrict x, const fcomplex alpha)
void zmm (zmat **C0, const fcomplex beta, const zmat *A, const zmat *B, const char trans[2], const fcomplex alpha)
void zmm3 (zmat **pout, fcomplex beta, const zmat *A, const zmat *B, const zmat *C, const char trans[4], fcomplex alpha)
void zinvspd_inplace (zmat *A)
zmat * zinvspd (const zmat *A)
void zinv_inplace (zmat *A)
zmat * zinv (const zmat *A)
zmat * zchol (const zmat *A)
zmat * zmcc (const zmat *A, const zmat *wt)
zmat * zimcc (const zmat *A, const zmat *wt)
zmat * ztmcc (const zmat *A, const zmat *wt)
zmat * zpinv2 (const zmat *A, const_anyarray W, float thres1, float thres2)
zmat * zpinv (const zmat *A, const_anyarray W)
fcomplex zdiff (const zmat *A, const zmat *B)
int zcircle (zmat *A, float cx, float cy, float dx, float dy, float r, fcomplex val)
int zrectangle (zmat *A, float cx, float cy, float rx, float ry, float theta, fcomplex val)
void zrotvec (zmat *A, const float theta)
void zrotvect (zmat *A, const float theta)
void zrotvecnn (zmat **B0, const zmat *A, float theta)
void zmulvec3 (fcomplex *y, const zmat *A, const fcomplex *x)
void zcorr (zmat **corr, const zmat *A, const zmat *B)
void zpara3 (float *grad, const zmat *corr)
void zcog (float *grad, const zmat *i0, float offsetx, float offsety, float thres, float bkgrnd, float flux, const zmat *mask)
void zshift2center (zmat *A, float offsetx, float offsety)
int zclip (zmat *A, float min, float max)
void zgramschmidt (zmat *Mod, float *amp)
void zmuldiag (zmat *A, const smat *s)
void zcwpow (zmat *A, float power)
void zcwexp (zmat *A, float alpha)
void zcwpow_thres (zmat *A, float power, float thres)
void zsvd (zmat **U, smat **Sdiag, zmat **VT, const zmat *A)
void zsvd_cache (zmat **U, smat **Sdiag, zmat **VT, const zmat *A)
void zsvd_pow2 (zmat *A, float power, float thres1, float thres2)
void zsvd_pow (zmat *A, float power)
void zexpm (zmat **out, float alpha, const zmat *A, float beta)
void zpolyval (zmat *A, smat *p)
void zaddI (zmat *A, fcomplex val)
void zadd (zmat **B0, fcomplex bc, const zmat *A, const fcomplex ac)
void zadd_relax (zmat **B0, fcomplex bc, const zmat *A, const fcomplex ac)
void zaddcol (zmat *B, long icol, fcomplex bc, const zmat *A, const fcomplex ac)
void zadds (zmat *A, const fcomplex ac)
zmat * zlogspace (float emin, float emax, long n)
zmat * zlinspace (float min, float dx, long n)
zmat * zinterp1 (const zmat *xin, const zmat *yin, const zmat *xnew, fcomplex y0)
zmat * zinterp1_2 (const zmat *xyin, const zmat *xnew)
zmat * zinterp1linear (const zmat *xin, const zmat *yin, const zmat *xnew, fcomplex y0)
zmat * zinterp1log (const zmat *xin, const zmat *yin, const zmat *xnew, fcomplex y0)
void zblend (zmat *__restrict A, zmat *__restrict B, int overlap)
void zhistfill (zmat **out, const zmat *A, float center, float spacing, int n)
zmat * zspline_prep (zmat *x, zmat *y)
zmat * zspline_eval (zmat *coeff, zmat *x, zmat *xnew)
zmat * zspline (zmat *x, zmat *y, zmat *xnew)
void zcwlog10 (zmat *A)
void zcwlog (zmat *A)
void zembed (zmat *__restrict A, const zmat *__restrict B, const float theta)
void zembedd (zmat *__restrict A, const smat *__restrict B, const float theta)
float zfwhm (zmat *A)
void zgauss_fit (float *mr, float *ma, float *mb, float *theta, float *amp, zmat **img, zmat *A, float thres)
float zgauss_sigma (zmat *A, float thres)
float zfwhm_gauss (zmat *A)
zmat * zenc (const zmat *A, const zmat *dvec, int type, int nthread)
int zminsearch (fcomplex *x, int nmod, fcomplex ftol, int nmax, zminsearch_fun fun, void *info)
void zbessik (fcomplex x, fcomplex xnu, fcomplex *ri, fcomplex *rk, fcomplex *rip, fcomplex *rkp)
fcomplex ztrapz (const zmat *x, const zmat *y)
float zcellnorm (const zcell *in)
void zcellscale (anyarray A, float w)
void zcelldropempty (zcell **A0, int dim)
fcomplex zcelldot (const zcell *A, const zcell *B)
void zcellcwm (zcell *B, const zcell *A)
zcell * zcellinvspd (zcell *A)
zcell * zcellinv (zcell *A)
zcell * zcellinvspd_each (zcell *A)
zcell * zcellpinv2 (const zcell *A, const_anyarray W, float thres1, float thres2)
zcell * zcellpinv (const zcell *A, const_anyarray W)
void zcellsvd_pow2 (zcell *A, float power, float thres1, float thres2)
void zcellsvd_pow (zcell *A, float power)
void zcellcwpow (zcell *A, float power)
void zcelldropzero (zcell *B, float thres)
float zcelldiff (const zcell *A, const zcell *B)
int zcellclip (zcell *Ac, float min, float max)
zcell * zcellsub (const zcell *in, long sx, long nx, long sy, long ny)
zcell * zbspline_prep (zmat *x, zmat *y, zmat *z)
zmat * zbspline_eval (zcell *coeff, zmat *x, zmat *y, zmat *xnew, zmat *ynew)
void zmaprot (anyarray A_, real theta)
void zcwmc (zmat *__restrict A, const zmat *__restrict B)
void zcwmd (zmat *__restrict A, const smat *__restrict B)
void zembed_wvf (zmat *__restrict A, const float *opd, const float *amp, const int nopdx, const int nopdy, const float wvl, const float theta)
void zembedc_flag (zmat *__restrict A, const zmat *__restrict B, const float theta, CEMBED flag)
void zcpcorner (zmat *A, const zmat *__restrict B, CEMBED flag)
void zabstoreal (zmat *A)
void zabs2toreal (zmat *A, float scale)
void zcpd (zmat **__restrict A, const smat *__restrict B)
void zreal2d (smat **__restrict A0, float alpha, const zmat *__restrict B, float beta)
void zimag2d (smat **__restrict A0, float alpha, const zmat *__restrict B, float beta)
void zabs22d (smat **__restrict A0, float alpha, const zmat *__restrict B, float beta)
void zarg2d (smat **__restrict A0, float alpha, const zmat *__restrict B, float beta)
void ztilt2 (zmat *otf, zmat *otfin, float sx, float sy, int peak_corner)
void ztilt (zmat *otf, float sx, float sy, int peak_corner)
void zcogreal (float *grad, const zmat *i0, float offsetx, float offsety, float thres, float bkgrnd)
void zcogabs (float *grad, const zmat *i0, float offsetx, float offsety, float thres, float bkgrnd)
void zwritedata (file_t *fp, const zmat *A, long ncol)
zmat * zreaddata (file_t *fp, header_t *header)
zmat * znew_mmap (long nx, long ny, const char *keywords, const char *format,...)
zcell * zcellnew_mmap (long nx, long ny, long *nnx, long *nny, const char *keywords, const char *format,...)
zcell * zcellnewsame_mmap (long nx, long ny, long mx, long my, const char *keywords, const char *format,...)
zmat * zread_mmap (const char *format,...)
zcell * zcellread_mmap (const char *format,...)
zsp * zspnew (long nx, long ny, long nzmax)
zsp * zspref (const zsp *A)
zsp * zspdup (const zsp *A)
zsp * zspnew2 (const zsp *A)
zsp * zspnewrandu (long nx, long ny, const fcomplex mean, float fill, rand_t *rstat)
void zspsetnzmax (zsp *sp, long nzmax)
zsp * zsp_cast (const cell *A)
void zspfree_do (zsp *sp)
void zspdisp (const zsp *sp)
int zspcheck (const zsp *sp)
void zspscale (zsp *A, const fcomplex beta)
void zspscalex (zsp *A, const zmat *xs)
void zspscaley (zsp *A, const zmat *ys)
zspcell * zspcellref (const zspcell *in)
zspcell * zspcell_cast (const cell *A)
void zspcellscale (zspcell *A, const fcomplex beta)
zsp * zspnewdiag (long N, fcomplex *vec, fcomplex alpha)
zmat * zspdiag (const zsp *A)
void zspmuldiag (zsp *__restrict A, const fcomplex *w, fcomplex alpha)
void zspmv (zmat *y, const zsp *A, const zmat *__restrict x, char trans, fcomplex alpha)
void zspmulcreal (fcomplex *__restrict y, const zsp *A, const fcomplex *__restrict x, float alpha)
void zspmm (zmat **yout, const zsp *A, const zmat *x, const char trans[2], const fcomplex alpha)
void zmulsp (zmat **yout, const zmat *x, const zsp *A, const char trans[2], const fcomplex alpha)
fcomplex zspwdot (const zmat *y, const zsp *A, const zmat *x)
fcomplex zspcellwdot (const zcell *y, const zspcell *A, const zcell *x)
void zcellmm (panyarray C0, const_anyarray A, const_anyarray B, const char trans[2], const float alpha)
zcell * zcellmm2 (const zcell *A, const zcell *B, const char trans[2])
zsp * z2sp (zmat *A, float thres)
void zspfull (zmat **out0, const zsp *A, const char trans, const fcomplex alpha)
void zspcellfull (zcell **out0, const zspcell *A, const char trans, const fcomplex alpha)
zsp * zspadd2 (const zsp *A, fcomplex a, const zsp *B, fcomplex b)
void zspadd (zsp **A0, fcomplex alpha, const zsp *B, fcomplex beta)
void zcelladd (panyarray pA, float ac, const_anyarray B, float bc)
zsp * zspaddI (const zsp *A0, fcomplex alpha)
void zcelladdI (anyarray A, fcomplex alpha)
zsp * zsptrans (const zsp *A)
void zspconj (zsp *)
zsp * zspmulsp (const zsp *A, const zsp *B, const char trans[2])
void zspmulsp2 (zsp **C0, const zsp *A, const zsp *B, const char trans[2], const fcomplex scale)
zspcell * zspcelltrans (const zspcell *spc)
zsp * zspcat (const zsp *A, const zsp *B, int type)
zsp * zspcell2sp (const zspcell *A)
zmat * zspsum (const zsp *A, int col)
zmat * zspsumabs (const zsp *A, int col)
float zsptrace (const zsp *A, float power)
void zspclean (zsp *A)
void zspdroptol (zsp *A, float thres)
void zspcelldroptol (zspcell *A, float thres)
lmat * zspdropemptycol (zsp *A)
void zspsort (zsp *A)
void zspcellsort (zspcell *A)
void zspsym (zsp **A)
void zspcellsym (zspcell **A)
zsp * zspconvolvop (zmat *A)
zsp * zspperm (zsp *A, int reverse, long *pcol, long *prow)
zsp * zspinvbdiag (const zsp *A, long bs)
zcell * zspblockextract (const zsp *A, long bs)
zmat * zcell2m (const_anyarray A)
void zspwritedata (file_t *fp, const zsp *sp)
zsp * zspreaddata (file_t *fp, header_t *header)
void zfft_free_plan (struct fft_t *fft)
void zfft2 (zmat *A, int dir)
void zfft2i (zmat *A, int dir)
void zfft2s (zmat *A, int dir)
void zfft2partial (zmat *A, int ncomp, int dir)
zmat * zffttreat (zmat *A)
void sfft_free_plan (struct fft_t *fft)
void scell_fft2 (scell *dc, int dir)
void sfft1plan_r2hc (smat *out, int dir)
void sfft1 (smat *A, int dir)

Macro Definition Documentation

◆ AOS_SMAT

#define AOS_SMAT ( A)
Value:
s##A

◆ AOS_ZMAT

#define AOS_ZMAT ( A)
Value:
z##A