ocssw
V2022
|
Go to the source code of this file.
Functions | |
float ***** | allocate5d_float (size_t nq, size_t nr, size_t nz, size_t ny, size_t nx) |
void | free5d_float (float *****p) |
Detailed Description
Utility functions for allocating and freeing five-dimensional arrays of various types.
This file was created by allocate5d.pl and should not be edited manually.
Definition in file allocate5d.c.
Function Documentation
◆ allocate5d_float()
float***** allocate5d_float | ( | size_t | nq, |
size_t | nr, | ||
size_t | nz, | ||
size_t | ny, | ||
size_t | nx | ||
) |
Allocate a five-dimensional array of type float of a given size.
The order of the parameters are (now) the same as when the data is being accessed. E.g., this is valid (ignoring the printf type specifier):
float *****array = allocate5d_float(10,1,7,5,1); printf("%d\n", array[9][0][6][4][0]);
- Parameters
-
[in] nq slowest incrimenting dimension of array in memory. [in] nr really slow incrimenting dimension of array in memory. [in] nz slow incrimenting dimension of array in memory. [in] ny fast dimension of array. [in] nx fastest incrimenting dimension of array.
- Returns
- A malloc'd array or NULL if any malloc fails.
Definition at line 12 of file allocate5d.c.
◆ free5d_float()
void free5d_float | ( | float ***** | p | ) |
Free a five-dimensional array created by allocate5d_float.
- Parameters
-
[in] p Pointer to array created by allocate5d_float.
Definition at line 58 of file allocate5d.c.