Kokkos Core Kernels Package  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
Kokkos::Experimental::UniqueToken< ExecutionSpace, UniqueTokenScope > Class Template Reference

class to generate unique ids base on the required amount of concurrency More...

#include <Kokkos_UniqueToken.hpp>

Inheritance diagram for Kokkos::Experimental::UniqueToken< ExecutionSpace, UniqueTokenScope >:
Inheritance graph
[legend]

Public Member Functions

 UniqueToken (execution_space const &=execution_space())
 create object size for concurrency on the given instance More...
 
KOKKOS_INLINE_FUNCTION size_type size () const
 upper bound for acquired values, i.e. 0 <= value < size() More...
 
KOKKOS_INLINE_FUNCTION size_type acquire () const
 acquire value such that 0 <= value < size() More...
 
KOKKOS_INLINE_FUNCTION void release (size_type) const
 release a value acquired by generate More...
 

Detailed Description

template<typename ExecutionSpace, UniqueTokenScope = UniqueTokenScope::Instance>
class Kokkos::Experimental::UniqueToken< ExecutionSpace, UniqueTokenScope >

class to generate unique ids base on the required amount of concurrency

This object should behave like a ref-counted object, so that when the last instance is destroy resources are free if needed

Definition at line 62 of file Kokkos_UniqueToken.hpp.

Constructor & Destructor Documentation

template<typename ExecutionSpace, UniqueTokenScope = UniqueTokenScope::Instance>
Kokkos::Experimental::UniqueToken< ExecutionSpace, UniqueTokenScope >::UniqueToken ( execution_space const &  = execution_space())

create object size for concurrency on the given instance

This object should not be shared between instances

Member Function Documentation

template<typename ExecutionSpace, UniqueTokenScope = UniqueTokenScope::Instance>
KOKKOS_INLINE_FUNCTION size_type Kokkos::Experimental::UniqueToken< ExecutionSpace, UniqueTokenScope >::size ( ) const

upper bound for acquired values, i.e. 0 <= value < size()

template<typename ExecutionSpace, UniqueTokenScope = UniqueTokenScope::Instance>
KOKKOS_INLINE_FUNCTION size_type Kokkos::Experimental::UniqueToken< ExecutionSpace, UniqueTokenScope >::acquire ( ) const

acquire value such that 0 <= value < size()

template<typename ExecutionSpace, UniqueTokenScope = UniqueTokenScope::Instance>
KOKKOS_INLINE_FUNCTION void Kokkos::Experimental::UniqueToken< ExecutionSpace, UniqueTokenScope >::release ( size_type  ) const

release a value acquired by generate


The documentation for this class was generated from the following file: