Main Page | Files | Data Structures | Functions | Global Variables |
gpiv-utils_alloc.h File Reference

utilities for memory allocation More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

gfloat ** gpiv_matrix (long nr, long nc)
 Allocates memory for 2-dimensional matrix of gfloat data. More...
 
void gpiv_free_matrix (gfloat **m)
 Frees memory for 2-dimensional array of gfloat data. More...
 
gfloat ** gpiv_matrix_index (const long nrl, const long nrh, const long ncl, const long nch)
 Allocates memory for 2-dimensional matrix of gfloat data with subscript range v[nrl..nrh][ncl..nch]. More...
 
void gpiv_free_matrix_index (gfloat **m, const long nrl, const long nrh, const long ncl, const long nch)
 Frees memory for 2-dimensional array of gfloat data with subscript range v[nrl..nrh][ncl..nch]. More...
 
guchar ** gpiv_ucmatrix (const long nr, const long nc)
 Allocates memory for 2-dimensional matrix of guchar data. More...
 
void gpiv_free_ucmatrix (guchar **m)
 Frees memory for 2-dimensional array of guchar data. More...
 
guint8 ** gpiv_matrix_guint8 (const long nr, const long nc)
 Allocates a guint8 matrix with subscript range m[0..nr][0..nc]. More...
 
void gpiv_free_matrix_guint8 (guint8 **m)
 Frees a guint8 matrix allocated by gpiv_matrix_guint8. More...
 
guint16 ** gpiv_matrix_guint16 (const long nr, const long nc)
 Allocates a guint16 matrix with subscript range m[0..nr][0..nc]. More...
 
void gpiv_free_matrix_guint16 (guint16 **m)
 Frees a guint16 matrix allocated by gpiv_matrix_guint16. More...
 
gint ** gpiv_imatrix_index (const long nrl, const long nrh, const long ncl, const long nch)
 Allocates memory for 2-dimensional matrix of integer data with subscript range v[nrl..nrh][ncl..nch]. More...
 
void gpiv_free_imatrix_index (gint **m, const long nrl, const long nrh, const long ncl, const long nch)
 Frees memory for 2-dimensional array of integer data with subscript range v[nrl..nrh][ncl..nch]. More...
 
gint ** gpiv_imatrix (const long nr, const long nc)
 Allocates memory for 2-dimensional matrix of integer data depreciated, use gpiv_imatrix_index instead. More...
 
void gpiv_free_imatrix (gint **m)
 Frees memory for 2-dimensional array of integer data unappreciated, use gpiv_free_imatrix_index instead. More...
 
double ** gpiv_double_matrix (const glong nr, const glong nc)
 Allocates a contiguous 2-dimensional double matrix of nr x nc. More...
 
void gpiv_free_double_matrix (double **m)
 Frees a double matrix allocated by gpiv_double_matrix() More...
 
fftw_real ** gpiv_fftw_real_matrix (glong nr, glong nc)
 Allocates a contiguous 2-dimensional fftw_real_matrix matrix of nr x nc. More...
 
void gpiv_free_fftw_real_matrix (fftw_real **m)
 Frees a gdouble matrix allocated by gpiv_fftw_real_matrix_matrix() More...
 
fftw_complex ** gpiv_fftw_complex_matrix (const long nr, const long nc)
 Allocates a contiguous 2-dimensional fftw_complex matrix of nr x nc. More...
 
void gpiv_free_fftw_complex_matrix (fftw_complex **m)
 Frees a fftw_real matrix allocated by gpiv_fftw_complex_matrix() More...
 
gfloat * gpiv_vector (const long nl)
 Allocates memory for a 1-dimensional vector of gfloat data. More...
 
void gpiv_free_vector (gfloat *vector)
 Frees memory for a 1-dimensional vector of gfloat data. More...
 
gfloat * gpiv_vector_index (const long nl, const long nh)
 Allocates memory for a 1-dimensional vector of gfloat data with subscript range v[nl..nh]. More...
 
