00001 #ifndef __NDIM_H 00002 #define __NDIM_H 00003 00004 /* Copy data from a hyper-slab of an n-dimensional array into a 00005 consecutive array. */ 00006 int ndim_unpack(int sz, int ndim, int *dims, int *start, int *end, 00007 unsigned char *inarray, unsigned char *outbuf); 00008 00009 /* Copy consecutive data into a hyper-slab of an 00010 n-dimensional array. */ 00011 int ndim_pack(int sz, int ndim, int *dims, int *start, int *end, 00012 unsigned char *inbuf, unsigned char *outarray); 00013 00014 00015 /* Transpose the elements in the input array such that the 00016 dimensions are permuted according to the permutation given 00017 in perm. */ 00018 int ndim_permute(int sz, int ndim, int *dims, int *perm, 00019 unsigned char *in, unsigned char *out); 00020 #endif