14 #ifndef __GA_DataArray__
15 #define __GA_DataArray__
33 template <
typename T>
class UT_Array;
36 class ga_PageTableBase;
64 int64 getMemoryUsage(
bool inclusive)
const;
99 void makeVector3Constant(
const int32 *
val);
100 void makeVector3Constant(
const int64 *
val);
126 {
return getF64(idx); }
172 const GA_Range &si,
int tuple_size);
237 return myStorage == b.myStorage && mySize == b.mySize;
249 GA_Size marshallConstantFlagsForOutputPagesFast(
267 : myPage(page), myStartOffset(start), myEndOffset(end) {}
273 GA_Size marshallConstantFlagsForOutputPagesSlow(
279 const ga_PageTableBase *getPageTable()
const {
return myPageTable; }
280 ga_PageTableBase *getPageTable() {
return myPageTable; }
287 template <
typename DESTTYPE,
typename MYTYPE>
290 template <
typename SRCTYPE,
typename MYTYPE>
293 template <
typename SRCTYPE,
typename MYTYPE>
296 template <
typename DESTTYPE,
typename MYTYPE>
297 static void directGetterVector(DESTTYPE &value,
300 template <
typename SRCTYPE,
typename MYTYPE>
303 template <
typename SRCTYPE,
typename MYTYPE>
307 template <
typename DESTTYPE,
typename MYTYPE>
308 static DESTTYPE directVector3GetterScalar(
const GA_DataArray *
const *d,
310 template <
typename SRCTYPE,
typename MYTYPE>
314 template <
typename SRCTYPE,
typename MYTYPE>
318 template <
typename DESTTYPE,
typename MYTYPE>
319 static void directVector3GetterVector(DESTTYPE &value,
322 template <
typename SRCTYPE,
typename MYTYPE>
325 template <
typename SRCTYPE,
typename MYTYPE>
330 template <
typename T,
typename BASETYPE,
typename MYTYPE,
bool READONLY>
331 static T *directPageGetterVary(
333 template <
typename T,
typename BASETYPE,
int TUPLE_SIZE,
typename MYTYPE,
bool READONLY>
334 static T *directVector3PageGetterVary(
336 template <
typename T,
typename BASETYPE,
typename MYTYPE>
337 static T *directPageGetter(
339 template <
typename T,
typename BASETYPE,
typename MYTYPE>
340 static T *directVector3PageGetter(
342 template <
typename T,
typename BASETYPE,
typename MYTYPE>
343 static T *directPageGetterRO(
345 template <
typename T,
typename BASETYPE,
typename MYTYPE>
346 static T *directVector3PageGetterRO(
348 template <
typename T,
typename BASETYPE,
int TUPLE_SIZE,
typename MYTYPE>
350 template <
typename T,
typename BASETYPE,
typename MYTYPE>
352 template <
typename T,
typename BASETYPE,
typename MYTYPE>
362 template <
typename BASE>
367 template <
typename DESTTYPE,
typename MYTYPE>
371 return GA_DataArray::directGetterScalar<DESTTYPE, MYTYPE>(
372 BASE::getData(atr), off, comp);
374 template <
typename SRCTYPE,
typename MYTYPE>
378 GA_DataArray::directSetterScalar<SRCTYPE, MYTYPE>(
379 BASE::getData(atr), off, comp,
val);
381 template <
typename SRCTYPE,
typename MYTYPE>
385 GA_DataArray::directAdderScalar<SRCTYPE, MYTYPE>(
386 BASE::getData(atr), off, comp,
val);
388 template <
typename DESTTYPE,
typename MYTYPE>
392 GA_DataArray::directGetterVector<DESTTYPE, MYTYPE>(
393 value, BASE::getData(atr), off);
395 template <
typename SRCTYPE,
typename MYTYPE>
399 GA_DataArray::directSetterVector<SRCTYPE, MYTYPE>(
400 BASE::getData(atr), off,
val);
402 template <
typename SRCTYPE,
typename MYTYPE>
406 GA_DataArray::directAdderVector<SRCTYPE, MYTYPE>(
407 BASE::getData(atr), off,
val);
410 template <
typename DESTTYPE,
typename MYTYPE>
414 return GA_DataArray::directVector3GetterScalar<DESTTYPE, MYTYPE>
415 (BASE::getData(atr), off, comp);
417 template <
typename SRCTYPE,
typename MYTYPE>
422 GA_DataArray::directVector3SetterScalar<SRCTYPE, MYTYPE>(
423 BASE::getData(atr), off, comp,
val);
425 template <
typename SRCTYPE,
typename MYTYPE>
430 GA_DataArray::directVector3AdderScalar<SRCTYPE, MYTYPE>(
431 BASE::getData(atr), off, comp,
val);
433 template <
typename DESTTYPE,
typename MYTYPE>
438 GA_DataArray::directVector3GetterVector<DESTTYPE, MYTYPE>(
439 value, BASE::getData(atr), off);
441 template <
typename SRCTYPE,
typename MYTYPE>
445 GA_DataArray::directVector3SetterVector<SRCTYPE, MYTYPE>(
446 BASE::getData(atr), off,
val);
448 template <
typename SRCTYPE,
typename MYTYPE>
452 GA_DataArray::directVector3AdderVector<SRCTYPE, MYTYPE>(
453 BASE::getData(atr), off,
val);
456 template <
typename T,
typename BASETYPE,
typename MYTYPE>
460 return GA_DataArray::directPageGetter<T, BASETYPE, MYTYPE>(
461 BASE::getData(atr), marshall, off, comp, isconstant);
463 template <
typename T,
typename BASETYPE,
typename MYTYPE>
467 return GA_DataArray::directVector3PageGetter<T, BASETYPE, MYTYPE>(
468 BASE::getData(atr), marshall, off, comp, isconstant);
470 template <
typename T,
typename BASETYPE,
typename MYTYPE>
473 GA_Offset off,
int comp,
bool &isconstant)
475 return GA_DataArray::directPageGetterRO<T, BASETYPE, MYTYPE>(
476 BASE::getData(atr), marshall, off, comp, isconstant);
478 template <
typename T,
typename BASETYPE,
typename MYTYPE>
481 GA_Offset off,
int comp,
bool &isconstant)
483 return GA_DataArray::directVector3PageGetterRO<T, BASETYPE, MYTYPE>(
484 BASE::getData(atr), marshall, off, comp, isconstant);
486 template <
typename T,
typename BASETYPE,
typename MYTYPE>
490 GA_DataArray::directPageSetter<T, BASETYPE, MYTYPE>(
491 BASE::getData(atr), srcdata, off, comp);
493 template <
typename T,
typename BASETYPE,
typename MYTYPE>
498 GA_DataArray::directVector3PageSetter<T, BASETYPE, MYTYPE>(
499 BASE::getData(atr), srcdata, off, comp);
514 void tryCompressSinglePage(
GA_Offset pageoffset);
526 void remapAndCount(
GA_Offset start_offset,
532 template <
typename T,
typename TB>
533 static bool nativeSetFullTuple(
GA_DataArray *
const* dest,
537 template <
typename T,
typename TB>
538 static bool nativeSetFullTuple(
GA_DataArray *
const* dest,
543 template <
typename T,
typename TB,
int VECTORSIZE>
546 template <
typename T,
typename TB,
int VECTORSIZE,
547 typename S_T,
typename S_TB,
int S_VECTORSIZE>
552 ga_PageTableBase *myPageTable;
555 int mySlice, myVectorSize;
Definition of a geometry attribute.
static void directAdderVector(GA_Attribute *atr, GA_Offset off, const SRCTYPE &val)
static void directGetterVector(DESTTYPE &value, const GA_Attribute *atr, GA_Offset off)
getFileOption("OpenEXR:storage") storage
static void directVector3AdderVector(GA_Attribute *atr, GA_Offset off, const SRCTYPE &val)
GLsizei const GLfloat * value
ga_SubPageBlock(GA_PageNum page, GA_PageOff start, GA_PageOff end)
static void directVector3GetterVector(DESTTYPE &value, const GA_Attribute *atr, GA_Offset off)
GA_Storage getStorage() const
Query the storage used for the array data.
The merge map keeps track of information when merging details.
GLboolean GLboolean GLboolean GLboolean a
static void directVector3SetterVector(GA_Attribute *atr, GA_Offset off, const SRCTYPE &val)
bool isSameType(const GA_DataArray &b) const
JSON reader class which handles parsing of JSON or bJSON files.
static void directSetterVector(GA_Attribute *atr, GA_Offset off, const SRCTYPE &val)
Class which writes ASCII or binary JSON streams.
static T * directVector3PageGetterRO(const GA_Attribute *atr, T *marshall, GA_Offset off, int comp, bool &isconstant)
exint GA_Size
Defines the bit width for index and offset types in GA.
GA_Offset getArraySize() const
Query the size of the array.
#define GA_INVALID_OFFSET
A range of elements in an index-map.
static void directVector3PageSetter(GA_Attribute *atr, const T *srcdata, GA_Offset off, int comp)
static T * directVector3PageGetter(GA_Attribute *atr, T *marshall, GA_Offset off, int comp, bool &isconstant)
fpreal getF(GA_Offset idx) const
static T * directPageGetterRO(const GA_Attribute *atr, T *marshall, GA_Offset off, int comp, bool &isconstant)
static DESTTYPE directVector3GetterScalar(const GA_Attribute *atr, GA_Offset off, int comp)
static void directVector3AdderScalar(GA_Attribute *atr, GA_Offset off, int comp, SRCTYPE val)
Keeps track of offset mapping when merging index lists.
static DESTTYPE directGetterScalar(const GA_Attribute *atr, GA_Offset off, int comp)
Direct access to compound objects.
An array of numbers with various storage types.
bool isNan(const float x)
Return true if x is a NaN (Not-A-Number) value.
static void directVector3SetterScalar(GA_Attribute *atr, GA_Offset off, int comp, SRCTYPE val)
Defragmentation of IndexMaps.
GLboolean GLboolean GLboolean b
static T * directPageGetter(GA_Attribute *atr, T *marshall, GA_Offset off, int comp, bool &isconstant)
LeafData & operator=(const LeafData &)=delete
static void directPageSetter(GA_Attribute *atr, const T *srcdata, GA_Offset off, int comp)
GLubyte GLubyte GLubyte GLubyte w
static void directSetterScalar(GA_Attribute *atr, GA_Offset off, int comp, SRCTYPE val)
static void directAdderScalar(GA_Attribute *atr, GA_Offset off, int comp, SRCTYPE val)