kokkos-execution
0.0.1
Toggle main menu visibility
Loading...
Searching...
No Matches
no_op.hpp
Go to the documentation of this file.
1
#ifndef KOKKOS_EXECUTION_TESTS_UTILS_FUNCTORS_NO_OP_HPP
2
#define KOKKOS_EXECUTION_TESTS_UTILS_FUNCTORS_NO_OP_HPP
3
4
#include "Kokkos_Macros.hpp"
5
#ifdef KOKKOS_ENABLE_EXPERIMENTAL_CXX20_MODULES
6
import
kokkos.core;
7
#else
8
# include "Kokkos_Core.hpp"
9
#endif
10
11
namespace
Tests::Utils::Functors
{
12
14
template
<
bool
MayThrowOnCall = true,
bool
MayThrowOnCopy = true,
bool
MayThrowOnMove = true>
15
struct
NoOp
{
16
NoOp
() =
default
;
17
18
constexpr
NoOp
(
const
NoOp
&)
noexcept
(!MayThrowOnCopy) {
// NOLINT(modernize-use-equals-default)
19
}
20
21
constexpr
NoOp
(
NoOp
&&) noexcept(!MayThrowOnMove) {
22
}
23
24
constexpr
NoOp
&
operator=
(
const
NoOp
&)
noexcept
(!MayThrowOnCopy) {
// NOLINT(modernize-use-equals-default)
25
return
*
this
;
26
}
27
28
constexpr
NoOp
&
operator=
(
NoOp
&&) noexcept(!MayThrowOnMove) {
29
return
*
this
;
30
}
31
32
~NoOp
() =
default
;
33
34
template
<
typename
... Args>
35
KOKKOS_FUNCTION
constexpr
void
operator()
(Args&&...) const noexcept(!MayThrowOnCall) {
36
}
37
};
38
39
}
// namespace Tests::Utils::Functors
40
41
#endif
// KOKKOS_EXECUTION_TESTS_UTILS_FUNCTORS_NO_OP_HPP
Tests::Utils::Functors
Definition
counter.hpp:11
Tests::Utils::Functors::NoOp::operator=
constexpr NoOp & operator=(const NoOp &) noexcept(!MayThrowOnCopy)
Definition
no_op.hpp:24
Tests::Utils::Functors::NoOp::~NoOp
~NoOp()=default
Tests::Utils::Functors::NoOp::operator=
constexpr NoOp & operator=(NoOp &&) noexcept(!MayThrowOnMove)
Definition
no_op.hpp:28
Tests::Utils::Functors::NoOp::NoOp
NoOp()=default
Tests::Utils::Functors::NoOp::operator()
constexpr void operator()(Args &&...) const noexcept(!MayThrowOnCall)
Definition
no_op.hpp:35
Tests::Utils::Functors::NoOp::NoOp
constexpr NoOp(NoOp &&) noexcept(!MayThrowOnMove)
Definition
no_op.hpp:21
Tests::Utils::Functors::NoOp::NoOp
constexpr NoOp(const NoOp &) noexcept(!MayThrowOnCopy)
Definition
no_op.hpp:18
tests
utils
functors
no_op.hpp
Generated on
for kokkos-execution by
1.18.0