-
Notifications
You must be signed in to change notification settings - Fork 6
/
hydroalloc_mem.h
34 lines (24 loc) · 941 Bytes
/
hydroalloc_mem.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*-------------------------------------------------------------------------------------------
* hydroalloc_mem.h
*
* Author: Albert Kettner, March 2006
*
* Allocate memory function definitions
*
* Variable Def.Location Type Units Usage
* -------- ------------ ---- ----- -----
*
*-------------------------------------------------------------------------------------------*/
#ifndef HYDROALLOC_MEM_H_
#define HYDROALLOC_MEM_H_
#include <stdio.h>
#define malloc1d( m , type) ( (type*)matrixalloc1D( m, sizeof(type)) )
#define malloc2d( m , n , type ) ( (type**)matrixalloc2D( m , n , sizeof(type)) )
#define malloc3d( m , n , o , type ) ( (type***)matrixalloc3D( m , n , o , sizeof(type)) )
/* FUNCTION DEFINITIONS */
FILE ** allocate_1d_F (int nrows);
void *matrixalloc1D (int, long);
void **matrixalloc2D (int, int, long);
void ***matrixalloc3D (int, int, int, long);
#endif /* */