23 template<
class Tmorton,
class Tvec, u32 dim>
25 const sham::DeviceScheduler_ptr &dev_sched,
30 u32 cnt_obj = std::move(morton_codes_set.cnt_obj);
31 u32 morton_count = std::move(morton_codes_set.morton_count);
34 auto map_morton_id_to_obj_id
35 = std::forward<sham::DeviceBuffer<u32>>(cached_map_morton_id_to_obj_id);
37 map_morton_id_to_obj_id.resize(morton_count);
41 dev_sched, morton_codes_to_sort, map_morton_id_to_obj_id, morton_count);
44 std::move(bounding_box),
46 std::move(morton_count),
47 std::move(morton_codes_to_sort),
48 std::move(map_morton_id_to_obj_id));
51 template<
class Tmorton,
class Tvec, u32 dim>
53 const sham::DeviceScheduler_ptr &dev_sched,
56 auto map_morton_id_to_obj_id
59 return sort_morton_set<Tmorton, Tvec, dim>(
62 std::move(map_morton_id_to_obj_id));
71 const sham::DeviceScheduler_ptr &dev_sched,
74 const sham::DeviceScheduler_ptr &dev_sched,
78 const sham::DeviceScheduler_ptr &dev_sched,
82 const sham::DeviceScheduler_ptr &dev_sched,
MortonCodeSortedSet< Tmorton, Tvec, dim > sort_morton_set(const sham::DeviceScheduler_ptr &dev_sched, MortonCodeSet< Tmorton, Tvec, dim > &&morton_codes_set)
Sorts a set of Morton codes and creates a new MortonCodeSortedSet object with the sorted codes and th...
std::uint32_t u32
32 bit unsigned integer
A buffer allocated in USM (Unified Shared Memory)
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.
main include file for the shamalgs algorithms
Provides functions to generate and fill buffers with sequential indices.
void sort_by_key(sycl::queue &q, sycl::buffer< Tkey > &buf_key, sycl::buffer< Tval > &buf_values, u32 len)
Sort the buffer according to the key order.
void fill_buffer_index(sham::DeviceBuffer< u32 > &buf, u32 len)
Fills a buffer with sequential indices, such that buf[i] = i.
Axis-Aligned bounding box.