void gpiv_free_vector_index (gfloat *vector, const long nl, const long nh)
 Frees memory for a 1-dimensional vector of gfloat data with subscript range v[nrl..nrh][ncl..nch]. More...
 
gdouble * gpiv_dvector (const glong nl)
 Allocates memory for a 1-dimensional vector of gdouble data. More...
 
void gpiv_free_dvector (gdouble *vector)
 Frees memory for a 1-dimensional vector of double data. More...
 
gdouble * gpiv_dvector_index (const long nl, const long nh)
 Allocates memory for a 1-dimensional vector of double data with subscript range v[nl..nh]. More...
 
void gpiv_free_dvector_index (gdouble *vector, const long nl, const long nh)
 Frees memory for a 1-dimensional vector of double data with subscript range v[nrl..nrh][ncl..nch]. More...
 
long * gpiv_nulvector (long nl)
 Allocates memory for a 1-dimensional vector of long data. More...
 
void gpiv_free_nulvector (long *vector)
 Frees memory for a 1-dimensional vector of long data. More...
 
long * gpiv_nulvector_index (const long nl, const long nh)
 Allocates memory for a 1-dimensional vector of long data with subscript range v[nl..nh]. More...
 
void gpiv_free_nulvector_index (long *vector, const long nl, const long nh)
 Frees memory for a 1-dimensional vector of long data with subscript range v[nrl..nrh][ncl..nch]. More...
 
unsigned long * gpiv_ulvector (const long nl)
 Allocates memory for a 1-dimensional vector of unsigned long data. More...
 
void gpiv_free_ulvector (unsigned long *vector)
 Frees memory for a 1-dimensional vector of unsigned long data. More...
 
unsigned long * gpiv_ulvector_index (const long nl, const long nh)
 Allocates memory for a 1-dimensional vector of unsigned long data with subscript range v[nl..nh]. More...
 
void gpiv_free_ulvector_index (unsigned long *vector, const long nl, const long nh)
 Frees memory for a 1-dimensional vector of unsigned long data with subscript range v[nrl..nrh][ncl..nch]. More...
 
gint * gpiv_ivector (const long nl)
 Allocates memory for a 1-dimensional vector of integer data. More...
 
void gpiv_free_ivector (gint *vector)
 Frees memory for a 1-dimensional vector of integer data. More...
 
gint * gpiv_ivector_index (const long nl, const long nh)
 Allocates memory for a 1-dimensional vector of integer data with subscript range v[nl..nh]. More...
 
void gpiv_free_ivector_index (gint *vector, const long nl, const long nh)
 Frees memory for a 1-dimensional vector of integer data with subscript range v[nrl..nrh][ncl..nch]. More...
 
gboolean * gpiv_gbolvector (const glong nl)
 Allocates memory for a 1-dimensional vector of gboolean data. More...
 
void gpiv_free_gbolvector (gboolean *vector)
 Frees memory for a 1-dimensional vector of gboolean data. More...
 

Detailed Description

utilities for memory allocation

SOURCES: lib/utils_alloc.c

LAST MODIFICATION DATE:

Id
gpiv-utils_alloc.h,v 1.1 2007-11-23 16:12:18 gerber Exp

Definition in file gpiv-utils_alloc.h.

Function Documentation

◆ gpiv_double_matrix()

double** gpiv_double_matrix ( const glong  nr,
const glong  nc 
)

Allocates a contiguous 2-dimensional double matrix of nr x nc.

Parameters
[in]nrnumber of rows
[in]ncnumber of columns
Returns
matrix

◆ gpiv_dvector()

gdouble* gpiv_dvector ( const glong  nl)

Allocates memory for a 1-dimensional vector of gdouble data.

Parameters
[in]nlvector length
Returns
vector

◆ gpiv_dvector_index()

