alpaka
Abstraction Library for Parallel Kernel Acceleration
Loading...
Searching...
No Matches
Extent.hpp
Go to the documentation of this file.
1
/* Copyright 2022 Benjamin Worpitz, Matthias Werner, Bernhard Manfred Gruber
2
* SPDX-License-Identifier: MPL-2.0
3
*/
4
5
#pragma once
6
7
#include "
alpaka/alpaka.hpp
"
8
9
#include <cstddef>
10
11
namespace
alpaka::test
12
{
13
template
<
typename
TDim,
typename
TVal>
14
inline
constexpr
auto
extentBuf
= []
15
{
16
Vec<TDim, TVal>
v;
17
if
constexpr
(TDim::value > 0)
18
for
(TVal i = 0; i < TVal{TDim::value}; i++)
19
v[i] = 11 - i;
20
return
v;
21
}();
22
23
template
<
typename
TDim,
typename
TVal>
24
inline
constexpr
auto
extentSubView
= []
25
{
26
Vec<TDim, TVal>
v;
27
if
constexpr
(TDim::value > 0)
28
for
(TVal i = 0; i < TVal{TDim::value}; i++)
29
v[i] = 8 - i * 2;
30
return
v;
31
}();
32
33
template
<
typename
TDim,
typename
TVal>
34
inline
constexpr
auto
offset
= []
35
{
36
Vec<TDim, TVal>
v;
37
if
constexpr
(TDim::value > 0)
38
for
(TVal i = 0; i < TVal{TDim::value}; i++)
39
v[i] = 2 + i;
40
return
v;
41
}();
42
}
// namespace alpaka::test
alpaka.hpp
alpaka::Vec
A n-dimensional vector.
Definition
Vec.hpp:38
alpaka::test
The test specifics.
Definition
TestAccs.hpp:27
alpaka::test::extentBuf
constexpr auto extentBuf
Definition
Extent.hpp:14
alpaka::test::extentSubView
constexpr auto extentSubView
Definition
Extent.hpp:24
alpaka::test::offset
constexpr auto offset
Definition
Extent.hpp:34
include
alpaka
test
Extent.hpp
Generated on Tue Feb 4 2025 09:02:23 for alpaka by
1.9.8