ESScript  Revision_4488
DataC.h
Go to the documentation of this file.
1 
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2013 by University of Queensland
5 * http://www.uq.edu.au
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Open Software License version 3.0
9 * http://www.opensource.org/licenses/osl-3.0.php
10 *
11 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 * Development since 2012 by School of Earth Sciences
13 *
14 *****************************************************************************/
15 
16 
17 #if !defined escript_DataC_20040611_H
18 #define escript_DataC_20040611_H
19 #include "system_dep.h"
20 
29 struct escriptDataC {
30  void* m_dataPtr;
31 };
32 
33 typedef struct escriptDataC escriptDataC;
34 
41 
49 #define updateFunctionSpaceType(_FS,_DATA) _FS=(isEmpty(_DATA) ? _FS : getFunctionSpaceType(_DATA))
50 
57 #define functionSpaceTypeEqual(_FS,_DATA) ( (isEmpty(_DATA) || _FS==getFunctionSpaceType(_DATA)) ) ? 1 : 0
58 
65 
73 ESCRIPT_DLL_API int isDataPointShapeEqual(escriptDataC* data, int rank, const int* dimensions);
83 ESCRIPT_DLL_API int numSamplesEqual(escriptDataC* data, int numDataPointsPerSample,
84  int numSamples);
85 
92 
99 
107 
114 
115 /*
116  \brief
117  Return the number of doubles stored for the Data object.
118  Argument data may be NULL, in which case 0 is returnd.
119  \param data Input - C wrapper for Data.
120 
121 This function has been removed because it does not make sense for LazyData
122 */
123 /*ESCRIPT_DLL_API int getLength(escriptDataC* data);*/
124 
134 
144 ESCRIPT_DLL_API double __const * getSampleDataRO(escriptDataC* data, int sampleNo);
145 /* Placement of __const might be important. See .cpp */
146 
147 
148 ESCRIPT_DLL_API double* getSampleDataRW(escriptDataC* data, int sampleNo);
149 
150 
159 ESCRIPT_DLL_API double __const* getSampleDataROFast(escriptDataC* data, int sampleNo);
160 
168 ESCRIPT_DLL_API double* getSampleDataRWFast(escriptDataC* data, int sampleNo);
169 
170 
179 ESCRIPT_DLL_API double* getDataRW(escriptDataC* data);
180 
181 
190 
191 #endif