ESYS13
Revision_
|
00001 00002 /******************************************************* 00003 * 00004 * Copyright (c) 2003-2012 by University of Queensland 00005 * Earth Systems Science Computational Center (ESSCC) 00006 * http://www.uq.edu.au/esscc 00007 * 00008 * Primary Business: Queensland, Australia 00009 * Licensed under the Open Software License version 3.0 00010 * http://www.opensource.org/licenses/osl-3.0.php 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 \brief 00114 Return the number of doubles stored for the Data object. 00115 Argument data may be NULL, in which case 0 is returnd. 00116 \param data Input - C wrapper for Data. 00117 00118 This function has been removed because it does not make sense for LazyData 00119 */ 00120 /*ESCRIPT_DLL_API int getLength(escriptDataC* data);*/ 00121 00130 ESCRIPT_DLL_API int isExpanded(escriptDataC* data); 00131 00141 ESCRIPT_DLL_API double __const * getSampleDataRO(escriptDataC* data, int sampleNo); 00142 /* Placement of __const might be important. See .cpp */ 00143 00144 00145 ESCRIPT_DLL_API double* getSampleDataRW(escriptDataC* data, int sampleNo); 00146 00147 00156 ESCRIPT_DLL_API double __const* getSampleDataROFast(escriptDataC* data, int sampleNo); 00157 00165 ESCRIPT_DLL_API double* getSampleDataRWFast(escriptDataC* data, int sampleNo); 00166 00167 00176 ESCRIPT_DLL_API double* getDataRW(escriptDataC* data); 00177 00178 00186 ESCRIPT_DLL_API void requireWrite(escriptDataC* data); 00187 00188 #endif