Xmipp
v3.23.11-Nereus
|
Functions | |
template<class T > | |
void | ask_Tmatrix (T **&m, int nrl, int nrh, int ncl, int nch) |
template<class T > | |
void | free_Tmatrix (T **&m, int nrl, int nrh, int ncl, int nch) |
template<class T > | |
void | ask_Tvolume (T ***&m, int nsl, int nsh, int nrl, int nrh, int ncl, int nch) |
template<class T > | |
void | free_Tvolume (T ***&m, int nsl, int nsh, int nrl, int nrh, int ncl, int nch) |
char * | askMemory (size_t size) |
int | freeMemory (void *ptr, size_t memsize) |
void ask_Tmatrix | ( | T **& | m, |
int | nrl, | ||
int | nrh, | ||
int | ncl, | ||
int | nch | ||
) |
Ask memory for any type matrix. The valid values range from v[nrl][ncl] to v[nrh][nch]. If no memory is available an exception is thrown. NULL is returned if any nh is not greater than its nl
Definition at line 40 of file xmipp_memory.h.
void ask_Tvolume | ( | T ***& | m, |
int | nsl, | ||
int | nsh, | ||
int | nrl, | ||
int | nrh, | ||
int | ncl, | ||
int | nch | ||
) |
Ask memory for any type voliume. The valid values range from v[nsl][nrl][ncl] to v[nsh][nrh][nch]. If no memory is available an exception is thrown. NULL is returned if any nh is not greater than its nl.
Definition at line 78 of file xmipp_memory.h.
char* askMemory | ( | size_t | size | ) |
Allocates memory. Adapted from Bsofts bfree
It is called exactly like malloc, with the following enhancements:
returns char* : a pointer to the memory (NULL on failure)
Definition at line 29 of file xmipp_memory.cpp.
void free_Tmatrix | ( | T **& | m, |
int | nrl, | ||
int | nrh, | ||
int | ncl, | ||
int | nch | ||
) |
Free memory associated to any type matrix. After freeing v=NULL
Definition at line 61 of file xmipp_memory.h.
void free_Tvolume | ( | T ***& | m, |
int | nsl, | ||
int | nsh, | ||
int | nrl, | ||
int | nrh, | ||
int | ncl, | ||
int | nch | ||
) |
Free memory associated to any type volume. After freeing v=NULL
Definition at line 106 of file xmipp_memory.h.
int freeMemory | ( | void * | ptr, |
size_t | memsize | ||
) |
Frees allocated memory. Adapted from Bsofts bfree
It is called exactly like free, with the following enhancements:
returns int: 0 = success, -1 = failure.
Definition at line 50 of file xmipp_memory.cpp.