An iteration range over a 2D data set. Splits occur along the largest dimension unless the minimum size is reached for all dimensions. Successive splits result in a Kd-tree where each leaf represents a unit of work.
More...
#include <KdRange2d.h>
|
|
using | iter_type = TIterType |
| |
|
using | range_type = Range1d< iter_type > |
| |
|
using | split_result = SplitResult< KdRange2d, MAX_SPLITS, DIMENSIONALITY > |
| |
|
using | size_type = typename range_type::size_type |
| |
|
|
| KdRange2d (KdRange2d const &)=default |
| |
| GTS_INLINE | KdRange2d (iter_type xBegin, iter_type xEnd, size_type xMinSize, iter_type yBegin, iter_type yEnd, size_type yMinSize, size_type xSplitOnMultiplesOf=1, size_type ySplitOnMultiplesOf=1) |
| | Constructs a KdRange2d. More...
|
| |
|
GTS_INLINE range_type const & | xRange () const |
| |
|
GTS_INLINE range_type & | xRange () |
| |
|
GTS_INLINE range_type const & | yRange () const |
| |
|
GTS_INLINE range_type & | yRange () |
| |
|
GTS_INLINE range_type const & | subRange (SubRangeIndex::Type index) const |
| |
|
GTS_INLINE range_type & | subRange (SubRangeIndex::Type index) |
| |
|
GTS_INLINE KdRange2d | xNeighbor () const |
| |
|
GTS_INLINE KdRange2d | yNeighbor () const |
| |
|
GTS_INLINE void | resetInitialSize (size_type initSize, SubRangeIndex::Type index) |
| |
|
GTS_INLINE bool | isDivisible () const |
| |
|
GTS_INLINE bool | empty () const |
| |
|
GTS_INLINE size_t | size () const |
| |
| template<typename TSplitter > |
| GTS_INLINE void | split (split_result &results, TSplitter const &splitter) |
| | Splits the range into two possible subranges. There are two cases based which dimensions are divisible. More...
|
| |
|
|
static GTS_INLINE uint16_t | adjustDivisor (uint16_t initialSplitDepth, bool isStatic) |
| |
|
static GTS_INLINE uint16_t | splitInitialDepth (uint16_t initialSplitDepth, bool isStatic) |
| |
|
static GTS_INLINE uint16_t | finalSplitDivisor (uint16_t initialSplitDepth, bool isStatic) |
| |
|
|
static constexpr SubRangeIndex::Type | X = SubRangeIndex::X |
| |
|
static constexpr SubRangeIndex::Type | Y = SubRangeIndex::Y |
| |
|
static constexpr size_t | SPLIT_FACTOR = 2 |
| |
|
static constexpr size_t | MAX_SPLITS = SPLIT_FACTOR - 1 |
| |
|
static constexpr size_t | DIMENSIONALITY = 2 |
| |
template<typename TIterType>
class gts::KdRange2d< TIterType >
An iteration range over a 2D data set. Splits occur along the largest dimension unless the minimum size is reached for all dimensions. Successive splits result in a Kd-tree where each leaf represents a unit of work.
Derivative of TBB blocked_range2d. https://github.com/intel/tbb
◆ KdRange2d()
template<typename TIterType >
| GTS_INLINE gts::KdRange2d< TIterType >::KdRange2d |
( |
iter_type |
xBegin, |
|
|
iter_type |
xEnd, |
|
|
size_type |
xMinSize, |
|
|
iter_type |
yBegin, |
|
|
iter_type |
yEnd, |
|
|
size_type |
yMinSize, |
|
|
size_type |
xSplitOnMultiplesOf = 1, |
|
|
size_type |
ySplitOnMultiplesOf = 1 |
|
) |
| |
|
inline |
Constructs a KdRange2d.
- Parameters
-
| xBegin | An iterator to the beginning of the x-dimension range. |
| xEnd | An iterator to the end of the x-dimension range. |
| xMinSize | The smallest sub-range the x-dimension can be divided into. Must be >= splitOnMultiplesOf. |
| yBegin | An iterator to the beginning of the y-dimension range. |
| yEnd | An iterator to the end of the y-dimension range. |
| yMinSize | The smallest sub-range the y-dimension can be divided into. Must be >= splitOnMultiplesOf. |
| xSplitOnMultiplesOf | Tries to ensure that each sub-range in the x-dimensions is a multiple of this value. |
| ySplitOnMultiplesOf | Tries to ensure that each sub-range in the y-dimensions is a multiple of this value. |
◆ split()
template<typename TIterType >
template<typename TSplitter >
Splits the range into two possible subranges. There are two cases based which dimensions are divisible.
- Parameters
-
| result | The returned results from the split. |