Kokkos Core Kernels Package  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends
Public Member Functions
Kokkos::Bitset< Device > Class Template Reference

A thread safe view to a bitset. More...

#include <Kokkos_Bitset.hpp>

List of all members.

Public Member Functions

 Bitset (unsigned arg_size=0u)
Bitset< Device > & operator= (Bitset< Device > const &rhs)
 assignment
 Bitset (Bitset< Device > const &rhs)
 copy constructor
KOKKOS_FORCEINLINE_FUNCTION
unsigned 
size () const
unsigned count () const
void set ()
void reset ()
void clear ()
KOKKOS_FORCEINLINE_FUNCTION bool set (unsigned i) const
KOKKOS_FORCEINLINE_FUNCTION bool reset (unsigned i) const
KOKKOS_FORCEINLINE_FUNCTION bool test (unsigned i) const
KOKKOS_FORCEINLINE_FUNCTION
unsigned 
max_hint () const
KOKKOS_INLINE_FUNCTION
Kokkos::pair< bool, unsigned > 
find_any_set_near (unsigned hint, unsigned scan_direction=BIT_SCAN_FORWARD_MOVE_HINT_FORWARD) const
KOKKOS_INLINE_FUNCTION
Kokkos::pair< bool, unsigned > 
find_any_unset_near (unsigned hint, unsigned scan_direction=BIT_SCAN_FORWARD_MOVE_HINT_FORWARD) const

Detailed Description

template<typename Device>
class Kokkos::Bitset< Device >

A thread safe view to a bitset.

Definition at line 74 of file Kokkos_Bitset.hpp.


Constructor & Destructor Documentation

template<typename Device>
Kokkos::Bitset< Device >::Bitset ( unsigned  arg_size = 0u) [inline]

constructor arg_size := number of bit in set

Definition at line 100 of file Kokkos_Bitset.hpp.

template<typename Device>
Kokkos::Bitset< Device >::Bitset ( Bitset< Device > const &  rhs) [inline]

copy constructor

Definition at line 121 of file Kokkos_Bitset.hpp.


Member Function Documentation

template<typename Device>
Bitset<Device>& Kokkos::Bitset< Device >::operator= ( Bitset< Device > const &  rhs) [inline]

assignment

Definition at line 111 of file Kokkos_Bitset.hpp.

template<typename Device>
KOKKOS_FORCEINLINE_FUNCTION unsigned Kokkos::Bitset< Device >::size ( ) const [inline]

number of bits in the set can be call from the host or the device

Definition at line 130 of file Kokkos_Bitset.hpp.

template<typename Device>
unsigned Kokkos::Bitset< Device >::count ( ) const [inline]

number of bits which are set to 1 can only be called from the host

Definition at line 135 of file Kokkos_Bitset.hpp.

template<typename Device>
void Kokkos::Bitset< Device >::set ( ) [inline]

set all bits to 1 can only be called from the host

Definition at line 143 of file Kokkos_Bitset.hpp.

template<typename Device>
void Kokkos::Bitset< Device >::reset ( ) [inline]

set all bits to 0 can only be called from the host

Definition at line 156 of file Kokkos_Bitset.hpp.

template<typename Device>
void Kokkos::Bitset< Device >::clear ( ) [inline]

set all bits to 0 can only be called from the host

Definition at line 163 of file Kokkos_Bitset.hpp.

template<typename Device>
KOKKOS_FORCEINLINE_FUNCTION bool Kokkos::Bitset< Device >::set ( unsigned  i) const [inline]

set i'th bit to 1 can only be called from the device

Definition at line 171 of file Kokkos_Bitset.hpp.

template<typename Device>
KOKKOS_FORCEINLINE_FUNCTION bool Kokkos::Bitset< Device >::reset ( unsigned  i) const [inline]

set i'th bit to 0 can only be called from the device

Definition at line 185 of file Kokkos_Bitset.hpp.

template<typename Device>
KOKKOS_FORCEINLINE_FUNCTION bool Kokkos::Bitset< Device >::test ( unsigned  i) const [inline]

return true if the i'th bit set to 1 can only be called from the device

Definition at line 199 of file Kokkos_Bitset.hpp.

template<typename Device>
KOKKOS_FORCEINLINE_FUNCTION unsigned Kokkos::Bitset< Device >::max_hint ( ) const [inline]

used with find_any_set_near or find_any_unset_near functions returns the max number of times those functions should be call when searching for an available bit

Definition at line 213 of file Kokkos_Bitset.hpp.

template<typename Device>
KOKKOS_INLINE_FUNCTION Kokkos::pair<bool, unsigned> Kokkos::Bitset< Device >::find_any_set_near ( unsigned  hint,
unsigned  scan_direction = BIT_SCAN_FORWARD_MOVE_HINT_FORWARD 
) const [inline]

find a bit set to 1 near the hint returns a pair< bool, unsigned> where if result.first is true then result.second is the bit found and if result.first is false the result.second is a new hint

Definition at line 222 of file Kokkos_Bitset.hpp.

template<typename Device>
KOKKOS_INLINE_FUNCTION Kokkos::pair<bool, unsigned> Kokkos::Bitset< Device >::find_any_unset_near ( unsigned  hint,
unsigned  scan_direction = BIT_SCAN_FORWARD_MOVE_HINT_FORWARD 
) const [inline]

find a bit set to 0 near the hint returns a pair< bool, unsigned> where if result.first is true then result.second is the bit found and if result.first is false the result.second is a new hint

Definition at line 236 of file Kokkos_Bitset.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends