Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
numericFallback.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
21#include "shambackends/sycl.hpp"
22
23namespace shamalgs::numeric::details {
24
32 template<class T>
33 sycl::buffer<T> exclusive_sum_fallback(sycl::queue &q, sycl::buffer<T> &buf1, u32 len);
34
42 template<class T>
44 const sham::DeviceScheduler_ptr &sched, sham::DeviceBuffer<T> &buf1, u32 len);
45
46 template<class T>
47 sycl::buffer<T> inclusive_sum_fallback(sycl::queue &q, sycl::buffer<T> &buf1, u32 len);
48
49 template<class T>
50 void exclusive_sum_in_place_fallback(sycl::queue &q, sycl::buffer<T> &buf, u32 len);
51
52 template<class T>
53 void inclusive_sum_in_place_fallback(sycl::queue &q, sycl::buffer<T> &buf, u32 len);
54
64 std::tuple<std::optional<sycl::buffer<u32>>, u32> stream_compact_fallback(
65 sycl::queue &q, sycl::buffer<u32> &buf_flags, u32 len);
66
76 const sham::DeviceScheduler_ptr &sched, sham::DeviceBuffer<u32> &buf_flags, u32 len);
77
78} // namespace shamalgs::numeric::details
std::uint32_t u32
32 bit unsigned integer
A buffer allocated in USM (Unified Shared Memory)
sham::DeviceBuffer< T > exclusive_sum_fallback_usm(const sham::DeviceScheduler_ptr &sched, sham::DeviceBuffer< T > &buf1, u32 len)
Exclusive sum fallback on USM.
std::tuple< std::optional< sycl::buffer< u32 > >, u32 > stream_compact_fallback(sycl::queue &q, sycl::buffer< u32 > &buf_flags, u32 len)
Stream compaction algorithm on fallback.
sycl::buffer< T > exclusive_sum_fallback(sycl::queue &q, sycl::buffer< T > &buf1, u32 len)
Exclusive sum fallback on SYCL buffer.