Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
batcherOddEvenSort.hpp
Go to the documentation of this file.
1// -------------------------------------------------------//
2//
3// SHAMROCK code for hydrodynamics
4// Copyright (c) 2021-2026 Timothée David--Cléris <tim.shamrock@proton.me>
5// SPDX-License-Identifier: CeCILL Free Software License Agreement v2.1
6// Shamrock is licensed under the CeCILL 2.1 License, see LICENSE for more information
7//
8// -------------------------------------------------------//
9
10#pragma once
11
38
41#include "shambackends/sycl.hpp"
43#include <vector>
44
50
69 template<class Tkey, class Tval>
71 const sham::DeviceScheduler_ptr &sched,
73 sham::DeviceBuffer<Tval> &buf_values,
74 u32 len);
75
89 template<class Tkey, class Tval>
91 std::vector<Tkey> &keys, std::vector<Tval> &values);
92
93} // namespace shamalgs::algorithm::details
std::uint32_t u32
32 bit unsigned integer
A buffer allocated in USM (Unified Shared Memory).
namespace to store algorithms implemented by shamalgs
void sort_by_key_batcher_odd_even_host_reference(std::vector< Tkey > &keys, std::vector< Tval > &values)
Host reference of sort_by_key_batcher_odd_even.
void sort_by_key_batcher_odd_even(const sham::DeviceScheduler_ptr &sched, sham::DeviceBuffer< Tkey > &buf_key, sham::DeviceBuffer< Tval > &buf_values, u32 len)
Sort key-value pairs of any length using a Batcher odd-even merge network.