Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
key_morton_sort.cpp
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
19
20template<>
21void sycl_sort_morton_key_pair<u32, MultiKernel>(
22 sycl::queue &queue,
23 u32 morton_count_rounded_pow,
24 std::unique_ptr<sycl::buffer<u32>> &buf_index,
25 std::unique_ptr<sycl::buffer<u32>> &buf_morton) {
26
27 shamalgs::algorithm::sort_by_key(queue, *buf_morton, *buf_index, morton_count_rounded_pow);
28}
29
30template<>
31void sycl_sort_morton_key_pair<u64, MultiKernel>(
32 sycl::queue &queue,
33 u32 morton_count_rounded_pow,
34 std::unique_ptr<sycl::buffer<u32>> &buf_index,
35 std::unique_ptr<sycl::buffer<u64>> &buf_morton) {
36
37 shamalgs::algorithm::sort_by_key(queue, *buf_morton, *buf_index, morton_count_rounded_pow);
38}
std::uint32_t u32
32 bit unsigned integer
Define the fmt formatters for sycl::vec.
void sort_by_key(sycl::queue &q, sycl::buffer< Tkey > &buf_key, sycl::buffer< Tval > &buf_values, u32 len)
Sort the buffer according to the key order.
Definition algorithm.hpp:41