1#ifndef KOKKOS_EXECUTION_TESTS_UTILS_FUNCTORS_INCREMENT_HPP
2#define KOKKOS_EXECUTION_TESTS_UTILS_FUNCTORS_INCREMENT_HPP
8#include "Kokkos_Core.hpp"
18 Kokkos::utils::concepts::ViewOfRank<0> ViewType,
21 typename MemoryScope = desul::MemoryScopeDevice
24 typename ViewType::non_const_type
data;
27 void operator()() const noexcept(!MayThrow) requires(Atomic == false)
33 void operator()() const noexcept(!MayThrow) requires(Atomic == true)
43 typename MemoryScope = desul::MemoryScopeDevice
52 desul::MemoryOrderRelaxed,
53 typename ViewType::non_const_value_type
59#define THEN_INCREMENT(_data_) \
60 stdexec::then(Tests::Utils::Functors::Increment<std::remove_cvref_t<decltype(_data_)>, true, false>{.data = _data_})
63#define THEN_INCREMENT_ATOMIC(_scope_, _data_) \
65 Tests::Utils::Functors::Increment< \
66 std::remove_cvref_t<decltype(_data_)>, \
69 desul::MemoryScope##_scope_ \
auto atomic_fetch_add(T *ptr, const T val)
Same effect as Kokkos::atomic_fetch_add, given memory scope and order.
ViewType::non_const_type value
ViewType::non_const_type counter
void operator()() const noexcept(!MayThrow)
void operator()() const noexcept(!MayThrow)
ViewType::non_const_type data
void operator()() const noexcept(!MayThrow)