gdouble* gpiv_dvector_index ( const long  nl,
const long  nh 
)

Allocates memory for a 1-dimensional vector of double data with subscript range v[nl..nh].

Parameters
[in]nllowest index number
[in]nhhighest index number
Returns
vector

◆ gpiv_fftw_complex_matrix()

fftw_complex** gpiv_fftw_complex_matrix ( const long  nr,
const long  nc 
)

Allocates a contiguous 2-dimensional fftw_complex matrix of nr x nc.

Parameters
[in]nrnumber of rows
[in]ncnumber of columns
Returns
matrix

◆ gpiv_fftw_real_matrix()

fftw_real** gpiv_fftw_real_matrix ( glong  nr,
glong  nc 
)

Allocates a contiguous 2-dimensional fftw_real_matrix matrix of nr x nc.

Parameters
[in]nrnumber of rows
[in]ncnumber of columns
Returns
matrix

◆ gpiv_free_double_matrix()

void gpiv_free_double_matrix ( double **  m)

Frees a double matrix allocated by gpiv_double_matrix()

Parameters
[in]mmatrix
Returns
void

◆ gpiv_free_dvector()

void gpiv_free_dvector ( gdouble *  vector)

Frees memory for a 1-dimensional vector of double data.

Parameters
[in]vectorvector of 1-dimensional gfloat data
Returns
void

◆ gpiv_free_dvector_index()

void gpiv_free_dvector_index ( gdouble *  vector,
const long  nl,
const long  nh 
)

Frees memory for a 1-dimensional vector of double data with subscript range v[nrl..nrh][ncl..nch].

Parameters
[in]vectorvector of 1-dimensional gfloat data
[in]nllowest index number
[in]nhhighest index number
Returns
void

◆ gpiv_free_fftw_complex_matrix()

void gpiv_free_fftw_complex_matrix ( fftw_complex **  m)

Frees a fftw_real matrix allocated by gpiv_fftw_complex_matrix()

Parameters
[in]mmatrix
Returns
void

◆ gpiv_free_fftw_real_matrix()

void gpiv_free_fftw_real_matrix ( fftw_real **  m)

Frees a gdouble matrix allocated by gpiv_fftw_real_matrix_matrix()

Parameters
[in]mmatrix
Returns
void

◆ gpiv_free_gbolvector()

void gpiv_free_gbolvector ( gboolean *  vector)

Frees memory for a 1-dimensional vector of gboolean data.

Parameters
[in]vectorvector of 1-dimensional boolean data
Returns
void

◆ gpiv_free_imatrix()

void gpiv_free_imatrix ( gint **  m)

Frees memory for 2-dimensional array of integer data unappreciated, use gpiv_free_imatrix_index instead.

Parameters
[in]mmatrix
Returns
void

◆ gpiv_free_imatrix_index()

void gpiv_free_imatrix_index ( gint **  m,
const long  nrl,
const long  nrh,
const long  ncl,
const long  nch 
)

Frees memory for 2-dimensional array of integer data with subscript range v[nrl..nrh][ncl..nch].

Parameters
[in]mmatrix
[in]nrllowest row index number
[in]nrhhighest row index number
[in]ncllowest column index number
[in]nchhighest column index number
Returns
void

◆ gpiv_free_ivector()

void gpiv_free_ivector ( gint *  vector)

Frees memory for a 1-dimensional vector of integer data.

Parameters
[in]vectorvector of 1-dimensional gfloat data
Returns
void

◆ gpiv_free_ivector_index()

void gpiv_free_ivector_index ( gint *  vector,
const long  nl,
const long  nh 
)

Frees memory for a 1-dimensional vector of integer data with subscript range v[nrl..nrh][ncl..nch].

Parameters
[in]vectorvector of 1-dimensional gfloat data
[in]nllowest index number
[in]nhhighest index number
Returns
void

◆ gpiv_free_matrix()

