Fermat
|
GPU-based middle-split k-d tree builder
This class provides the context to generate k-d trees on the GPU starting from a set of unordered points. The output is a set of nodes with the corresponding leaves and a set of primitive indices into the input set of points. The output leaves will specify contiguous ranges into this index.
Integer | an integer type that determines the number of bits used to compute the points' Morton codes. Accepted values are uint32 and uint64. |
OutputTree | a template class used to write the output tree, with the following interface: |
The following code snippet shows how to use this builder:
#include <kd_builder.h>
Public Methods | |
template<typename OutputTree , typename Iterator , typename BboxType > | |
void | build (OutputTree &out_tree, vector< device_tag, uint32 > &out_index, const BboxType bbox, const Iterator points_begin, const Iterator points_end, const uint32 max_leaf_size) |
Public Members | |
vector< device_tag, Integer > | m_codes |
caching_device_vector< Integer > | m_temp_codes |
caching_device_vector< uint32 > | m_temp_index |
uint32 | m_node_count |
uint32 | m_leaf_count |
cuda::Radixtree_context | m_kd_context |
void cugar::cuda::Kd_builder< Integer >::build | ( | OutputTree & | out_tree, |
vector< device_tag, uint32 > & | out_index, | ||
const BboxType | bbox, | ||
const Iterator | points_begin, | ||
const Iterator | points_end, | ||
const uint32 | max_leaf_size | ||
) |
build a bvh given a set of points that will be reordered in-place
out_tree | output tree |
out_index | output index |
bbox | global bbox |
points_begin | beginning of the point sequence to sort |
points_end | end of the point sequence to sort |
max_leaf_size | maximum leaf size |