11 #ifndef __GA_SplittableRange__
12 #define __GA_SplittableRange__
58 range.split(range, *
this);
62 return myRange->is_divisible();
71 {
return myRange->getPageCount(); }
74 {
return myRange->getFirstOffsetInPage(relative_page); }
98 if (!myRange->is_divisible() || !myRange->split(list))
100 d1.setRange(list[0]);
101 d2.setRange(list[1]);
GA_API size_t UTestimatedNumItems(const GA_SplittableRange &range)
GA_Size getPageCount() const
Return the number of pages.
friend class GA_SplittableRange
exint GA_Size
Defines the bit width for index and offset types in GA.
A range of elements in an index-map.
bool split(GA_SplittableRange &d1, GA_SplittableRange &d2) const
Split this range into two new ranges by splitting the RTI.
GA_Size getMaxEntries() const
Get an upper bound on the range.
bool is_divisible() const
Abstract implementation of a range.
const GA_Range & operator=(const GA_Range &src)
GA_SplittableRange()
Default constructor; object must be assigned before use.
GA_Offset getFirstOffsetInPage(GA_Size relative_page) const
Get the offset of the first element in a page.
bool canMultiThread() const
Convenience method to test whether we can multi-thread.
static GA_Range divideWork(const GA_Range &r, const UT_JobInfo &j)
Static method to divide work for UT_ThreadedAlgorithm.