37 # endif // USE_PTHREADS
42 #define MAX_NC_NAME H4_MAX_NC_NAME
43 #define MAX_NC_VARS H4_MAX_NC_VARS
68 static intn
Hishdf(
const char* filename);
71 static int32
SDstart(
const char* filename, int32 accessMode);
72 static intn
SDend(int32 sd_id);
73 static intn
SDfileinfo(int32
id, int32* dsCount, int32* nAttrs);
74 static int32
SDcreate(int32 sd_id,
const char* name, int32 dType,
75 int32
rank, int32* size);
76 static int32
SDselect(int32 sd_id, int32 index);
78 static int32
SDfindattr(int32
id,
const char* attrName);
79 static intn
SDgetinfo(int32 sds_id,
char* name, int32*
rank, int32* size,
80 int32* dType, int32* nAttrs);
82 const char* units,
const char* format,
83 const char* coordsys);
84 static intn
SDgetdatastrs(int32 sds_id,
char* label,
char* units,
85 char* format,
char* coordsys, intn
length);
88 static intn
SDwritedata(int32 sds_id, int32* start, int32* stride,
89 int32* end, VOIDP data);
90 static intn
SDreaddata(int32 sds_id, int32* start, int32* stride,
91 int32* end, VOIDP data);
97 const char* format,
const char* coordsys);
99 static intn
DFSDadddata(
const char* filename, intn
rank, int32 dimsizes[],
101 static intn
DFSDputdata(
const char* filename, intn
rank, int32 dimsizes[],
112 static int32
Select(int32 sd_id, int32& index,
char* name, int32*
rank,
113 int32* size, int32* dType, int32* nAttrs,
117 static int SizeOf(int32 dType);
128 static void* Entry(
void* arg);
131 static void PostCommand(HDF4Cmd* pCmd);
134 static std::list<HDF4Cmd*> sm_cmdQueue;
136 static pthread_t sm_id;
137 static int sm_counter;
138 # endif // USE_PTHREADS
141 #endif // !defined(_HDF4_H)
static int32 SDselect(int32 sd_id, int32 index)
static int32 SDfindattr(int32 id, const char *attrName)
static intn SDwritedata(int32 sds_id, int32 *start, int32 *stride, int32 *end, VOIDP data)
static intn SDgetinfo(int32 sds_id, char *name, int32 *rank, int32 *size, int32 *dType, int32 *nAttrs)
A class to serialize HDF calls for multithreaded apps.
static intn SDend(int32 sd_id)
static intn SDendaccess(int32 sds_id)
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
static intn DFSDsetdims(intn rank, int32 dimsizes[])
Single file interface.
static int32 SDcreate(int32 sd_id, const char *name, int32 dType, int32 rank, int32 *size)
static intn DFSDadddata(const char *filename, intn rank, int32 dimsizes[], VOIDP data)
static intn SDgetrange(int32 sds_id, VOIDP max, VOIDP min)
static int SizeOf(int32 dType)
Get the size in bytes of an HDF data type.
double length(Vector3D *const v, int n)
static intn SDsetrange(int32 sds_id, VOIDP max, VOIDP min)
static std::string error_msg()
return error message
static void init()
Create and start the I/O thread.
static intn DFSDsetNT(int32 numbertype)
static intn SDsetdatastrs(int32 sds_id, const char *label, const char *units, const char *format, const char *coordsys)
static int32 Select(int32 sd_id, int32 &index, char *name, int32 *rank, int32 *size, int32 *dType, int32 *nAttrs, int32 dsCount=-1)
"Open" and "close" HDF files efficiently.
static intn SDreaddata(int32 sds_id, int32 *start, int32 *stride, int32 *end, VOIDP data)
static void Terminate()
Terminate the I/O thread.
static intn Hishdf(const char *filename)
HDF4 wrapper functions.
static intn SDfileinfo(int32 id, int32 *dsCount, int32 *nAttrs)
static intn DFSDputdata(const char *filename, intn rank, int32 dimsizes[], VOIDP data)
static void finalize()
Destroy the I/O thread.
Vector_n min(const Array_n_const &v1, const Array_n_const &v2)
static int32 SDstart(const char *filename, int32 accessMode)
static intn DFSDsetrange(VOIDP maxi, VOIDP mini)
static intn SDgetdatastrs(int32 sds_id, char *label, char *units, char *format, char *coordsys, intn length)
static intn DFSDsetdatastrs(const char *label, const char *unit, const char *format, const char *coordsys)