OPeNDAP Hyrax Back End Server (BES)  Updated for version 3.8.3
ndarray.h File Reference
#include "freeform.h"
Include dependency graph for ndarray.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  array_descriptor_struct
 
struct  array_index_struct
 
struct  array_mapping_struct
 

Macros

#define NDARR_BUFFER_GROUPING   (int)21
 
#define NDARR_DIM_END_INDEX   (int)4
 
#define NDARR_DIM_GRANULARITY   (int)5
 
#define NDARR_DIM_GROUPING   (int)6
 
#define NDARR_DIM_NAME   (int)2
 
#define NDARR_DIM_NUMBER   (int)1
 
#define NDARR_DIM_SEPARATION   (int)7
 
#define NDARR_DIM_START_INDEX   (int)3
 
#define NDARR_ELEMENT_SIZE   (int)10
 
#define NDARR_END_ARGS   (int)0
 
#define NDARR_FILE_GROUPING   (int)20
 
#define NDARR_GB_KEY0   "gb"
 
#define NDARR_GB_KEY1   "grouping"
 
#define NDARR_GET_MAP_SEPARATION(nda_m_p, nda_l_v)
 
#define NDARR_GET_SEPARATION(nda_i_p, nda_l_v)
 
#define NDARR_GINITIAL   0
 
#define NDARR_GNEXT   1
 
#define NDARR_MAP_IN_BUFFER   (int)22
 
#define NDARR_MAP_IN_FILE   (int)23
 
#define NDARR_REAL_TO_USER   'u'
 
#define NDARR_RESET_INDICES(nda_i_p)
 
#define NDARR_SB_KEY0   "sb"
 
#define NDARR_SB_KEY1   "separation"
 
#define NDARR_SET_PADDING(nda_s_v, pad_c_v)
 
#define NDARR_USER_TO_REAL   'r'
 
#define NDARRS_APPEND   (NDARR_SOURCE)0x4000
 
#define NDARRS_BUFFER   (NDARR_SOURCE)0x0800
 
#define NDARRS_CREATE   (NDARR_SOURCE)0x1000
 
#define NDARRS_FILE   (NDARR_SOURCE)0x8000
 
#define NDARRS_PADDING   (NDARR_SOURCE)0x00FF
 
#define NDARRS_UPDATE   (NDARR_SOURCE)0x2000
 
#define NDARRT_BROKEN   1
 
#define NDARRT_CONTIGUOUS   0
 
#define NDARRT_GROUPMAP_BUFF   3
 
#define NDARRT_GROUPMAP_FILE   2
 

Typedefs

typedef struct array_descriptor_struct ARRAY_DESCRIPTOR
 
typedef struct array_descriptor_structARRAY_DESCRIPTOR_PTR
 
typedef struct array_index_struct ARRAY_INDEX
 
typedef struct array_index_structARRAY_INDEX_PTR
 
typedef struct array_mapping_struct ARRAY_MAPPING
 
typedef struct array_mapping_structARRAY_MAPPING_PTR
 
typedef unsigned short NDARR_SOURCE
 

Functions

ARRAY_INDEX_PTR ndarr_convert_indices (ARRAY_INDEX_PTR aindex, unsigned char direction)
 
ARRAY_DESCRIPTOR_PTR ndarr_create (int numdim)
 
int ndarr_create_brkn_desc (ARRAY_DESCRIPTOR_PTR adesc, int map_type, void *mapping)
 
ARRAY_INDEX_PTR ndarr_create_indices (ARRAY_DESCRIPTOR_PTR arrdesc)
 
ARRAY_MAPPING_PTR ndarr_create_mapping (ARRAY_DESCRIPTOR_PTR subarray, ARRAY_DESCRIPTOR_PTR superarray)
 
int ndarr_do_calculations (ARRAY_DESCRIPTOR_PTR arrd)
 
void ndarr_free_descriptor (ARRAY_DESCRIPTOR_PTR arrdesc)
 
void ndarr_free_indices (ARRAY_INDEX_PTR aindex)
 
void ndarr_free_mapping (ARRAY_MAPPING_PTR amap)
 
void * ndarr_get_group (ARRAY_INDEX_PTR aindex)
 
unsigned long ndarr_get_mapped_offset (ARRAY_MAPPING_PTR amap)
 
void * ndarr_get_next_group (ARRAY_DESCRIPTOR_PTR arrdesc, char mode)
 
unsigned long ndarr_get_offset (ARRAY_INDEX_PTR aindex)
 
