2 #ifdef ALPAKA_HOST_ONLY 3 #error ALPAKA_HOST_ONLY defined in device compilation 6 #include <alpaka/alpaka.hpp> 20 template <
typename TAcc,
typename = std::enable_if_t<alpaka::isAccelerator<TAcc>>>
23 const portabletest::Matrix matrix{{1, 2, 3, 4, 5, 6}, {2, 4, 6, 8, 10, 12}, {3, 6, 9, 12, 15, 18}};
40 template <
typename TAcc,
typename = std::enable_if_t<alpaka::isAccelerator<TAcc>>>
42 portabletest::TestDeviceMultiCollection2::View<1>
view,
43 double xvalue)
const {
45 const int32_t thread = alpaka::getIdx<alpaka::Grid, alpaka::Threads>(acc)[0u];
46 const portabletest::Matrix matrix{{1, 2, 3, 4, 5, 6}, {2, 4, 6, 8, 10, 12}, {3, 6, 9, 12, 15, 18}};
62 template <
typename TAcc,
typename = std::enable_if_t<alpaka::isAccelerator<TAcc>>>
64 portabletest::TestDeviceMultiCollection3::View<2>
view,
65 double xvalue)
const {
67 const int32_t thread = alpaka::getIdx<alpaka::Grid, alpaka::Threads>(acc)[0u];
68 const portabletest::Matrix matrix{{1, 2, 3, 4, 5, 6}, {2, 4, 6, 8, 10, 12}, {3, 6, 9, 12, 15, 18}};
92 auto workDiv = make_workdiv<Acc1D>(groups,
items);
108 auto workDiv = make_workdiv<Acc1D>(groups,
items);
109 auto workDiv2 = make_workdiv<Acc1D>(groups2,
items);
117 template <
typename TAcc,
typename = std::enable_if_t<alpaka::isAccelerator<TAcc>>>
119 portabletest::TestDeviceObject::Product*
data,
137 auto workDiv = make_workdiv<Acc1D>(1, 1);
154 auto workDiv = make_workdiv<Acc1D>(groups,
items);
155 auto workDiv2 = make_workdiv<Acc1D>(groups2,
items);
156 auto workDiv3 = make_workdiv<Acc1D>(groups3,
items);
165 template <
typename TAcc,
typename = std::enable_if_t<alpaka::isAccelerator<TAcc>>>
167 portabletest::TestDeviceCollection::ConstView
input,
178 if (
i < esData.
size()) {
188 template <
typename TAcc,
typename = std::enable_if_t<alpaka::isAccelerator<TAcc>>>
204 if (
i < esData.
size()) {
211 if (
i < esData.
size()) {
221 template <
typename TAcc,
typename = std::enable_if_t<alpaka::isAccelerator<TAcc>>>
240 if (
i < esData.
size()) {
243 printf(
"Setting x[0] to %f\n",
x);
249 if (
i < esData.
size()) {
255 double x3 = input3[
i].x3();
256 if (
i < esData.
size()) {
259 output3[
i] = {x3, input3[
i].y3(), input3[
i].z3(), input3[
i].id3(), input3[
i].m3()};
278 auto workDiv = make_workdiv<Acc1D>(groups,
items);
295 uint32_t groups =
divide_up_by(*std::max_element(sizes.begin(), sizes.end()),
items);
300 auto workDiv = make_workdiv<Acc1D>(groups,
items);
302 alpaka::exec<Acc1D>(
queue,
324 uint32_t groups =
divide_up_by(*std::max_element(sizes.begin(), sizes.end()),
items);
329 auto workDiv = make_workdiv<Acc1D>(groups,
items);
331 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