forked from alpaka-group/alpaka3
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDouble.cpp
More file actions
31 lines (23 loc) · 1.14 KB
/
Double.cpp
File metadata and controls
31 lines (23 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* Copyright 2022 Jakob Krude, Benjamin Worpitz, Bernhard Manfred Gruber, Sergei Bastrakov, Jan Stephans
* SPDX-License-Identifier: MPL-2.0
*/
#include "Functor.hpp"
#include "TestTemplate.hpp"
#include <alpaka/alpaka.hpp>
#include <alpaka/meta/meta.hpp>
#include <catch2/catch_template_test_macros.hpp>
#include <tuple>
using namespace alpaka;
using TestBackends = std::decay_t<decltype(onHost::allBackends(onHost::enabledApis, exec::enabledExecutors))>;
// This file only has unit tests for real numbers in order to split the tests between object files
using FunctorsReal = alpaka::meta::
Concatenate<mathtest::UnaryFunctorsReal, mathtest::BinaryFunctorsReal, mathtest::TernaryFunctorsReal>;
using TestAccFunctorTuplesReal = alpaka::meta::CartesianProduct<std::tuple, TestBackends, FunctorsReal>;
TEMPLATE_LIST_TEST_CASE("mathOpsDouble", "[math] [operator]", TestAccFunctorTuplesReal)
{
using Backend = std::tuple_element_t<0u, TestType>;
using Functor = std::tuple_element_t<1u, TestType>;
auto cfg = Backend::makeDict();
auto testTemplate = mathtest::TestTemplate<Functor>{};
testTemplate.template operator()<double>(cfg);
}