void gpiv_free_matrix ( gfloat **  m)

Frees memory for 2-dimensional array of gfloat data.

Parameters
[in]mmatrix
Returns
void

◆ gpiv_free_matrix_guint16()

void gpiv_free_matrix_guint16 ( guint16 **  m)

Frees a guint16 matrix allocated by gpiv_matrix_guint16.

Parameters
[in]mmatrix
Returns
void

◆ gpiv_free_matrix_guint8()

void gpiv_free_matrix_guint8 ( guint8 **  m)

Frees a guint8 matrix allocated by gpiv_matrix_guint8.

Parameters
[in]mmatrix
Returns
void

◆ gpiv_free_matrix_index()

void gpiv_free_matrix_index ( gfloat **  m,
const long  nrl,
const long  nrh,
const long  ncl,
const long  nch 
)

Frees memory for 2-dimensional array of gfloat data with subscript range v[nrl..nrh][ncl..nch].

Parameters
[in]mmatrix
[in]nrllowest row index number
[in]nrhhighest row index number
[in]ncllowest column index number
[in]nchhighest column index number
Returns
void

◆ gpiv_free_nulvector()

void gpiv_free_nulvector ( long *  vector)

Frees memory for a 1-dimensional vector of long data.

Parameters
[in]vectorvector of 1-dimensional gfloat data
Returns
void

◆ gpiv_free_nulvector_index()

void gpiv_free_nulvector_index ( long *  vector,
const long  nl,
const long  nh 
)

Frees memory for a 1-dimensional vector of long data with subscript range v[nrl..nrh][ncl..nch].

Parameters
[in]vectorvector of 1-dimensional gfloat data
[in]nllowest index number
[in]nhhighest index number
Returns
void

◆ gpiv_free_ucmatrix()

void gpiv_free_ucmatrix ( guchar **  m)

Frees memory for 2-dimensional array of guchar data.

Parameters
[in]mmatrix
Returns
void

◆ gpiv_free_ulvector()

void gpiv_free_ulvector ( unsigned long *  vector)

Frees memory for a 1-dimensional vector of unsigned long data.

Parameters
[in]vectorvector of 1-dimensional gfloat data
Returns
void

◆ gpiv_free_ulvector_index()

void gpiv_free_ulvector_index ( unsigned long *  vector,
const long  nl,
const long  nh 
)

Frees memory for a 1-dimensional vector of unsigned long data with subscript range v[nrl..nrh][ncl..nch].

Parameters
[in]vectorvector of 1-dimensional gfloat data
[in]nllowest index number
[in]nhhighest index number
Returns
void

◆ gpiv_free_vector()

void gpiv_free_vector ( gfloat *  vector)

Frees memory for a 1-dimensional vector of gfloat data.

Parameters
[in]vectorvector of 1-dimensional gfloat data
Returns
void

◆ gpiv_free_vector_index()

void gpiv_free_vector_index ( gfloat *  vector,
const long  nl,
const long  nh 
)

Frees memory for a 1-dimensional vector of gfloat data with subscript range v[nrl..nrh][ncl..nch].

Parameters
[in]vectorvector of 1-dimensional gfloat data
[in]nllowest index number
[in]nhhighest index number
Returns
void

◆ gpiv_gbolvector()

gboolean* gpiv_gbolvector ( const glong  nl)

Allocates memory for a 1-dimensional vector of gboolean data.

Parameters
[in]nlvector length
Returns
vector

◆ gpiv_imatrix()

gint** gpiv_imatrix ( const long  nr,
const long  nc 
)

Allocates memory for 2-dimensional matrix of integer data depreciated, use gpiv_imatrix_index instead.

Parameters
[in]nrnumber of rows
[in]ncnumber of columns
Returns
matrix

◆ gpiv_imatrix_index()

gint** gpiv_imatrix_index ( const long  nrl,
const long  nrh,
const long  ncl,
const long  nch 
)

