11 #ifndef __GT_DAIndexedDict__
12 #define __GT_DAIndexedDict__
32 const
char* className()
const override
34 return "GT_DAIndexedDict";
50 return myDictionaries.getMemoryUsage() +
51 sizeof(
int32)*mySize*myTupleSize;
53 return sizeof(
int32)*mySize*myTupleSize;
61 offset = offset*myTupleSize +
index;
68 offset = offset*myTupleSize +
index;
75 offset = offset*myTupleSize +
index;
82 offset = offset*myTupleSize +
index;
89 offset = offset*myTupleSize +
index;
96 offset = offset*myTupleSize +
index;
107 return myDictionaries.getItemIdUpperBound() + 1;
111 return getI32(offset, idx);
121 offset = offset * myTupleSize +
index;
123 return (
id >= 0) ? *myDictionaries.get(
id)
134 freeDictionary(offset, index);
137 offset = offset * myTupleSize +
index;
139 myData[
offset] = myDictionaries.add(dict);
140 myDictionaries.remove(old_id);
151 mySize * myTupleSize *
sizeof(
int32));
152 myDictionaries.clear();
156 for (
GT_Size i = size; i < mySize; ++i)
159 freeDictionary(i,
j);
162 myData = (
int32 *)GT_Memory::Realloc(
164 mySize * myTupleSize *
sizeof(
int32),
165 size * myTupleSize *
sizeof(
int32));
170 myData[i * myTupleSize +
j] = -1;
180 offset = offset*myTupleSize +
index;
181 if (myData[offset] >= 0)
183 myDictionaries.remove(myData[offset]);
void getIndexedStrings(UT_StringArray &, UT_IntArray &) const override
GT_DataArrayHandle harden() const override
Create a "hardened" version of the array.
GLsizei GLenum const void * indices
GT_Offset getDictIndex(GT_Offset offset, int idx) const override
fpreal64 getF64(GT_Offset offset, int index=0) const override
SYS_FORCE_INLINE T * SYSconst_cast(const T *foo)
exint UT_IndexedHashSetItemId
Each item in the shared map is assigned a unique id.
GT_String getS(GT_Offset, int) const override
Abstract data class for an array of float, int or string data.
UT_IntrusivePtr< GT_DataArray > GT_DataArrayHandle
GT_Type getTypeInfo() const override
Return "type" information for the data. This defaults to GT_TYPE_NONE.
static const UT_StringHolder theEmptyString
int64 getI64(GT_Offset offset, int index=0) const override
uint8 getU8(GT_Offset offset, int index=0) const override
static const UT_OptionsHolder theEmptyOptions
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
GT_Size getTupleSize() const override
Number of elements for each array element.
virtual void getIndexedDicts(UT_Array< UT_OptionsHolder > &dicts, UT_IntArray &indices) const =0
GT_Size entries() const override
Number of entries in the array.
GT_Size getDictIndexCount() const override
GT_Dict getDict(GT_Offset offset, int index=0) const override
int64 getMemoryUsage() const override
GT_Storage getStorage() const override
Type of data stored in the array.
ImageBuf OIIO_API resize(const ImageBuf &src, string_view filtername="", float filterwidth=0.0f, ROI roi={}, int nthreads=0)
fpreal32 getF32(GT_Offset offset, int index=0) const override
int32 getI32(GT_Offset offset, int index=0) const override
fpreal16 getF16(GT_Offset offset, int index=0) const override
GT_Size getStringIndexCount() const override
void setDict(GT_Size offset, int index, const GT_Dict &dict)
virtual int32 getI32(GT_Offset offset, int idx=0) const =0
GT_Offset getStringIndex(GT_Offset, int) const override