Go to the documentation of this file.
6 #ifndef OPENMPCD_CUDA_BITSET_HPP
7 #define OPENMPCD_CUDA_BITSET_HPP
33 Bitset(
const std::size_t bitCount_);
68 void set(
const std::size_t bit,
const bool value);
81 bool get(
const std::size_t bit)
const;
90 void setAll(
const bool value);
99 unsigned int*
const storage;
100 const std::size_t bitCount;
103 static const std::size_t bitsPerElement =
sizeof(
unsigned int) * CHAR_BIT;
112 #endif //OPENMPCD_CUDA_BITSET_HPP
OPENMPCD_CUDA_DEVICE ~Bitset()
The destructor.
OPENMPCD_CUDA_DEVICE Bitset(const std::size_t bitCount_)
The constructor.
OPENMPCD_CUDA_DEVICE void set(const std::size_t bit, const bool value)
Sets the given bit to the given value.
#define OPENMPCD_CUDA_DEVICE
Denotes a function to be callable from a CUDA Device.
Represents a constant-size collection of boolean values.
OPENMPCD_CUDA_DEVICE bool get(const std::size_t bit) const
Returns the given bit.
OPENMPCD_CUDA_DEVICE void setAll(const bool value)
Sets all bits to the given value.
OPENMPCD_CUDA_DEVICE std::size_t getBitCount() const
Returns the number of accessible bits.