kokkos-execution 0.0.1
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_Core.hpp"
5
7
9template <bool MayThrowOnCall = true, bool MayThrowOnCopy = true, bool MayThrowOnMove = true>
10struct NoOp {
11 NoOp() = default;
12
13 NoOp(const NoOp&) noexcept(!MayThrowOnCopy) { // NOLINT(modernize-use-equals-default)
14 }
15
16 NoOp(NoOp&&) noexcept(!MayThrowOnMove) {
17 }
18
19 NoOp& operator=(const NoOp&) noexcept(!MayThrowOnCopy) { // NOLINT(modernize-use-equals-default)
20 return *this;
21 }
22
23 NoOp& operator=(NoOp&&) noexcept(!MayThrowOnMove) {
24 return *this;
25 }
26
27 ~NoOp() = default;
28
29 template <typename... Args>
30 KOKKOS_FUNCTION void operator()(Args&&...) const noexcept(!MayThrowOnCall) {
31 }
32};
33
34} // namespace Tests::Utils::Functors
35
36#endif // KOKKOS_EXECUTION_TESTS_UTILS_FUNCTORS_NO_OP_HPP
NoOp(NoOp &&) noexcept(!MayThrowOnMove)
Definition no_op.hpp:16
NoOp & operator=(NoOp &&) noexcept(!MayThrowOnMove)
Definition no_op.hpp:23
NoOp & operator=(const NoOp &) noexcept(!MayThrowOnCopy)
Definition no_op.hpp:19
NoOp(const NoOp &) noexcept(!MayThrowOnCopy)
Definition no_op.hpp:13
void operator()(Args &&...) const noexcept(!MayThrowOnCall)
Definition no_op.hpp:30