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)
std::vector< std::string > shamalgs::primitives::impl::get_default_impl_list_segmented_sort_in_place ()
 Get list of available segmented sort in place implementations, as config json strings.
std::string shamalgs::primitives::impl::get_current_impl_segmented_sort_in_place ()
 Get the current implementation for segmented sort in place, as a config json string.
bool shamalgs::primitives::impl::is_impl_set_segmented_sort_in_place ()
 Check if an implementation has been selected for segmented sort in place.
void shamalgs::primitives::impl::set_impl_segmented_sort_in_place (const std::string &impl)
 Set the implementation for segmented sort in place, from a config json string.
void shamalgs::primitives::impl::autoselect_impl_segmented_sort_in_place (const sham::DeviceScheduler_ptr &dev_sched)
 Select the default implementation for segmented sort in place.
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

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 27 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 66 of file segmented_sort_in_place.cpp.