Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
groupReduction_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
26#ifdef SYCL2020_FEATURE_GROUP_REDUCTION
27
28namespace shamalgs::reduction::details {
29
30 template<class T>
31 T sum_usm_group(
32 const sham::DeviceScheduler_ptr &sched,
33 const sham::DeviceBuffer<T> &buf1,
34 u32 start_id,
35 u32 end_id,
36 u32 work_group_size);
37 template<class T>
38 T min_usm_group(
39 const sham::DeviceScheduler_ptr &sched,
40 const sham::DeviceBuffer<T> &buf1,
41 u32 start_id,
42 u32 end_id,
43 u32 work_group_size);
44 template<class T>
45 T max_usm_group(
46 const sham::DeviceScheduler_ptr &sched,
47 const sham::DeviceBuffer<T> &buf1,
48 u32 start_id,
49 u32 end_id,
50 u32 work_group_size);
51
52} // namespace shamalgs::reduction::details
53
54#endif
std::uint32_t u32
32 bit unsigned integer
A buffer allocated in USM (Unified Shared Memory)
main include file for memory algorithms