00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #if !defined escript_DataC_20040611_H
00016 #define escript_DataC_20040611_H
00017 #include "system_dep.h"
00018
00027 struct escriptDataC {
00028 void* m_dataPtr;
00029 };
00030
00031 typedef struct escriptDataC escriptDataC;
00032
00038 ESCRIPT_DLL_API int getFunctionSpaceType(escriptDataC* data);
00039
00046 #define updateFunctionSpaceType(_fs_,_data_) _fs_=(isEmpty(_data_) ? _fs_ : getFunctionSpaceType(_data_))
00047
00054 #define functionSpaceTypeEqual(_fs_,_data_) ( (isEmpty(_data_) || _fs_==getFunctionSpaceType(_data_)) ) ? 1 : 0
00055
00061 ESCRIPT_DLL_API int isEmpty(escriptDataC* data);
00062
00070 ESCRIPT_DLL_API int isDataPointShapeEqual(escriptDataC* data, int rank, int* dimensions);
00080 ESCRIPT_DLL_API int numSamplesEqual(escriptDataC* data, int numDataPointsPerSample,
00081 int numSamples);
00082
00088 ESCRIPT_DLL_API int getNumDataPointsPerSample(escriptDataC* data);
00089
00095 ESCRIPT_DLL_API int getDataPointRank(escriptDataC* data);
00096
00103 ESCRIPT_DLL_API int getDataPointShape(escriptDataC* data,int i);
00104
00110 ESCRIPT_DLL_API int getDataPointSize(escriptDataC* data);
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00130 ESCRIPT_DLL_API int isExpanded(escriptDataC* data);
00131
00143 ESCRIPT_DLL_API double __const * getSampleDataRO(escriptDataC* data, int sampleNo, void* buffer);
00144
00145
00146
00147 ESCRIPT_DLL_API double* getSampleDataRW(escriptDataC* data, int sampleNo);
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00168 ESCRIPT_DLL_API double __const* getSampleDataROFast(escriptDataC* data, int sampleNo, void* buffer);
00169
00177 ESCRIPT_DLL_API double* getSampleDataRWFast(escriptDataC* data, int sampleNo);
00178
00179
00188 ESCRIPT_DLL_API double* getDataRW(escriptDataC* data);
00189
00190
00202 ESCRIPT_DLL_API void* allocSampleBuffer(escriptDataC* data);
00203
00208 ESCRIPT_DLL_API void freeSampleBuffer(void* buffer);
00209
00217 ESCRIPT_DLL_API void requireWrite(escriptDataC* data);
00218
00219 #endif