Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
segmented_sort_in_place.cpp File Reference
Include dependency graph for segmented_sort_in_place.cpp:

Go to the source code of this file.

Classes

struct  shamalgs::primitives::impl::LocalInsertionSort
 Sort each segment locally with an insertion sort, one kernel work-item per segment. More...
struct  shamalgs::primitives::impl::MultiStdSort
 Copy back to host and sort each segment with std::sort, parallelized over OpenMP. More...

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

Functions

template<class T, class Comp>
void shamalgs::primitives::details::segmented_sort_in_place_local_insertion_sort (sham::DeviceBuffer< T > &buf, const sham::DeviceBuffer< u32 > &offsets, Comp &&comp)
template<class T, class Comp>
void shamalgs::primitives::details::segmented_sort_in_place_multi_std_sort (sham::DeviceBuffer< T > &buf, const sham::DeviceBuffer< u32 > &offsets, Comp &&comp)
 shamalgs::primitives::impl::SHAMALGS_REGISTER_IMPL (segmented_sort_in_place_impl_name, segmented_sort_in_place_impl)
template<class T, class Comp>
void shamalgs::primitives::internal_segmented_sort_in_place (sham::DeviceBuffer< T > &buf, const sham::DeviceBuffer< u32 > &offsets, Comp &&comp)
template<>
void shamalgs::primitives::segmented_sort_in_place< u32_2 > (sham::DeviceBuffer< u32_2 > &buf, const sham::DeviceBuffer< u32 > &offsets)
template<>
void shamalgs::primitives::segmented_sort_in_place< u32 > (sham::DeviceBuffer< u32 > &buf, const sham::DeviceBuffer< u32 > &offsets)

Variables

constexpr std::string_view shamalgs::primitives::impl::segmented_sort_in_place_impl_name = "segmented_sort_in_place"
 Registry name, shared by its registration and the dispatch site(s).
shamalgs::ImplVariantGlobal< LocalInsertionSort, MultiStdSort > shamalgs::primitives::impl::segmented_sort_in_place_impl

Detailed Description

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 segmented_sort_in_place.cpp.

Function Documentation

◆ segmented_sort_in_place_local_insertion_sort()

template<class T, class Comp>
void shamalgs::primitives::details::segmented_sort_in_place_local_insertion_sort ( sham::DeviceBuffer< T > & buf,
const sham::DeviceBuffer< u32 > & offsets,
Comp && comp )
inline

Definition at line 28 of file segmented_sort_in_place.cpp.

◆ segmented_sort_in_place_multi_std_sort()

template<class T, class Comp>
void shamalgs::primitives::details::segmented_sort_in_place_multi_std_sort ( sham::DeviceBuffer< T > & buf,
const sham::DeviceBuffer< u32 > & offsets,
Comp && comp )
inline

Definition at line 67 of file segmented_sort_in_place.cpp.