Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
sort_by_keys_std_sort.hpp File Reference

std::sort based sort by keys implementation, shared by the sort by keys primitives More...

#include "shambackends/DeviceBuffer.hpp"
#include <algorithm>
#include <utility>
#include <vector>
Include dependency graph for sort_by_keys_std_sort.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::device::details::sort_by_keys_std_sort (sham::DeviceBuffer< Tkey > &buf_key, sham::DeviceBuffer< Tval > &buf_values, u32 len)
 Copy both buffers to host, std::sort the zipped key/value pairs, and copy back.

Detailed Description

std::sort based sort by keys implementation, shared by the sort by keys primitives

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_keys_std_sort.hpp.

Function Documentation

◆ sort_by_keys_std_sort()

template<class Tkey, class Tval>
void shamalgs::primitives::device::details::sort_by_keys_std_sort ( sham::DeviceBuffer< Tkey > & buf_key,
sham::DeviceBuffer< Tval > & buf_values,
u32 len )
inline

Copy both buffers to host, std::sort the zipped key/value pairs, and copy back.

Definition at line 28 of file sort_by_keys_std_sort.hpp.

Here is the call graph for this function: