32 template<class Tmorton, class Tvec, u32 dim = shambase::VectorProperties<Tvec>::dimension>
64 inline LeafCellIterator get_leaf_cell_iterator()
const {
68 inline LeafCellIteratorHost get_leaf_cell_iterator_host()
const {
69 return LeafCellIteratorHost{
74 inline CellIterator get_cell_iterator(
75 const sham::DeviceBuffer<u32> &buf_endrange,
u32 offset_leaf)
const {
83 inline CellIteratorHost get_cell_iterator_host(
84 const sham::DeviceBuffer<u32> &buf_endrange,
u32 offset_leaf)
const {
85 return CellIteratorHost{
92 inline static MortonReducedSet make_empty(sham::DeviceScheduler_ptr dev_sched) {
94 MortonCodeSortedSet<Tmorton, Tvec>::make_empty(dev_sched),
96 sham::DeviceBuffer<u32>(0, dev_sched),
97 sham::DeviceBuffer<Tmorton>(0, dev_sched)};
110 template<
class Tmorton,
class Tvec, u32 dim>
112 const sham::DeviceScheduler_ptr &dev_sched,
114 u32 reduction_level);
127 template<
class Tmorton,
class Tvec, u32 dim>
129 const sham::DeviceScheduler_ptr &dev_sched,
132 sham::DeviceBuffer<u32> &&cache_buf_reduc_index_map,
133 sham::DeviceBuffer<Tmorton> &&cache_reduced_morton_codes);
MortonReducedSet< Tmorton, Tvec, dim > reduce_morton_set(const sham::DeviceScheduler_ptr &dev_sched, MortonCodeSortedSet< Tmorton, Tvec, dim > &&morton_codes_set, u32 reduction_level)
Reduces the given Morton code set by grouping together Morton codes that are close to each other in t...
std::uint32_t u32
32 bit unsigned integer
A buffer allocated in USM (Unified Shared Memory).
std::vector< T > copy_to_stdvec() const
Copy the content of the buffer to a std::vector.
Class representing a set of Morton codes with associated bounding box and position data.
Class representing a set of Morton codes with associated bounding box and position data that was redu...
MortonCodeSortedSet< Tmorton, Tvec > morton_codes_set
The source Morton codes set.
MortonReducedSet(MortonCodeSortedSet< Tmorton, Tvec > &&morton_codes_set, u32 reduce_code_count, sham::DeviceBuffer< u32 > &&buf_reduc_index_map, sham::DeviceBuffer< Tmorton > &&reduced_morton_codes)
Move constructor from each members.
u32 reduce_code_count
The count of Morton codes in the reduced set This was called tree_leaf_count.
sham::DeviceBuffer< Tmorton > reduced_morton_codes
sham::DeviceBuffer< u32 > buf_reduc_index_map