10 #include <vapor/MyBase.h>
11 #include <vapor/MetadataVDC.h>
12 #include <vapor/CFuncs.h>
52 const string &metafile
89 size_t timestep,
const char *varname,
int reflevel=0,
int lod=0
90 ) {_varname = varname;
return(0); };
92 virtual int BlockReadRegion(
93 const size_t bmin[3],
const size_t bmax[3],
float *region,
bool unblock=
true
96 virtual int ReadRegion(
97 const size_t min[3],
const size_t max[3],
float *region
100 virtual int ReadRegion(
float *region) = 0;
102 virtual int ReadSlice(
float *slice) = 0;
105 size_t timestep,
const char *varname,
int reflevel=0,
int lod=0
106 ) {_varname = varname;
return(0); };
108 virtual int BlockWriteRegion(
109 const float *region,
const size_t bmin[3],
const size_t bmax[3],
113 virtual int WriteRegion(
114 const float *region,
const size_t min[3],
const size_t max[3]
117 virtual int WriteRegion(
const float *region) = 0;
119 virtual int WriteSlice(
const float *slice) = 0;
123 virtual const float *GetDataRange()
const = 0;
144 void resize(
size_t nbits);
150 static size_t getSize(
size_t nbits) {
return ((nbits+7) >> 3);}
157 size_t size()
const {
return (_nbits); };
163 void setBit(
size_t idx,
bool value);
169 bool getBit(
size_t idx)
const;
175 unsigned char *getStorage()
const;
179 unsigned char *_bitmask;
183 void _BitMask(
size_t nbits);
206 int _MaskOpenWrite(
size_t timestep,
string varname,
int reflevel);
207 int _MaskOpenRead(
size_t timestep,
string varname,
int reflevel);
210 const float *srcblk,
const size_t bmin_p[3],
const size_t bmax_p[3],
213 int _MaskRead(
const size_t bmin_p[3],
const size_t bmax_p[3]);
220 void _MaskRemove(
float *blk,
bool &valid_data)
const;
226 void _MaskReplace(
size_t bx,
size_t by,
size_t bz,
float *blk)
const;
229 static void _UnpackCoord(
230 VarType_T vtype,
const size_t src[3],
size_t dst[3],
size_t fill
233 static void _PackCoord(
234 VarType_T vtype,
const size_t src[3],
size_t dst[3],
size_t fill
237 static void _FillPackedCoord(
238 VarType_T vtype,
const size_t src[3],
size_t dst[3],
size_t fill
244 double _read_timer_acc;
245 double _write_timer_acc;
246 double _seek_timer_acc;
247 double _xform_timer_acc;
259 VarType_T _vtype_mask;
261 size_t _bs_p_mask[3];
262 size_t _bdim_p_mask[3];
264 int _reflevel_file_mask;
266 string _ncpath_mask_tmp;
267 bool _open_write_mask;
268 vector <BitMask> _bitmasks;
274 size_t timestep,
string varname,
int reflevel,
size_t &bitmasksz
276 void _downsample(
const BitMask &bm0, BitMask &bm1,
int l0,
int l1)
const;
COMMON_API double GetTime()
double GetReadTimer() const
double GetWriteTimer() const
virtual int OpenVariableRead(size_t timestep, const char *varname, int reflevel=0, int lod=0)
double GetSeekTimer() const
static size_t getSize(size_t nbits)
virtual int CloseVariable()
Abstract base class for performing data IO to a VDC.
virtual int OpenVariableWrite(size_t timestep, const char *varname, int reflevel=0, int lod=0)
double GetXFormTimer() const