![]() |
Shamrock 2025.10.0
Astrophysical Code
|
Sort by keys algorithms. More...
#include "shambase/exception.hpp"#include "shambase/integer.hpp"#include "shambackends/DeviceBuffer.hpp"#include "shambackends/DeviceQueue.hpp"
Include dependency graph for sort_by_keys.hpp:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Namespaces | |
| namespace | shamalgs |
| namespace to contain everything implemented by shamalgs | |
| namespace | shamalgs::primitives |
| namespace for primitive algorithm (e.g. sort, scan, reductions, ...) | |
Functions | |
| template<class Tkey , class Tval > | |
| void | shamalgs::primitives::sort_by_key_pow2_len (sycl::queue &q, sycl::buffer< Tkey > &buf_key, sycl::buffer< Tval > &buf_values, u32 len) |
| Sort key-value pairs using sycl::buffers (power-of-2 optimized) | |
| template<class Tkey , class Tval > | |
| void | shamalgs::primitives::sort_by_key_pow2_len (const sham::DeviceScheduler_ptr &sched, sham::DeviceBuffer< Tkey > &buf_key, sham::DeviceBuffer< Tval > &buf_values, u32 len) |
| Sort key-value pairs using USM buffers (power-of-2 optimized) | |
| template<class Tkey , class Tval > | |
| void | shamalgs::primitives::sort_by_key (sycl::queue &q, sycl::buffer< Tkey > &buf_key, sycl::buffer< Tval > &buf_values, u32 len) |
| Sort key-value pairs using sycl::buffers. | |
| template<class Tkey , class Tval > | |
| void | shamalgs::primitives::sort_by_key (const sham::DeviceScheduler_ptr &sched, sham::DeviceBuffer< Tkey > &buf_key, sham::DeviceBuffer< Tval > &buf_values, u32 len) |
| Sort key-value pairs using USM buffers. | |
Sort by keys algorithms.
This header provides parallel sorting algorithms that sort key-value pairs based on the key values. The algorithms are optimized for GPU execution using sycl::buffers or USM.
The sorting functions come in two variants:
sort_by_key_pow2_len: Optimized for power-of-2 buffer lengthssort_by_key: General case Definition in file sort_by_keys.hpp.