|
Kokkos Core Kernels Package Version of the Day
|
Instance scope UniqueToken allows for a max size other than execution_space().concurrency(). More...
#include <Kokkos_UniqueToken.hpp>

Public Member Functions | |
| UniqueToken (size_type max_size, execution_space const &=execution_space()) | |
| Create object with specified size. | |
| KOKKOS_INLINE_FUNCTION size_type | size () const |
| upper bound for acquired values, i.e. 0 <= value < size() | |
| KOKKOS_INLINE_FUNCTION size_type | acquire () const |
| acquire value such that 0 <= value < size() | |
| KOKKOS_INLINE_FUNCTION void | release (size_type) const |
| release a value acquired by generate | |
Instance scope UniqueToken allows for a max size other than execution_space().concurrency().
This object should behave like a ref-counted object, so that when the last instance is destroyed, resources are free if needed
Definition at line 70 of file Kokkos_UniqueToken.hpp.
| Kokkos::Experimental::UniqueToken< ExecutionSpace, UniqueTokenScope::Instance >::UniqueToken | ( | size_type | max_size, |
| execution_space const & | = execution_space() ) |
Create object with specified size.
It is required that max_size is >= the maximum number of concurrent threads that will attempt to acquire the UniqueToken. This constructor is most commonly useful when you: 1) Have a loop bound that may be smaller than execution_space().concurrency(). 2) Want a per-team unique token in the range [0, execution_space().concurrency() / team_size)
| KOKKOS_INLINE_FUNCTION size_type Kokkos::Experimental::UniqueToken< ExecutionSpace, UniqueTokenScope >::size | ( | ) | const |
upper bound for acquired values, i.e. 0 <= value < size()
| KOKKOS_INLINE_FUNCTION size_type Kokkos::Experimental::UniqueToken< ExecutionSpace, UniqueTokenScope >::acquire | ( | ) | const |
acquire value such that 0 <= value < size()
| KOKKOS_INLINE_FUNCTION void Kokkos::Experimental::UniqueToken< ExecutionSpace, UniqueTokenScope >::release | ( | size_type | ) | const |
release a value acquired by generate