1#ifndef KOKKOS_EXECUTION_TESTS_UTILS_FUNCTORS_INCREMENT_HPP
2#define KOKKOS_EXECUTION_TESTS_UTILS_FUNCTORS_INCREMENT_HPP
8#include "Kokkos_Core.hpp"
17template <Kokkos::utils::concepts::ViewOfRank<0> ViewType,
bool MayThrow = true,
bool Atomic = false>
19 typename ViewType::non_const_type
data;
22 void operator()() const noexcept(!MayThrow) requires(Atomic == false)
28 void operator()() const noexcept(!MayThrow) requires(Atomic == true)
35#define THEN_INCREMENT(_data_) \
36 stdexec::then(Tests::Utils::Functors::Increment<std::remove_cvref_t<decltype(_data_)>, true, false>{.data = _data_})
39#define THEN_INCREMENT_ATOMIC(_data_) \
40 stdexec::then(Tests::Utils::Functors::Increment<std::remove_cvref_t<decltype(_data_)>, true, true>{.data = _data_})
void atomic_add(T *ptr, const T val)
Atomically add val to *ptr using system scope and relaxed memory order.
void operator()() const noexcept(!MayThrow)
ViewType::non_const_type data
void operator()() const noexcept(!MayThrow)