Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
sort_by_key_pow2_len.cpp File Reference

Sort by keys algorithms. More...

Include dependency graph for sort_by_key_pow2_len.cpp:

Go to the source code of this file.

Classes

struct  shamalgs::primitives::impl::BitonicSort
 Bitonic sort, updated USM kernel (see bitonicSort_updated_usm.hpp). More...
struct  shamalgs::primitives::impl::StdSort
 Copy the buffers to host, std::sort the zipped key/value pairs, and copy back. More...
struct  shamalgs::ImplVariantParams< shamalgs::primitives::impl::BitonicSort >

Namespaces

namespace  shamalgs
 namespace to contain everything implemented by shamalgs
namespace  shamalgs::primitives
 namespace for primitive algorithm (e.g. sort, scan, reductions, ...)
namespace  shamalgs::primitives::impl
 namespace to control implementation behavior

Enumerations

enum class  shamalgs::primitives::impl::MaxStencilSize : u32 { Size16 = 16 , Size32 = 32 }

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).
std::vector< std::string > shamalgs::primitives::impl::get_default_impl_list_sort_by_key_pow2_len ()
 Get list of available sort by key pow2 len implementations, as config json strings.
std::string shamalgs::primitives::impl::get_current_impl_sort_by_key_pow2_len ()
 Get the current implementation for sort by key pow2 len, as a config json string.
bool shamalgs::primitives::impl::is_impl_set_sort_by_key_pow2_len ()
 Check if an implementation has been selected for sort by key pow2 len.
void shamalgs::primitives::impl::set_impl_sort_by_key_pow2_len (const std::string &impl)
 Set the implementation for sort by key pow2 len, from a config json string.
void shamalgs::primitives::impl::autoselect_impl_sort_by_key_pow2_len (const sham::DeviceScheduler_ptr &dev_sched)
 Select the default implementation for sort by key pow2 len.
template<class Tkey, class Tval>
void shamalgs::primitives::impl::sort_by_key_pow2_len_bitonic_dispatch (const sham::DeviceScheduler_ptr &sched, sham::DeviceBuffer< Tkey > &buf_key, sham::DeviceBuffer< Tval > &buf_values, u32 len, MaxStencilSize stencil_size)
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 void shamalgs::primitives::sort_by_key_pow2_len (sycl::queue &q, sycl::buffer< u32 > &buf_key, sycl::buffer< u32 > &buf_values, u32 len)
template void shamalgs::primitives::sort_by_key_pow2_len (sycl::queue &q, sycl::buffer< u64 > &buf_key, sycl::buffer< u32 > &buf_values, u32 len)
template void shamalgs::primitives::sort_by_key_pow2_len (const sham::DeviceScheduler_ptr &sched, sham::DeviceBuffer< u32 > &buf_key, sham::DeviceBuffer< u32 > &buf_values, u32 len)
template void shamalgs::primitives::sort_by_key_pow2_len (const sham::DeviceScheduler_ptr &sched, sham::DeviceBuffer< u64 > &buf_key, sham::DeviceBuffer< u32 > &buf_values, u32 len)
template void shamalgs::primitives::sort_by_key_pow2_len (const sham::DeviceScheduler_ptr &sched, sham::DeviceBuffer< f64 > &buf_key, sham::DeviceBuffer< f64 > &buf_values, u32 len)
template void shamalgs::primitives::sort_by_key_pow2_len (const sham::DeviceScheduler_ptr &sched, sham::DeviceBuffer< f32 > &buf_key, sham::DeviceBuffer< f32 > &buf_values, u32 len)

Variables

shamalgs::ImplVariantGlobal< BitonicSort, StdSort > shamalgs::primitives::impl::sort_by_key_pow2_len_impl

Detailed Description

Sort by keys algorithms.

Author
Timothée David–Cléris (tim.s.nosp@m.hamr.nosp@m.ock@p.nosp@m.roto.nosp@m.n.me)

Definition in file sort_by_key_pow2_len.cpp.