ARRAY_INDEX_PTR ndarr_increment_indices (ARRAY_INDEX_PTR aindex)
 
ARRAY_INDEX_PTR ndarr_increment_mapping (ARRAY_MAPPING_PTR amap)
 
long ndarr_reorient (ARRAY_MAPPING_PTR amap, NDARR_SOURCE sourceid, void *source, long source_size, NDARR_SOURCE destid, void *dest, long dest_size, int *array_complete)
 
int ndarr_set (ARRAY_DESCRIPTOR_PTR arrd,...)
 

Macro Definition Documentation

#define NDARR_BUFFER_GROUPING   (int)21

Definition at line 134 of file ndarray.h.

#define NDARR_DIM_END_INDEX   (int)4

Definition at line 128 of file ndarray.h.

#define NDARR_DIM_GRANULARITY   (int)5

Definition at line 129 of file ndarray.h.

#define NDARR_DIM_GROUPING   (int)6

Definition at line 130 of file ndarray.h.

#define NDARR_DIM_NAME   (int)2

Definition at line 126 of file ndarray.h.

#define NDARR_DIM_NUMBER   (int)1

Definition at line 125 of file ndarray.h.

#define NDARR_DIM_SEPARATION   (int)7

Definition at line 131 of file ndarray.h.

#define NDARR_DIM_START_INDEX   (int)3

Definition at line 127 of file ndarray.h.

#define NDARR_ELEMENT_SIZE   (int)10

Definition at line 132 of file ndarray.h.

#define NDARR_END_ARGS   (int)0

Definition at line 137 of file ndarray.h.

#define NDARR_FILE_GROUPING   (int)20

Definition at line 133 of file ndarray.h.

#define NDARR_GB_KEY0   "gb"

Definition at line 142 of file ndarray.h.

#define NDARR_GB_KEY1   "grouping"

Definition at line 143 of file ndarray.h.

#define NDARR_GET_MAP_SEPARATION (   nda_m_p,
  nda_l_v 
)
Value:
{ \
int nda_t_i; \
ARRAY_INDEX_PTR nda_i_p = nda_m_p->subaindex; \
nda_l_v = nda_i_p->descriptor->separation[nda_m_p->dimincrement]; \
for(nda_t_i = nda_m_p->dimincrement - 1; nda_t_i >= 0; nda_t_i--) \
{ \
if(nda_i_p->descriptor->grouping[nda_t_i + 1]) \
{ \
if(!((nda_i_p->index[nda_t_i + 1] + 1) % \
nda_i_p->descriptor->grouping[nda_t_i + 1])) \
nda_l_v += nda_i_p->descriptor->separation[nda_t_i]; \
else \
break; \
} \
else \
{ \
if(((nda_i_p->index[nda_t_i + 1] + 1) == \
nda_i_p->descriptor->dim_size[nda_t_i + 1])) \
nda_l_v += nda_i_p->descriptor->separation[nda_t_i]; \
else \
break; \
} \
} \
}
if(!(yy_init))
Definition: lex.gse.cc:752
struct array_index_struct * ARRAY_INDEX_PTR
ARRAY_DESCRIPTOR_PTR descriptor
Definition: ndarray.h:70

Definition at line 298 of file ndarray.h.

#define NDARR_GET_SEPARATION (   nda_i_p,
  nda_l_v 
)
Value:
{ \
int nda_t_i; \
nda_l_v = nda_i_p->descriptor->separation[nda_i_p->descriptor->num_dim - 1]; \
for(nda_t_i = nda_i_p->descriptor->num_dim - 2; nda_t_i >= 0; nda_t_i--) { \
if(nda_i_p->descriptor->grouping[nda_t_i + 1]) { \
if(!((nda_i_p->index[nda_t_i + 1] + 1) % \
nda_i_p->descriptor->grouping[nda_t_i + 1])) { \
nda_l_v += nda_i_p->descriptor->separation[nda_t_i]; \
} \
else { \
break; \
} \
} \
else { \
if(((nda_i_p->index[nda_t_i + 1] + 1) == \
nda_i_p->descriptor->dim_size[nda_t_i + 1])) { \
nda_l_v += nda_i_p->descriptor->separation[nda_t_i]; \
} \
else { \
break; \
} \
} \
}\
} \
if(!(yy_init))
Definition: lex.gse.cc:752

Definition at line 246 of file ndarray.h.

#define NDARR_GINITIAL   0

Definition at line 156 of file ndarray.h.

#define NDARR_GNEXT   1

Definition at line 157 of file ndarray.h.

#define NDARR_MAP_IN_BUFFER   (int)22

