![]() |
NDEVR
API Documentation
|
An RTree extension that supports multi-threaded tree construction and bounding box computation. More...
Public Member Functions | |
| ThreadedRTree (const RTree< t_dims, t_type > &tree) | |
| Copy constructs a ThreadedRTree from an existing RTree. | |
| ThreadedRTree (RTree< t_dims, t_type > &&tree) | |
| Move constructs a ThreadedRTree from an existing RTree. | |
| ThreadedRTree (uint04 bucket_size) | |
| Constructs a ThreadedRTree with the given bucket size. | |
| template<class t_node_type> | |
| bool | _balanceLeafNodeThreaded (uint04 level, const uint04 node_index, const Buffer< t_node_type > &elements, Buffer< uint04 > &indices, uint04 start, uint04 end, ProgressInfo &progress) |
| Recursively balances leaf nodes using thread splitting when beneficial. | |
| template<class t_node_type> | |
| Bounds< t_dims, t_type > | _getBoundingBoxThreaded (uint04 top_level, const Buffer< uint04 > &indices, const Buffer< t_node_type > &elements, uint04 start, uint04 end) |
| Computes the bounding box of elements using multi-threaded divide and conquer. | |
| template<class t_node_type> | |
| bool | addAllThreaded (const Buffer< t_node_type > &elements, InfoPipe *progress=nullptr) |
| Adds all elements to the tree using multi-threaded balancing. | |
| template<class t_node_type> | |
| bool | addAllThreaded (const Buffer< t_node_type > &elements, uint04 start_index, uint04 end_index, InfoPipe *progress=nullptr) |
| Adds a range of elements to the tree using multi-threaded balancing. | |
| void | splitLeafNode (uint04 index) final override |
| Thread-safe override that splits a leaf node using a mutex lock. | |
Public Attributes | |
| uint04 | m_number_of_threads |
| The number of threads to use for parallel operations. | |
| std::mutex | m_split_lock |
| Mutex protecting leaf node splits during multi-threaded construction. | |
An RTree extension that supports multi-threaded tree construction and bounding box computation.
Definition at line 43 of file ThreadedRTree.h.
|
inlineexplicit |
Constructs a ThreadedRTree with the given bucket size.
| [in] | bucket_size | The maximum number of elements per leaf node. |
Definition at line 1 of file ThreadedRTree.h.
|
inline |
Copy constructs a ThreadedRTree from an existing RTree.
| [in] | tree | The tree to copy. |
Definition at line 1 of file ThreadedRTree.h.
|
inline |
Move constructs a ThreadedRTree from an existing RTree.
| [in] | tree | The tree to move from. |
Definition at line 1 of file ThreadedRTree.h.
|
inline |
Recursively balances leaf nodes using thread splitting when beneficial.
| [in] | level | The current recursion level for thread-count decisions. |
| [in] | node_index | The tree node index to balance. |
| [in] | elements | The elements buffer. |
| [in] | indices | The index buffer for partitioning. |
| [in] | start | The start index in the partition. |
| [in] | end | The end index in the partition. |
| [in] | progress | Progress reporting interface. |
Definition at line 125 of file ThreadedRTree.h.
References _balanceLeafNodeThreaded(), and m_number_of_threads.
Referenced by _balanceLeafNodeThreaded(), addAllThreaded(), and addAllThreaded().
|
inline |
Computes the bounding box of elements using multi-threaded divide and conquer.
| [in] | top_level | The current recursion level for thread-count decisions. |
| [in] | indices | The index buffer. |
| [in] | elements | The elements buffer. |
| [in] | start | The start index. |
| [in] | end | The end index. |
Definition at line 157 of file ThreadedRTree.h.
References _getBoundingBoxThreaded(), and m_number_of_threads.
Referenced by _getBoundingBoxThreaded(), and addAllThreaded().
|
inline |
Adds all elements to the tree using multi-threaded balancing.
| [in] | elements | The elements to add. |
| [in] | progress | Optional progress pipe for cancellation and reporting. |
Definition at line 73 of file ThreadedRTree.h.
References _balanceLeafNodeThreaded(), _getBoundingBoxThreaded(), and cast().
|
inline |
Adds a range of elements to the tree using multi-threaded balancing.
| [in] | elements | The elements to add. |
| [in] | start_index | The start index in the elements buffer. |
| [in] | end_index | The end index in the elements buffer. |
| [in] | progress | Optional progress pipe for cancellation and reporting. |
Definition at line 97 of file ThreadedRTree.h.
References _balanceLeafNodeThreaded(), and cast().
|
inlinefinaloverride |
Thread-safe override that splits a leaf node using a mutex lock.
| [in] | index | The index of the leaf node to split. |
Definition at line 181 of file ThreadedRTree.h.
References m_split_lock.