![]() |
MAOS
Multithreaded Adaptive Optics Simulator
|
Macros | |
#define | cellfree(A) if(A){cellfree_do(A); A=NULL;} |
#define | writebin_async(A, ncol) writecell_async(A, ncol) |
Functions | |
cell * | cellnew (long nx, long ny) |
cell * | cellref (const_anyarray in) |
Construct a reference base on type. | |
uint32_t | cellhash (const_anyarray A, uint32_t key) |
cell * | cellconvert (cell *A, cell *(*fun_convert)(cell *)) |
Convert elements of cell array. | |
void | cellinit (panyarray A, long nx, long ny) |
void | cellinit2 (panyarray A, const_anyarray B) |
void | celldim (const_anyarray A_, long *nx, long *ny, long **nxs, long **nys) |
void | cellresize (anyarray in, long nx, long ny) |
int | cell_is_diag (const_anyarray A) |
void | cellfree_do (anyarray dc) |
void | writedata (file_t *fd, const_anyarray A, long ncol) |
void | writebin (const_anyarray dc, const char *format,...) |
cell * | readdata (file_t *fp, M_ID id, header_t *header) |
cell * | readbin_id (M_ID id, int level, const char *format,...) |
cell * | readbin (const char *format,...) |
void | writecell_async (const_anyarray A, long ncol) |
void | writebin_header (anyarray dc, const char *keywords, const char *format,...) |
cell * | readsock (int sock) |
void | writesock (const_anyarray dc, int sock) |
Function for a generic cell. use CELL() to case to cell.
check the size of cell array if exist. Otherwise create it
void cellinit2 | ( | panyarray | A_, |
const_anyarray | B_ | ||
) |
check the size of cell array if exist. Otherwise create it. m is created for dcell
Obtain the dimensions.
int cell_is_diag | ( | const_anyarray | A_ | ) |
Check whether the cell has only diagonal entries.
void cellfree_do | ( | anyarray | A_ | ) |
free a mat or cell object.
ncol: 0: normal writing. -1: initialize async data. >0: async writing.
A generic routine for write data to file with separate keywords
cell * readsock | ( | int | sock | ) |
A generic routine for reading data from socket. User need to cast the result. We dup the fd to avoid close it after read.
void writesock | ( | const_anyarray | A, |
int | sock | ||
) |
A generic routine for write data to socket. We dup the fd to avoid close it after read.