Definition at line 135 of file ndarray.h.

#define NDARR_MAP_IN_FILE   (int)23

Definition at line 136 of file ndarray.h.

#define NDARR_REAL_TO_USER   'u'

Definition at line 147 of file ndarray.h.

#define NDARR_RESET_INDICES (   nda_i_p)
Value:
{ \
int nda_d_s; \
for(nda_d_s = 0; nda_d_s < nda_i_p->descriptor->num_dim; nda_d_s++) \
nda_i_p->index[nda_d_s] = 0;} \

Definition at line 191 of file ndarray.h.

#define NDARR_SB_KEY0   "sb"

Definition at line 140 of file ndarray.h.

#define NDARR_SB_KEY1   "separation"

Definition at line 141 of file ndarray.h.

#define NDARR_SET_PADDING (   nda_s_v,
  pad_c_v 
)
Value:
{ \
nda_s_v &= ~NDARRS_PADDING; \
nda_s_v |= (NDARRS_PADDING & (pad_c_v * 257));} \
#define NDARRS_PADDING
Definition: ndarray.h:165

Definition at line 216 of file ndarray.h.

#define NDARR_USER_TO_REAL   'r'

Definition at line 146 of file ndarray.h.

#define NDARRS_APPEND   (NDARR_SOURCE)0x4000

Definition at line 161 of file ndarray.h.

#define NDARRS_BUFFER   (NDARR_SOURCE)0x0800

Definition at line 164 of file ndarray.h.

#define NDARRS_CREATE   (NDARR_SOURCE)0x1000

Definition at line 163 of file ndarray.h.

#define NDARRS_FILE   (NDARR_SOURCE)0x8000

Definition at line 160 of file ndarray.h.

#define NDARRS_PADDING   (NDARR_SOURCE)0x00FF

Definition at line 165 of file ndarray.h.

#define NDARRS_UPDATE   (NDARR_SOURCE)0x2000

Definition at line 162 of file ndarray.h.

#define NDARRT_BROKEN   1

Definition at line 151 of file ndarray.h.

#define NDARRT_CONTIGUOUS   0

Definition at line 150 of file ndarray.h.

#define NDARRT_GROUPMAP_BUFF   3

Definition at line 153 of file ndarray.h.

#define NDARRT_GROUPMAP_FILE   2

Definition at line 152 of file ndarray.h.

Typedef Documentation

typedef unsigned short NDARR_SOURCE

Definition at line 38 of file ndarray.h.

Function Documentation

ARRAY_INDEX_PTR ndarr_convert_indices ( ARRAY_INDEX_PTR  aindex,
unsigned char  direction 
)
ARRAY_DESCRIPTOR_PTR ndarr_create ( int  numdim)
int ndarr_create_brkn_desc ( ARRAY_DESCRIPTOR_PTR  adesc,
int  map_type,
void *  mapping 
)
ARRAY_INDEX_PTR ndarr_create_indices ( ARRAY_DESCRIPTOR_PTR  arrdesc)
ARRAY_MAPPING_PTR ndarr_create_mapping ( ARRAY_DESCRIPTOR_PTR  subarray,
ARRAY_DESCRIPTOR_PTR  superarray 
)
int ndarr_do_calculations ( ARRAY_DESCRIPTOR_PTR  arrd)
void ndarr_free_descriptor ( ARRAY_DESCRIPTOR_PTR  arrdesc)
void ndarr_free_indices ( ARRAY_INDEX_PTR  aindex)
void ndarr_free_mapping ( ARRAY_MAPPING_PTR  amap)
void* ndarr_get_group ( ARRAY_INDEX_PTR  aindex)
unsigned long ndarr_get_mapped_offset ( ARRAY_MAPPING_PTR  amap)
void* ndarr_get_next_group ( ARRAY_DESCRIPTOR_PTR  arrdesc,
char  mode 
)
unsigned long ndarr_get_offset ( ARRAY_INDEX_PTR  aindex)
ARRAY_INDEX_PTR ndarr_increment_indices ( ARRAY_INDEX_PTR  aindex)
ARRAY_INDEX_PTR ndarr_increment_mapping ( ARRAY_MAPPING_PTR  amap)
long ndarr_reorient ( ARRAY_MAPPING_PTR  amap,
NDARR_SOURCE  sourceid,
void *  source,
long  source_size,
NDARR_SOURCE  destid,
void *  dest,
long  dest_size,
int *  array_complete 
)
int ndarr_set ( ARRAY_DESCRIPTOR_PTR  arrd,
  ... 
)