2 #ifdef ALPAKA_HOST_ONLY 3 #error ALPAKA_HOST_ONLY defined in device compilation 6 #include <alpaka/alpaka.hpp> 21 template <
typename TAcc,
typename = std::enable_if_t<alpaka::isAccelerator<TAcc>>>
24 const portabletest::Matrix matrix{{1, 2, 3, 4, 5, 6}, {2, 4, 6, 8, 10, 12}, {3, 6, 9, 12, 15, 18}};
41 template <
typename TAcc,
typename = std::enable_if_t<alpaka::isAccelerator<TAcc>>>
43 portabletest::TestDeviceMultiCollection2::View<1>
view,
44 double xvalue)
const {
46 const int32_t thread = alpaka::getIdx<alpaka::Grid, alpaka::Threads>(acc)[0u];
47 const portabletest::Matrix matrix{{1, 2, 3, 4, 5, 6}, {2, 4, 6, 8, 10, 12}, {3, 6, 9, 12, 15, 18}};
63 template <
typename TAcc,
typename = std::enable_if_t<alpaka::isAccelerator<TAcc>>>
65 portabletest::TestDeviceMultiCollection3::View<2>
view,
66 double xvalue)
const {
68 const int32_t thread = alpaka::getIdx<alpaka::Grid, alpaka::Threads>(acc)[0u];
69 const portabletest::Matrix matrix{{1, 2, 3, 4, 5, 6}, {2, 4, 6, 8, 10, 12}, {3, 6, 9, 12, 15, 18}};
93 auto workDiv = make_workdiv<Acc1D>(groups,
items);
109 auto workDiv = make_workdiv<Acc1D>(groups,
items);
110 auto workDiv2 = make_workdiv<Acc1D>(groups2,
items);
118 template <
typename TAcc,
typename = std::enable_if_t<alpaka::isAccelerator<TAcc>>>
120 portabletest::TestDeviceObject::Product*
data,
138 auto workDiv = make_workdiv<Acc1D>(1, 1);
155 auto workDiv = make_workdiv<Acc1D>(groups,
items);
156 auto workDiv2 = make_workdiv<Acc1D>(groups2,
items);
157 auto workDiv3 = make_workdiv<Acc1D>(groups3,
items);
166 template <
typename TAcc,
typename = std::enable_if_t<alpaka::isAccelerator<TAcc>>>
168 portabletest::TestDeviceCollection::ConstView
input,
179 if (
i < esData.
size()) {
189 template <
typename TAcc,
typename = std::enable_if_t<alpaka::isAccelerator<TAcc>>>
205 if (
i < esData.
size()) {
212 if (
i < esData.
size()) {
222 template <
typename TAcc,
typename = std::enable_if_t<alpaka::isAccelerator<TAcc>>>
241 if (
i < esData.
size()) {
244 printf(
"Setting x[0] to %f\n",
x);
250 if (
i < esData.
size()) {
256 double x3 = input3[
i].x3();
257 if (
i < esData.
size()) {
260 output3[
i] = {x3, input3[
i].y3(), input3[
i].z3(), input3[
i].id3(), input3[
i].m3()};
279 auto workDiv = make_workdiv<Acc1D>(groups,
items);
296 uint32_t groups =
divide_up_by(*std::max_element(sizes.begin(), sizes.end()),
items);
301 auto workDiv = make_workdiv<Acc1D>(groups,
items);
303 alpaka::exec<Acc1D>(
queue,
325 uint32_t groups =
divide_up_by(*std::max_element(sizes.begin(), sizes.end()),
items);
330 auto workDiv = make_workdiv<Acc1D>(groups,
items);
332 alpaka::exec<Acc1D>(
queue,
void fillObject(Queue &queue, portabletest::TestDeviceObject &object, double x, double y, double z, int32_t id) const
ALPAKA_FN_ACC void operator()(TAcc const &acc, portabletest::TestDeviceCollection::View view, double xvalue) const
constexpr auto size() const
Eigen::Matrix< double, 3, 6 > Matrix
portabletest::TestDeviceCollection update(Queue &queue, portabletest::TestDeviceCollection const &input, AlpakaESTestDataEDevice const &esData) const
PortableCollection< TestSoA > TestDeviceCollection
ALPAKA_FN_ACC void operator()(TAcc const &acc, portabletest::TestDeviceObject::Product *data, double x, double y, double z, int32_t id) const
static std::string const input
ALPAKA_FN_ACC void operator()(TAcc const &acc, portabletest::TestDeviceMultiCollection2::View< 1 > view, double xvalue) const
PortableObject< TestStruct > TestDeviceObject
void fillMulti2(Queue &queue, portabletest::TestDeviceMultiCollection2 &collection, double xvalue=0.) const
portabletest::TestDeviceMultiCollection2 updateMulti2(Queue &queue, portabletest::TestDeviceMultiCollection2 const &input, AlpakaESTestDataEDevice const &esData) const
constexpr int val(int i) const
PortableCollection3< TestSoA, TestSoA2, TestSoA3 > TestDeviceMultiCollection3
void fill(Queue &queue, portabletest::TestDeviceCollection &collection, double xvalue=0.) const
char data[epos_bytes_allocation]
ALPAKA_FN_ACC void operator()(TAcc const &acc, portabletest::TestSoA::ConstView input, portabletest::TestSoA2::ConstView input2, AlpakaESTestDataEDevice::ConstView esData, portabletest::TestSoA::View output, portabletest::TestSoA2::View output2) const
ALPAKA_FN_ACC void operator()(TAcc const &acc, portabletest::TestDeviceCollection::ConstView input, AlpakaESTestDataEDevice::ConstView esData, portabletest::TestDeviceCollection::View output) const
constexpr int val2(int i) const
ALPAKA_FN_ACC void operator()(TAcc const &acc, portabletest::TestSoA::ConstView input, portabletest::TestSoA2::ConstView input2, portabletest::TestSoA3::ConstView input3, AlpakaESTestDataEDevice::ConstView esData, portabletest::TestSoA::View output, portabletest::TestSoA2::View output2, portabletest::TestSoA3::View output3) const
ALPAKA_FN_ACC void operator()(TAcc const &acc, portabletest::TestDeviceMultiCollection3::View< 2 > view, double xvalue) const
portabletest::TestDeviceMultiCollection3 updateMulti3(Queue &queue, portabletest::TestDeviceMultiCollection3 const &input, AlpakaESTestDataEDevice const &esData) const
PortableCollection2< TestSoA, TestSoA2 > TestDeviceMultiCollection2
void fillMulti3(Queue &queue, portabletest::TestDeviceMultiCollection3 &collection, double xvalue=0.) const