kokkos-execution 0.0.1
Loading...
Searching...
No Matches
store_thread_id.hpp
Go to the documentation of this file.
1#ifndef KOKKOS_EXECUTION_TESTS_UTILS_FUNCTORS_STORE_THREAD_ID_HPP
2#define KOKKOS_EXECUTION_TESTS_UTILS_FUNCTORS_STORE_THREAD_ID_HPP
3
4#include <thread>
5
7
9
11 template <typename... Args>
12 void operator()(Args&&...) const noexcept {
13 *tid = std::this_thread::get_id();
14 }
15
16 std::thread::id* tid;
17};
18
20#define THEN_STORE_THREAD_ID(__id__) stdexec::then(Tests::Utils::Functors::StoreThreadID{__id__})
21
23#define UPON_ERROR_STORE_THREAD_ID(__id__) stdexec::upon_error(Tests::Utils::Functors::StoreThreadID{__id__})
24
25} // namespace Tests::Utils::Functors
26
27#endif // KOKKOS_EXECUTION_TESTS_UTILS_FUNCTORS_STORE_THREAD_ID_HPP
void operator()(Args &&...) const noexcept