12 #ifndef __GA_OffsetList__
13 #define __GA_OffsetList__
36 #define GA_OFFSETLIST_VERBOSE_DEBUG 0
39 template<
typename FromType,
typename ToType,
typename INT_TYPE>
47 template <
typename FromType,
typename ToType,
typename INT_TYPE=ex
int>
52 template<
typename FromType2,
typename ToType2,
typename INT_TYPE2>
54 template<
typename FromType2,
typename ToType2,
typename INT_TYPE2>
79 data->myCapacity = capacity;
80 #if GA_OFFSETLIST_VERBOSE_DEBUG
81 printf(
"Allocating %p with ref count 1 and capacity %d\n", data,
int(capacity));
88 #if !(defined(_MSC_VER) && defined(__clang__))
98 #if GA_OFFSETLIST_VERBOSE_DEBUG
99 printf(
"Reallocating %p to %p with ref count %d from capacity %d to %d\n",
this, that,
int(that->myRefCount.relaxedLoad()),
int(that->myCapacity),
int(new_capacity));
103 that->myCapacity = new_capacity;
108 #if !(defined(_MSC_VER) && defined(__clang__))
111 if (myCapacity >= mincapacity)
114 mincapacity =
SYSmax(mincapacity, UTbumpAlloc(myCapacity));
121 #if !(defined(_MSC_VER) && defined(__clang__))
124 if (myCapacity == new_capacity)
135 const INT_TYPE *
src = getRawData();
136 if (new_capacity < size)
146 #if GA_OFFSETLIST_VERBOSE_DEBUG
150 #if GA_OFFSETLIST_VERBOSE_DEBUG
151 printf(
"Incrementing ref of %p with capacity %d from %d to %d\n",
this,
int(myCapacity),
int(new_count-1),
int(new_count));
155 printf(
"!!! ERROR: NEGATIVE REF COUNT INCREMENTED on %p !!!",
this);
162 exint new_count = myRefCount.add(-1);
163 #if GA_OFFSETLIST_VERBOSE_DEBUG
164 printf(
"Decrementing ref of %p with capacity %d from %d to %d\n",
this,
int(myCapacity),
int(new_count+1),
int(new_count));
168 printf(
"!!! ERROR: NEGATIVE REF COUNT DECREMENTED on %p !!!",
this);
172 #if !(defined(_MSC_VER) && defined(__clang__))
181 {
return myRefCount.relaxedLoad() != 1; }
185 {
return (inclusive ?
sizeof(*
this) : 0) +
sizeof(INT_TYPE)*myCapacity; }
191 {
return myCapacity; }
197 const INT_TYPE *
start = getRawData();
198 const INT_TYPE
offset = start[0];
199 for (INT_TYPE i = 1; i <
size; i++)
201 if (start[i] != offset+i)
212 const INT_TYPE *
data = getRawData();
213 INT_TYPE prev = data[0];
216 INT_TYPE cur = data[i];
233 FromType
remove(FromType i, FromType
size)
235 if (i < FromType(0) || i >=
size)
238 INT_TYPE *
start = getRawData();
239 for (FromType
j = i+1;
j <
size; ++
j)
241 start[
j-1] = start[
j];
247 INT_TYPE *array = getRawData();
249 const INT_TYPE *
end = array +
size;
250 for (; p !=
end; ++p)
254 FromType idx(p - array);
255 for (FromType
j = idx+1;
j <
size; ++
j)
257 array[
j-1] = array[
j];
266 INT_TYPE *
start = getRawData();
268 const INT_TYPE *
end = start +
size;
269 INT_TYPE *dest =
start;
272 if (*src != INT_TYPE(v))
283 const INT_TYPE *array = getRawData();
284 const INT_TYPE *p = array +
s;
285 const INT_TYPE *
end = array +
size;
286 for (; p !=
end; ++p)
289 return FromType(p - array);
293 FromType findSorted(ToType
v, FromType
s, FromType
size)
const;
299 return ((INT_TYPE *)(
this+1))[
index];
304 return ((
const INT_TYPE *)(
this+1))[
index];
308 { (*this)(
index) = value; }
311 {
return ToType((*
this)(
index)); }
315 INT_TYPE *
start = getRawData();
316 for (INT_TYPE i = 0; i < INT_TYPE(size); ++i)
317 start[i] = INT_TYPE(value);
323 #if !(defined(_MSC_VER) && defined(__clang__))
326 INT_TYPE *array = getRawData();
327 if (offset == ToType(0))
330 array[i] = ToType(data[i]);
335 array[i] = ToType(data[i]) +
offset;
341 INT_TYPE *array = getRawData();
343 array[i + destindex] = values[i + srcindex] + offset;
348 INT_TYPE *array = getRawData();
353 array[i + destindex] = combined + i;
359 array[i + destindex] = src[i + srcindex] + offset;
371 array.
cycle(how_many);
376 INT_TYPE *array = getRawData();
382 INT_TYPE *array = getRawData();
383 std::sort(array, array+size, std::less<INT_TYPE>());
388 if (size <= FromType(1))
391 INT_TYPE *array = getRawData();
393 std::sort(array, end, std::less<INT_TYPE>());
396 const INT_TYPE *
src = array+1;
397 INT_TYPE *dest = array+1;
398 INT_TYPE prev = array[0];
410 return FromType(dest-array);
415 const INT_TYPE *array = getRawData();
416 for ( ; start <
end; start++)
418 if (ToType(array[start]) == search)
425 const INT_TYPE *array = getRawData();
426 for ( ; start <
end; start++)
428 if (ToType(array[start]) != search)
436 const INT_TYPE *array = getRawData();
437 for ( ; start <
end; start++)
446 const INT_TYPE *array = getRawData();
447 for ( ; start <
end; start++)
458 return (
const INT_TYPE *)(
this+1);
463 return (INT_TYPE *)(
this+1);
485 #if GA_OFFSETLIST_VERBOSE_DEBUG
489 printf(
"%p listref copy constructor with data %p from %p\n",
this, src.
myData, &src);
493 memcpy(
this, &src,
sizeof(*
this));
502 #if GA_OFFSETLIST_VERBOSE_DEBUG
506 printf(
"%p listref move constructor with data %p from %p\n",
this, src.
myData, &src);
509 memcpy(
this, &src,
sizeof(*
this));
518 UT_ASSERT_MSG(0,
"GA_ListTypeRef cannot be move-constructed from GA_ListType, because the data will be invalid momentarily.");
527 myTrivialOffset = startvalue;
528 myIsFlagSet = flag_set;
539 #if GA_OFFSETLIST_VERBOSE_DEBUG
543 printf(
"%p listref copy constructor with data %p from %p\n",
this, src.
myData, &src);
547 memcpy(
this, &src,
sizeof(*
this));
557 #if GA_OFFSETLIST_VERBOSE_DEBUG
561 printf(
"%p listref move constructor with data %p from %p\n",
this, src.
myData, &src);
565 memcpy(
this, &src,
sizeof(*
this));
575 UT_ASSERT_MSG(0,
"GA_ListTypeRef cannot be move-assigned from GA_ListType, because the data will be invalid momentarily.");
598 myTrivialOffset = startvalue;
609 myTrivialOffset = startvalue;
618 return isTrivial() ? 0 : myData->capacity();
628 return FromType(mySize);
661 (mySize == that.
mySize) &&
664 return (myData == that.
myData);
668 bool isAscending()
const;
673 FromType
find(ToType
value, FromType
s = FromType(0))
const;
676 FromType findSorted(ToType value, FromType
s=FromType(0))
const;
682 #if !(defined(_MSC_VER) && defined(__clang__))
687 : myData->get(
index);
694 #if !(defined(_MSC_VER) && defined(__clang__))
697 return ToType(myTrivialOffset);
702 FromType
start, FromType
end)
const;
707 exint last_index = mySize-1;
709 ? ToType(myTrivialOffset+last_index)
710 : myData->get(FromType(last_index));
726 FromType matchingindex = FromType(
GA_Size(search) -
GA_Size(myTrivialOffset));
727 if (matchingindex >= start && matchingindex < end)
728 return matchingindex;
732 return myData->findInRange(start, end, search);
738 FromType matchingindex = FromType(
GA_Size(search) -
GA_Size(myTrivialOffset));
740 if (matchingindex != start)
747 return myData->findInRangeNotEqual(start, end, search);
761 return myData->findValidInRange(start, end);
775 return myData->findInvalidInRange(start, end);
780 template<
typename FUNCTOR>
786 ToType
value(myTrivialOffset);
787 const ToType
end(value + mySize);
795 const INT_TYPE *
data = myData->getRawData();
796 const INT_TYPE *
const end = data + mySize;
799 functor(ToType(*data));
805 template<
typename FUNCTOR>
811 const ToType
end(myTrivialOffset);
812 for (ToType value = end + mySize; value-->end; )
817 const INT_TYPE *
const end = myData->getRawData();
818 for (
const INT_TYPE *
data = end + mySize;
data-->end; )
819 functor(ToType(*
data));
824 template <
typename LIST_T>
840 template <
typename EIT>
843 , myCurrent(src.myCurrent)
848 return myList->get(myCurrent);
852 return myList->get(myCurrent);
856 return myList->get(myCurrent+n);
890 {
return (*
this) += (-
n); }
892 {
return (*
this) + (-
n); }
893 template <
typename LT>
895 {
return r.myCurrent == myCurrent; }
896 template <
typename LT>
898 {
return r.myCurrent != myCurrent; }
901 template <typename LT> \
902 bool operator OP(const base_iterator<LT> &r) const { \
903 return myCurrent OP r.myCurrent; \
910 template <
typename LT>
912 {
return (myCurrent - r.myCurrent); }
957 #ifndef SESI_LITTLE_ENDIAN
958 #error "Make sure the bitfields in the union work on big endian platforms!"
979 template <
typename FromType,
typename ToType,
typename INT_TYPE=ex
int>
984 template<
typename FromType2,
typename ToType2,
typename INT_TYPE2>
986 template<
typename FromType2,
typename ToType2,
typename INT_TYPE2>
1028 #if GA_OFFSETLIST_VERBOSE_DEBUG
1029 printf(
"%p adding reference to %p (orig reference by list %p) in copy constructor\n",
this, src.
myData, &src);
1043 #if GA_OFFSETLIST_VERBOSE_DEBUG
1046 printf(
"%p stealing reference to %p (orig reference by list %p) in move constructor\n",
this, src.
myData, &src);
1065 #if GA_OFFSETLIST_VERBOSE_DEBUG
1066 printf(
"%p adding reference to %p (orig reference by listref %p) in list(listref) type conversion constructor\n",
this, src.
myData, &src);
1079 :
Base(startvalue, size, flag_set)
1091 #if GA_OFFSETLIST_VERBOSE_DEBUG
1092 printf(
"%p removing reference to %p in desctructor\n",
this,
myData);
1105 #if GA_OFFSETLIST_VERBOSE_DEBUG
1106 printf(
"%p removing reference to %p in copy assignment operator\n",
this,
myData);
1113 #if GA_OFFSETLIST_VERBOSE_DEBUG
1114 printf(
"%p adding reference to %p (orig reference by list %p) in copy assignment operator\n",
this, src.
myData, &src);
1130 #if GA_OFFSETLIST_VERBOSE_DEBUG
1131 printf(
"%p removing reference to %p in move assignment operator\n",
this,
myData);
1136 #if GA_OFFSETLIST_VERBOSE_DEBUG
1137 if (!src.isTrivial())
1139 printf(
"%p stealing reference to %p (orig reference by list %p) in move assignment operator\n",
this, src.myData, &src);
1145 src.myIsTrivial =
true;
1159 #if GA_OFFSETLIST_VERBOSE_DEBUG
1160 printf(
"%p removing reference to %p in copy-from-listref assignment operator\n",
this,
myData);
1167 #if GA_OFFSETLIST_VERBOSE_DEBUG
1168 printf(
"%p adding reference to %p (orig reference by listref %p) in copy-from-listref assignment operator\n",
this, src.
myData, &src);
1194 #if GA_OFFSETLIST_VERBOSE_DEBUG
1195 printf(
"%p removing reference to %p in clear function\n",
this,
myData);
1217 #if GA_OFFSETLIST_VERBOSE_DEBUG
1218 printf(
"%p removing reference to %p in setTrivial(start,size)\n",
this,
myData);
1235 #if GA_OFFSETLIST_VERBOSE_DEBUG
1236 printf(
"%p removing reference to %p in setTrivial(start,size,flag)\n",
this,
myData);
1250 void setEntries(FromType sz,
bool doresize=
true);
1254 void reserve(FromType mincapacity);
1275 return FromType(
mySize-1);
1281 return FromType(
mySize-1);
1289 FromType
insert(FromType i, ToType value);
1296 FromType
remove(FromType i);
1306 #if !(defined(_MSC_VER) && defined(__clang__))
1321 #if !(defined(_MSC_VER) && defined(__clang__))
1339 template<
typename S>
1348 ToType
first = ToType(data[0]);
1349 bool istrivial =
true;
1352 if (ToType(data[i]) != first + ToType(i))
1365 #if !(defined(_MSC_VER) && defined(__clang__))
1368 newdata->set(data, size, offset);
1378 bool ismatch =
true;
1400 bool ismatch =
true;
1417 FromType endindex = startindex + nelements;
1420 if (startindex == FromType(0) && nelements >=
mySize)
1428 if (endindex > FromType(
mySize))
1433 else if (startindex == FromType(0) && nelements >=
mySize)
1443 for (
GA_Size i = 0; i < nelements; ++i)
1444 data->
set(startindex + i, startvalue + i);
1462 #if !(defined(_MSC_VER) && defined(__clang__))
1465 INT_TYPE *array = data->getRawData();
1468 #if GA_OFFSETLIST_VERBOSE_DEBUG
1469 printf(
"%p taking ownership of new %p in harden()\n",
this, data);
1479 #if GA_OFFSETLIST_VERBOSE_DEBUG
1480 printf(
"%p removing reference to %p in harden(), and taking ownership of new %p\n",
this,
myData, data);
1493 #if !(defined(_MSC_VER) && defined(__clang__))
1504 #if !(defined(_MSC_VER) && defined(__clang__))
1507 INT_TYPE *array = data->getRawData();
1508 if (mincapacity <
mySize)
1512 #if GA_OFFSETLIST_VERBOSE_DEBUG
1513 printf(
"%p taking ownership of new %p in harden(mincapacity)\n",
this, data);
1523 #if GA_OFFSETLIST_VERBOSE_DEBUG
1524 printf(
"%p removing reference to %p in harden(mincapacity), and taking ownership of new %p\n",
this,
myData, data);
1537 if (mincapacity <
mySize)
1542 #if GA_OFFSETLIST_VERBOSE_DEBUG
1543 printf(
"%p bumping capacity of %p, current capacity = %d in harden(mincapacity=%d)\n",
this,
myData,
int(mincapacity),
int(
myData->
capacity()));
1546 #if GA_OFFSETLIST_VERBOSE_DEBUG
1551 #if !(defined(_MSC_VER) && defined(__clang__))
1567 #if GA_OFFSETLIST_VERBOSE_DEBUG
1568 printf(
"%p adding reference to %p in incDataRef()\n",
this,
myData);
1579 template <
typename FromType,
typename INT_TYPE=ex
int>
1683 bool jsonSaveTranslatedArray(
SYS_FORCE_INLINE void clear()
clear removes all of the entries
const_iterator begin() const
A class to manage an ordered array which has fixed offset handles.
SYS_FORCE_INLINE INT_TYPE * getArray()
SYS_FORCE_INLINE GA_ListType()
Default constructor.
FromType multipleInsert(FromType i, GA_Size count)
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
reference operator*() const
UT_ASSERT_COMPILETIME(BRAY_EVENT_MAXFLAGS<=32)
SYS_FORCE_INLINE GA_ListType(const GA_ListType &src)
Copy constructor.
void harden(exint mincapacity)
base_iterator operator++(int)
const_iterator end() const
void copyAdd(FromType destindex, const GA_ListTypeRef< FromType, ToType, S > &values, FromType srcindex, GA_Size n, ToType offset)
SYS_FORCE_INLINE GA_ListType(ToType startvalue, GA_Size size, bool flag_set=false)
Trivial list constructor.
FromType append(ToType value)
Add a single entry (may grow array)
Used to pass options and map offset values during saving.
void cycle(GA_Size how_many)
Cyclically shift the entire array by how_many.
FromType findInRange(FromType start, FromType end, ToType search) const
SYS_FORCE_INLINE ToType operator[](FromType i) const
bool operator!=(const base_iterator< LT > &r) const
SYS_FORCE_INLINE void set(FromType index, ToType value)
void copyAdd(FromType destindex, const int *values, GA_Size srcindex, GA_Size n, ToType offset)
SYS_FORCE_INLINE void setTrivial(ToType startvalue, GA_Size size)
Makes the list a trivial list with the specified start value and size.
GA_OffsetListType(const GA_OffsetListType &src)
void sortAndRemoveDuplicates()
Sort entries into ascending order and remove duplicates.
auto printf(const S &fmt, const T &...args) -> int
GA_OffsetListType< GA_Size > GA_OffsetList
GA_OffsetList is a map from index to offset.
GLsizei const GLfloat * value
FromType findInRangeNotEqual(FromType start, FromType end, ToType search) const
SYS_FORCE_INLINE int64 getMemoryUsage(bool inclusive) const
base_iterator & operator--()
void constant(ToType value)
Set all entries to a constant value.
base_iterator & operator+=(FromType n)
ListTypeData * reallocate(exint new_capacity)
void copyAdd(FromType destindex, const GA_ListTypeRef< FromType, ToType > &values, FromType srcindex, GA_Size n, ToType offset)
SYS_FORCE_INLINE bool getExtraFlag() const
Synonym for isClosed()
SYS_FORCE_INLINE void relaxedStore(T val)
void setTrivial(ToType startvalue, GA_Size size)
Makes the list a trivial list with the specified start value and size.
void reverse(I begin, I end)
void cycle(exint how_many)
Cyclically shifts the entire array by how_many.
FromType findInRangeNotEqual(FromType start, FromType end, ToType search) const
void setTrivialRange(FromType startindex, ToType startvalue, GA_Size nelements)
void reverse(FromType size)
SYS_FORCE_INLINE void forEachReverse(FUNCTOR &&functor) const
Like forEach() except iterates in reverse order.
base_iterator operator-(FromType n) const
JSON reader class which handles parsing of JSON or bJSON files.
base_iterator< const this_type > const_iterator
base_iterator< this_type > iterator
Class which writes ASCII or binary JSON streams.
SYS_FORCE_INLINE GA_ListType(GA_ListType &&src) noexcept
Move constructor.
#define UT_ASSERT_MSG_P(ZZ,...)
FromType findInvalidInRange(FromType start, FromType end) const
typename Base::ListTypeData ListTypeData
GA_ListTypeRef< GA_Size, GA_Offset > GA_OffsetListRef
unsigned long long uint64
SYS_FORCE_INLINE GA_ListType & operator=(const Base &src)
OIIO_FORCEINLINE vbool4 insert(const vbool4 &a, bool val)
Helper: substitute val for a[i].
FromType findValidInRange(FromType start, FromType end) const
SYS_FORCE_INLINE bool GAisValid(GA_Size v)
SYS_FORCE_INLINE GA_ListType & operator=(const GA_ListType &src)
Copy assignment operator.
SYS_FORCE_INLINE void forEach(FUNCTOR &&functor) const
exint GA_Size
Defines the bit width for index and offset types in GA.
SYS_FORCE_INLINE GA_ListTypeRef()
Default constructor.
bool operator==(const base_iterator< LT > &r) const
SYS_FORCE_INLINE int64 getMemoryUsage(bool inclusive) const
Report memory usage (includes all shared memory)
FromType operator-(const base_iterator< LT > &r) const
#define UT_ASSERT_MSG(ZZ,...)
void set(FromType index, ToType value)
Set the index to the value.
GA_OffsetListType(const GA_ListTypeRef< FromType, GA_Offset, INT_TYPE > &src)
SYS_FORCE_INLINE INT_TYPE * getRawData()
SYS_FORCE_INLINE bool isTrivial() const
ListTypeData * setCapacity(exint new_capacity)
auto base_iterator(std::back_insert_iterator< Container > &it, checked_ptr< typename Container::value_type >) -> std::back_insert_iterator< Container >
void removeLast()
Remove the last entry.
SYS_FORCE_INLINE INT_TYPE & operator()(exint index)
SYS_FORCE_INLINE GA_ListType(const Base &src)
bool isAscending(exint size) const
FromType findAndRemove(ToType i)
Find an entry and remove it from the list.
base_iterator(const base_iterator< EIT > &src)
base_iterator & operator++()
FromType findValidInRange(FromType start, FromType end) const
static const intptr_t FLAG_MASK
void countMemory(UT_MemoryCounter &counter, bool inclusive) const
static const intptr_t POINTER_MASK
ListTypeData * copy(exint size, exint new_capacity) const
SYS_FORCE_INLINE GA_ListTypeRef(ToType startvalue, GA_Size size, bool flag_set=false)
Trivial list constructor.
SYS_FORCE_INLINE const INT_TYPE & operator()(exint index) const
void changeSize(FromType new_capacity)
auto get(const UT_ARTIterator< T > &it) -> decltype(it.key())
Defragmentation of IndexMaps.
GA_Size removeAll(ToType v, FromType size)
FromType findAndRemove(ToType v, FromType size)
SYS_FORCE_INLINE const INT_TYPE * getRawData() const
GA_Size GA_Index
Define the strictness of GA_Offset/GA_Index.
void unsafeShareData(UT_Array< T > &src)
base_iterator(LIST_T *list, FromType c)
SYS_FORCE_INLINE ToType operator()(FromType i) const
Convenience () operator to access the list entries.
auto search(const T &set, const V &val) -> std::pair< bool, decltype(std::begin(detail::smart_deref(set)))>
A search function.
auto reserve(std::back_insert_iterator< Container > it, size_t n) -> checked_ptr< typename Container::value_type >
bool isSame(const GA_ListTypeRef &that) const
ToType last() const
Return the value of the last element.
GA_Size removeAll(ToType i)
Remove all matching entries from the list.
SYS_FORCE_INLINE GA_Size capacity() const
Returns the allocated capacity of the list.
void sortAscending(FromType size)
SYS_FORCE_INLINE void setClosed(bool v)
Synonym for setExtraFlag(bool)
base_iterator operator+(FromType n) const
base_iterator operator--(int)
GLenum GLsizei GLsizei GLint * values
std::random_access_iterator_tag iterator_category
static const intptr_t TRIVIAL_MASK
void cycle(GA_Size how_many, FromType size)
SYS_FORCE_INLINE void setExtraFlag(bool v)
Synonym for setClosed(bool)
LeafData & operator=(const LeafData &)=delete
void setTrivial(ToType startvalue, GA_Size size, bool flag)
SYS_FORCE_INLINE void setTrivial(ToType startvalue, GA_Size size, bool flag)
reference operator[](FromType n) const
void setEntries(FromType sz, bool doresize=true)
SYS_FORCE_INLINE GA_Size capacity() const
void set(const S *data, exint size, ToType offset)
FromType findInvalidInRange(FromType start, FromType end) const
FromType findInRange(FromType start, FromType end, ToType search) const
SYS_FORCE_INLINE ToType get(FromType index) const
Get the the value at the index.
FromType sortAndRemoveDuplicates(FromType size)
FromType find(ToType v, FromType s, FromType size) const
SYS_FORCE_INLINE GA_ListType & operator=(GA_ListType &&src) noexcept
Move assignment operator.
GLubyte GLubyte GLubyte GLubyte w
SYS_FORCE_INLINE GA_OffsetListType & operator=(const GA_ListTypeRef< FromType, GA_Offset, INT_TYPE > &src)
SYS_FORCE_INLINE ToType trivialStart() const
Returns the start, assuming this list is trivial.
SYS_FORCE_INLINE ~GA_ListType()
Destructor.
FromType removeIndex(FromType i)
Alias for remove to match UT array types.
void constant(ToType value, FromType size)
void sortAscending()
Sort entries into ascending order.
GA_OffsetListType(const UT_Array< GA_Offset > &src, FromType start=FromType(0), FromType end=FromType(-1))
void copyAdd(FromType destindex, const S *values, GA_Size srcindex, GA_Size n, ToType offset)
void set(const S *data, exint size, ToType offset)
void sort(I begin, I end, const Pred &pred)
SYS_FORCE_INLINE void clear()
clear removes all of the entries
SYS_FORCE_INLINE bool isClosed() const
Synonym for getExtraFlag()
static ListTypeData * allocate(exint capacity)
SYS_FORCE_INLINE GA_ListTypeRef & operator=(const GA_ListTypeRef &src)=default
Copy assignment operator.
bool isTrivial(exint size) const
SYS_FORCE_INLINE FromType size() const
Returns the number of used elements in the list (always <= capacity())
FMT_CONSTEXPR auto find(Ptr first, Ptr last, T value, Ptr &out) -> bool
SYS_FORCE_INLINE const INT_TYPE * getArray() const
base_iterator & operator-=(FromType n)
SYS_FORCE_INLINE FromType entries() const
Returns the number of used elements in the list (always <= capacity())
ListTypeData * bumpCapacity(exint mincapacity)