6 #ifndef OPENMPCD_CUDA_IMPLEMENTATIONDETAILS_BITSET_HPP
7 #define OPENMPCD_CUDA_IMPLEMENTATIONDETAILS_BITSET_HPP
22 new unsigned int[(bitCount + bitsPerElement - 1) / bitsPerElement]),
44 const std::size_t element = bit / bitsPerElement;
45 const std::size_t bitInElement = bit % bitsPerElement;
49 atomicOr(&storage[element], 1 << bitInElement);
53 atomicAnd(&storage[element], ~(1U << bitInElement));
62 const std::size_t element = bit / bitsPerElement;
63 const std::size_t bitInElement = bit % bitsPerElement;
65 return (storage[element] >> bitInElement) & 1;
71 const std::size_t elementCount =
72 (bitCount + bitsPerElement - 1) / bitsPerElement;
74 for(std::size_t i = 0; i < elementCount; ++i)
75 storage[i] = value ? -1 : 0;
82 #endif //OPENMPCD_CUDA_IMPLEMENTATIONDETAILS_BITSET_HPP