Allocates memory for 2-dimensional matrix of integer data with subscript range v[nrl..nrh][ncl..nch].

Parameters
[in]nrllowest row index number
[in]nrhhighest row index number
[in]ncllowest column index number
[in]nchhighest column index number
Returns
matrix

◆ gpiv_ivector()

gint* gpiv_ivector ( const long  nl)

Allocates memory for a 1-dimensional vector of integer data.

Parameters
[in]nlvector length
Returns
vector

◆ gpiv_ivector_index()

gint* gpiv_ivector_index ( const long  nl,
const long  nh 
)

Allocates memory for a 1-dimensional vector of integer data with subscript range v[nl..nh].

Parameters
[in]nllowest index number
[in]nhhighest index number
Returns
vector

◆ gpiv_matrix()

gfloat** gpiv_matrix ( long  nr,
long  nc 
)

Allocates memory for 2-dimensional matrix of gfloat data.

Parameters
[in]nrnumber of rows
[in]ncnumber of columns
Returns
matrix

◆ gpiv_matrix_guint16()

guint16** gpiv_matrix_guint16 ( const long  nr,
const long  nc 
)

Allocates a guint16 matrix with subscript range m[0..nr][0..nc].

Parameters
[in]nrnumber of rows
[in]ncnumber of columns
Returns
matrix

◆ gpiv_matrix_guint8()

guint8** gpiv_matrix_guint8 ( const long  nr,
const long  nc 
)

Allocates a guint8 matrix with subscript range m[0..nr][0..nc].

Parameters
[in]nrnumber of rows
[in]ncnumber of columns
Returns
matrix

◆ gpiv_matrix_index()

gfloat** gpiv_matrix_index ( const long  nrl,
const long  nrh,
const long  ncl,
const long  nch 
)

Allocates memory for 2-dimensional matrix of gfloat data with subscript range v[nrl..nrh][ncl..nch].

Parameters
[in]nrllowest row index number
[in]nrhhighest row index number
[in]ncllowest column index number
[in]nchhighest column index number
Returns
2-dimensional array

◆ gpiv_nulvector()

long* gpiv_nulvector ( long  nl)

Allocates memory for a 1-dimensional vector of long data.

Parameters
[in]nlvector length
Returns
vector

◆ gpiv_nulvector_index()

long* gpiv_nulvector_index ( const long  nl,
const long  nh 
)

Allocates memory for a 1-dimensional vector of long data with subscript range v[nl..nh].

Parameters
[in]nllowest index number
[in]nhhighest index number
Returns
vector

◆ gpiv_ucmatrix()

guchar** gpiv_ucmatrix ( const long  nr,
const long  nc 
)

Allocates memory for 2-dimensional matrix of guchar data.

Parameters
[in]nrrow index
[in]nccolumn index
Returns
matrix

◆ gpiv_ulvector()

unsigned long* gpiv_ulvector ( const long  nl)

Allocates memory for a 1-dimensional vector of unsigned long data.

Parameters
[in]nlvector length
Returns
vector

◆ gpiv_ulvector_index()

unsigned long* gpiv_ulvector_index ( const long  nl,
const long  nh 
)

Allocates memory for a 1-dimensional vector of unsigned long data with subscript range v[nl..nh].

Parameters
[in]nllowest index number
[in]nhhighest index number
Returns
vector

◆ gpiv_vector()

gfloat* gpiv_vector ( const long  nl)

Allocates memory for a 1-dimensional vector of gfloat data.

Parameters
[in]nlvector length
Returns
vector

◆ gpiv_vector_index()

gfloat* gpiv_vector_index ( const long  nl,
const long  nh 
)

Allocates memory for a 1-dimensional vector of gfloat data with subscript range v[nl..nh].

Parameters
[in]nllowest index number
[in]nhhighest index number
Returns
vector

Generated for libgpiv-0.6.1 by doxygen 1.8.13