kokkos-execution
0.0.1
Loading...
Searching...
No Matches
context.hpp
Go to the documentation of this file.
1
#ifndef KOKKOS_EXECUTION_TESTS_UTILS_CONTEXT_HPP
2
#define KOKKOS_EXECUTION_TESTS_UTILS_CONTEXT_HPP
3
4
#include "gtest/gtest.h"
5
6
#include "
kokkos-execution/stdexec.hpp
"
7
8
#include "Kokkos_Core.hpp"
9
10
#if defined(KOKKOS_EXECUTION_ENABLE_DEBUG_LOGGING)
11
# include "plog/Formatters/TxtFormatter.h"
12
# include "plog/Initializers/ConsoleInitializer.h"
13
# include "plog/Log.h"
14
#endif
15
16
#include "
kokkos-utils/tests/scoped/ExecutionSpace.hpp
"
17
18
namespace
Tests::Utils
{
19
20
template
<
template
<
typename
>
typename
ContextType, Kokkos::ExecutionSpace Exec>
21
struct
ContextTest
22
:
public
virtual
testing::Test
23
,
public
Kokkos::utils::tests::scoped::ExecutionSpace
<Exec> {
24
public
:
25
using
context_t
= ContextType<Exec>;
26
using
scheduler_t
=
decltype
(std::declval<const context_t>().get_scheduler());
27
using
schedule_sender_t
=
decltype
(stdexec::schedule(std::declval<scheduler_t>()));
28
29
using
value_t
= int;
30
using
view_s_t
= Kokkos::View<value_t, Kokkos::SharedSpace>;
31
32
public
:
33
#if defined(KOKKOS_EXECUTION_ENABLE_DEBUG_LOGGING)
34
static
void
SetUpTestSuite() {
35
plog::init<plog::TxtFormatter>(plog::debug, plog::streamStdOut);
36
}
37
#endif
38
};
39
40
}
// namespace Tests::Utils
41
42
#endif
// KOKKOS_EXECUTION_TESTS_UTILS_CONTEXT_HPP
ExecutionSpace.hpp
stdexec.hpp
Tests::Utils
Definition
atomic.hpp:30
Kokkos::utils::tests::scoped::ExecutionSpace
Tests::Utils::ContextTest
Definition
context.hpp:23
Tests::Utils::ContextTest::scheduler_t
decltype(std::declval< const context_t >().get_scheduler()) scheduler_t
Definition
context.hpp:26
Tests::Utils::ContextTest::schedule_sender_t
decltype(stdexec::schedule(std::declval< scheduler_t >())) schedule_sender_t
Definition
context.hpp:27
Tests::Utils::ContextTest::value_t
int value_t
Definition
context.hpp:29
Tests::Utils::ContextTest::view_s_t
Kokkos::View< value_t, Kokkos::SharedSpace > view_s_t
Definition
context.hpp:30
Tests::Utils::ContextTest::context_t
ContextType< Exec > context_t
Definition
context.hpp:25
tests
utils
context.hpp
Generated on
for kokkos-execution by
1.15.0