14 #ifndef __UT_RLEBitArray__
15 #define __UT_RLEBitArray__
30 enum { LOWEST_INDEX = INT_MIN };
47 int numBitsSet()
const;
49 int getBit(
int idx)
const;
50 bool getBitRun(
int idx,
int &
start,
int &
end)
const;
52 void setBitTrue(
int idx);
53 void setBitFalse(
int idx);
61 void setBitRunTrue(
int start,
int end );
63 int toggleBit(
int idx);
76 bool iterate(
int ¤t_bit );
78 int64 getMemoryUsage()
const;
124 if (myI > myNode->myEnd)
126 myNode =
static_cast<const Node *
>(myNode->next());
128 myI = myNode->myStart;
136 if (myNode != rhs.myNode)
138 return (myNode ? (myI == rhs.myI) :
true);
142 return !(*
this == lhs);
147 return myNode->myStart;
151 return myNode->myEnd + 1;
156 : myNode(static_cast<const Node *>(list.
head()))
157 , myI(myNode ? myNode->myStart : LOWEST_INDEX)
174 void restartSearch()
const;
175 void restartSearchForIndex(
int idx )
const;
176 void advanceSearchNode()
const;
203 mutable Node *mySearchNode;
204 mutable int myLastIndex;
216 me = (Node *)myList.head();
220 n += me->myEnd - me->myStart + 1;
221 me = (Node *)myList.next(me);
228 UT_RLEBitArray::restartSearch()
const
230 mySearchNode = (
Node *)myList.
head();
235 UT_RLEBitArray::restartSearchForIndex(
int idx )
const
237 if( !mySearchNode || idx < myLastIndex )
239 while( mySearchNode && idx > mySearchNode->myEnd )
244 UT_RLEBitArray::advanceSearchNode()
const
246 myLastIndex = mySearchNode->myEnd + 1;
247 mySearchNode = (
Node *)myList.
next(mySearchNode);
253 restartSearchForIndex( idx );
258 (idx >= mySearchNode->myStart) && (idx <= mySearchNode->myEnd) )
261 UT_ASSERT( !mySearchNode || idx < mySearchNode->myEnd );
int operator()(int index) const
OrtDmlDeviceFilter & operator^=(OrtDmlDeviceFilter &a, OrtDmlDeviceFilter b)
UT_StringArray JOINTS head
int getBit(int idx) const
int operator[](int index) const
void swap(T &lhs, T &rhs)
void setBit(int idx, int value)
UT_LinkNode * head() const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
const_iterator end() const
OrtDmlDeviceFilter & operator&=(OrtDmlDeviceFilter &a, OrtDmlDeviceFilter b)
LeafData & operator=(const LeafData &)=delete
const_iterator begin() const
const_iterator & operator++()
bool operator==(const const_iterator &rhs) const
#define UT_SWAPPER_CLASS(T)
OIIO_FORCEINLINE const vint4 & operator-=(vint4 &a, const vint4 &b)
UT_LinkNode * next(UT_LinkNode *node) const
bool operator!=(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
OrtDmlDeviceFilter & operator|=(OrtDmlDeviceFilter &a, OrtDmlDeviceFilter b)
bool operator!=(const const_iterator &lhs) const