OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
allocate2d.h
Go to the documentation of this file.
1 
6 #ifndef OEL_UTIL_LIBGENUTILS_ALLOCATE2D_H_
7 #define OEL_UTIL_LIBGENUTILS_ALLOCATE2D_H_
8 
9 #include <stddef.h>
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
28 char **allocate2d_char(size_t h, size_t w);
33 void free2d_char(char **p);
39 void free2d_all_char(char **p, size_t length);
40 
54 unsigned char **allocate2d_uchar(size_t h, size_t w);
59 void free2d_uchar(unsigned char **p);
65 void free2d_all_uchar(unsigned char **p, size_t length);
66 
80 signed char **allocate2d_schar(size_t h, size_t w);
85 void free2d_schar(signed char **p);
91 void free2d_all_schar(signed char **p, size_t length);
92 
106 short **allocate2d_short(size_t h, size_t w);
111 void free2d_short(short **p);
117 void free2d_all_short(short **p, size_t length);
118 
132 float **allocate2d_float(size_t h, size_t w);
137 void free2d_float(float **p);
143 void free2d_all_float(float **p, size_t length);
144 
158 double **allocate2d_double(size_t h, size_t w);
163 void free2d_double(double **p);
169 void free2d_all_double(double **p, size_t length);
170 
171 #ifdef __cplusplus
172 }
173 #endif
174 
175 #endif /* OEL_UTIL_LIBGENUTILS_ALLOCATE2D_H_ */
void free2d_all_short(short **p, size_t length)
Free a two-dimensional array created by malloc'ing each row individually.
Definition: allocate2d.c:118
void free2d_double(double **p)
Free a two-dimensional array created by allocate2d_double.
Definition: allocate2d.c:170
void free2d_float(float **p)
Free a two-dimensional array created by allocate2d_float.
Definition: allocate2d.c:142
float h[MODELMAX]
Definition: atrem_corl1.h:131
short ** allocate2d_short(size_t h, size_t w)
Allocate a two-dimensional array of type short of a given size.
Definition: allocate2d.c:97
void free2d_all_uchar(unsigned char **p, size_t length)
Free a two-dimensional array created by malloc'ing each row individually.
Definition: allocate2d.c:62
void free2d_all_schar(signed char **p, size_t length)
Free a two-dimensional array created by malloc'ing each row individually.
Definition: allocate2d.c:90
float ** allocate2d_float(size_t h, size_t w)
Allocate a two-dimensional array of type float of a given size.
Definition: allocate2d.c:125
void free2d_all_char(char **p, size_t length)
Free a two-dimensional array created by malloc'ing each row individually.
Definition: allocate2d.c:34
char ** allocate2d_char(size_t h, size_t w)
Allocate a two-dimensional array of type char of a given size.
Definition: allocate2d.c:13
void free2d_all_double(double **p, size_t length)
Free a two-dimensional array created by malloc'ing each row individually.
Definition: allocate2d.c:174
void free2d_all_float(float **p, size_t length)
Free a two-dimensional array created by malloc'ing each row individually.
Definition: allocate2d.c:146
void free2d_short(short **p)
Free a two-dimensional array created by allocate2d_short.
Definition: allocate2d.c:114
double ** allocate2d_double(size_t h, size_t w)
Allocate a two-dimensional array of type double of a given size.
Definition: allocate2d.c:153
signed char ** allocate2d_schar(size_t h, size_t w)
Allocate a two-dimensional array of type signed char of a given size.
Definition: allocate2d.c:69
void free2d_char(char **p)
Free a two-dimensional array created by allocate2d_char.
Definition: allocate2d.c:30
float p[MODELMAX]
Definition: atrem_corl1.h:131
void free2d_uchar(unsigned char **p)
Free a two-dimensional array created by allocate2d_uchar.
Definition: allocate2d.c:58
void free2d_schar(signed char **p)
Free a two-dimensional array created by allocate2d_schar.
Definition: allocate2d.c:86
unsigned char ** allocate2d_uchar(size_t h, size_t w)
Allocate a two-dimensional array of type unsigned char of a given size.
Definition: allocate2d.c:41