forked from YoYo000/fusibile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mia-utils.h
50 lines (35 loc) · 1.16 KB
/
mia-utils.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef __MIA_UTILS__
#define __MIA_UTILS__
#include <stdlib.h>
#include <stdio.h>
#include <glib-2.0/glib.h>
void alloc_vector
(float **vector, /* vector */
long n); /* size */
void alloc_matrix
(float ***matrix, /* matrix */
long nx, /* size in x direction */
long ny); /* size in y direction */
void alloc_matrix_d
(double ***matrix, /* matrix */
long nx, /* size in x direction */
long ny); /* size in y direction */
/* allocates storage for matrix of size nx * ny */
void disalloc_vector
(float *vector, /* vector */
long n); /* size */
/* disallocates storage for a vector of size n */
void disalloc_vector
(float *vector, /* vector */
long n); /* size */
/*--------------------------------------------------------------------------*/
void disalloc_matrix
(float **matrix, /* matrix */
long nx, /* size in x direction */
long ny); /* size in y direction */
void disalloc_matrix_d
(double **matrix, /* matrix */
long nx, /* size in x direction */
long ny); /* size in y direction */
/* disallocates storage for matrix of size nx * ny */
#endif