Due to the lapse in federal government funding, NASA is not updating this website. We sincerely regret this inconvenience.
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);
34 
48 unsigned char **allocate2d_uchar(size_t h, size_t w);
53 void free2d_uchar(unsigned char **p);
54 
68 signed char **allocate2d_schar(size_t h, size_t w);
73 void free2d_schar(signed char **p);
74 
88 short **allocate2d_short(size_t h, size_t w);
93 void free2d_short(short **p);
94 
108 int **allocate2d_int(size_t h, size_t w);
113 void free2d_int(int **p);
114 
128 float **allocate2d_float(size_t h, size_t w);
133 void free2d_float(float **p);
134 
148 double **allocate2d_double(size_t h, size_t w);
153 void free2d_double(double **p);
154 
155 #ifdef __cplusplus
156 }
157 #endif
158 
159 #endif /* OEL_UTIL_LIBGENUTILS_ALLOCATE2D_H_ */
void free2d_double(double **p)
Free a two-dimensional array created by allocate2d_double.
Definition: allocate2d.c:162
void free2d_float(float **p)
Free a two-dimensional array created by allocate2d_float.
Definition: allocate2d.c:140
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:79
int ** allocate2d_int(size_t h, size_t w)
Allocate a two-dimensional array of type int of a given size.
Definition: allocate2d.c:101
float ** allocate2d_float(size_t h, size_t w)
Allocate a two-dimensional array of type float of a given size.
Definition: allocate2d.c:123
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_short(short **p)
Free a two-dimensional array created by allocate2d_short.
Definition: allocate2d.c:96
double ** allocate2d_double(size_t h, size_t w)
Allocate a two-dimensional array of type double of a given size.
Definition: allocate2d.c:145
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:57
void free2d_char(char **p)
Free a two-dimensional array created by allocate2d_char.
Definition: allocate2d.c:30
void free2d_int(int **p)
Free a two-dimensional array created by allocate2d_int.
Definition: allocate2d.c:118
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:52
void free2d_schar(signed char **p)
Free a two-dimensional array created by allocate2d_schar.
Definition: allocate2d.c:74
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:35