Array_ops: new array access methods

Signed-off-by: Thorsten Liebig <thorsten.liebig@gmx.de>
pull/1/head
Thorsten Liebig 2010-06-05 11:50:57 +02:00
parent b4c98632bf
commit 71f5ba2d22
1 changed files with 8 additions and 0 deletions

View File

@ -41,6 +41,14 @@ void Delete2DArray(FDTD_FLOAT** array, const unsigned int* numLines);
FDTD_FLOAT*** Create3DArray(const unsigned int* numLines);
void Delete3DArray(FDTD_FLOAT*** array, const unsigned int* numLines);
inline FDTD_FLOAT& Access_N_3DArray(FDTD_FLOAT**** array, unsigned int n, unsigned int* pos)
{
return array[n][pos[0]][pos[1]][pos[2]];
}
inline FDTD_FLOAT& Access_N_3DArray(FDTD_FLOAT**** array, unsigned int n, unsigned int x, unsigned int y, unsigned int z )
{
return array[n][x][y][z];
}
FDTD_FLOAT**** Create_N_3DArray(const unsigned int* numLines);
void Delete_N_3DArray(FDTD_FLOAT**** array, const unsigned int* numLines);