Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
fallbackReduction_usm.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
20#include "shamalgs/memory.hpp"
21#include "shambackends/math.hpp"
22#include "shambackends/sycl.hpp"
24#include "shambackends/vec.hpp"
25
26namespace shamalgs::reduction::details {
27
28 template<class T>
29 T sum_usm_fallback(
30 const sham::DeviceScheduler_ptr &sched,
31 const sham::DeviceBuffer<T> &buf1,
32 u32 start_id,
33 u32 end_id);
34
35 template<class T>
36 T min_usm_fallback(
37 const sham::DeviceScheduler_ptr &sched,
38 const sham::DeviceBuffer<T> &buf1,
39 u32 start_id,
40 u32 end_id);
41
42 template<class T>
43 T max_usm_fallback(
44 const sham::DeviceScheduler_ptr &sched,
45 const sham::DeviceBuffer<T> &buf1,
46 u32 start_id,
47 u32 end_id);
48
49} // namespace shamalgs::reduction::details
std::uint32_t u32
32 bit unsigned integer
A buffer allocated in USM (Unified Shared Memory)
main include file for memory algorithms