/[escript]/branches/arrexp_2137_win_merge/escript/src/DataC.h
ViewVC logotype

Diff of /branches/arrexp_2137_win_merge/escript/src/DataC.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2221 by jfenwick, Wed Jan 14 00:23:39 2009 UTC revision 2222 by jfenwick, Tue Jan 20 04:52:39 2009 UTC
# Line 143  ESCRIPT_DLL_API double __const * getSamp Line 143  ESCRIPT_DLL_API double __const * getSamp
143  ESCRIPT_DLL_API double* getSampleDataRW(escriptDataC* data, int sampleNo);  ESCRIPT_DLL_API double* getSampleDataRW(escriptDataC* data, int sampleNo);
144    
145    
146    /*   \brief
147       Return a pointer to the data for the given sample number.
148       Fast version of getSampledata: does no error checking.
149      \param data Input - C wrapper for Data.
150      \param sampleNo Input - The sample number.
151    */
152    /*ESCRIPT_DLL_API double* getSampleDataFast(escriptDataC* data, int sampleNo);*/
153    
154  /**  /**
155     \brief     \brief
156     Return a pointer to the data for the given sample number.     Return a pointer to the data for the given sample number.
157     Fast version of getSampledata: does no error checking.     Fast version of getSampledataRO: does no error checking.
158      \param data Input - C wrapper for Data.
159      \param sampleNo Input - The sample number.
160    */
161    ESCRIPT_DLL_API double __const* getSampleDataROFast(escriptDataC* data, int sampleNo, void* buffer);
162    
163    /**
164       \brief
165       Return a pointer to the data for the given sample number.
166       Fast version of getSampledataRW: does no error checking.
167    \param data Input - C wrapper for Data.    \param data Input - C wrapper for Data.
168    \param sampleNo Input - The sample number.    \param sampleNo Input - The sample number.
169  */  */
170  ESCRIPT_DLL_API double* getSampleDataFast(escriptDataC* data, int sampleNo);  ESCRIPT_DLL_API double* getSampleDataRWFast(escriptDataC* data, int sampleNo);
171    
172    
173  /**  /**
174     \brief Create a buffer for use by getSample     \brief Create a buffer for use by getSample
175     Allocates a DataVector large enough for DataLazy::resolveSample to operate on for the current Data.     Allocates a DataVector large enough for DataLazy::resolveSample to operate on for the current Data.
176     Do not use this buffer for other DataC instances (unless you are sure they will be the same size).     Do not use this buffer for other DataC instances (unless you are sure they will be the same size).
177    
178       In multi-threaded sections, this needs to be called for each thread.
179        
180     \return A DataVector* if Data is not-NULL and lazy, NULL otherwise.     \return A DataVector* if Data is not-NULL and lazy, NULL otherwise.
181     \warning This pointer must be deallocated using freeSampleBuffer to avoid cross library memory issues.     \warning This pointer must be deallocated using freeSampleBuffer to avoid cross library memory issues.
# Line 170  ESCRIPT_DLL_API void* allocSampleBuffer( Line 189  ESCRIPT_DLL_API void* allocSampleBuffer(
189  */  */
190  ESCRIPT_DLL_API void freeSampleBuffer(void* buffer);  ESCRIPT_DLL_API void freeSampleBuffer(void* buffer);
191    
192    /**
193       \brief Ensure that this object is ready for writing.
194       It will be resolved and copied if it is currently shared.
195       Use only in single threaded sections of code.
196       Do not create new Data objects based on this one between this call and
197       writing to the object.
198    */
199    ESCRIPT_DLL_API void requireWrite(escriptDataC* data);
200    
201  #endif  #endif

Legend:
Removed from v.2221  
changed lines
  Added in v.2222

  ViewVC Help
Powered by ViewVC 1.1.26