Shamrock
2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
shambackends
include
shambackends
make_ndrange.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
18
19
#include "
shambase/aliases_int.hpp
"
20
#include "
shambackends/sycl.hpp
"
21
22
namespace
sham
{
23
26
inline
sycl::nd_range<1>
make_ndrange
(
u32
wg_size,
u32
nthread) {
27
u32
nthread_rounded = ((nthread + wg_size - 1) / wg_size) * wg_size;
28
return
sycl::nd_range<1>(sycl::range<1>(nthread_rounded), sycl::range<1>(wg_size));
29
}
30
31
}
// namespace sham
aliases_int.hpp
u32
std::uint32_t u32
32 bit unsigned integer
Definition
aliases_int.hpp:27
sham
namespace for backends this one is named only sham since shambackends is too long to write
Definition
fma_chains.hpp:24
sham::make_ndrange
sycl::nd_range< 1 > make_ndrange(u32 wg_size, u32 nthread)
Definition
make_ndrange.hpp:26
sycl.hpp
Generated on
for Shamrock by
1.15.0