18template <
class T,
class S>
57 template <
typename... Args>
58 void set(T
v, Args... args)
64 operator bool()
const {
return bits; }
65 operator S()
const {
return bits; }
68 template <
typename... Args>
73 template <
typename... Args>
78 template <
typename... Args>
83 template <
typename... Args>
91#if !defined(GPUCA_GPUCODE_DEVICE)
92 static_assert(std::is_void_v<void>,
"type_traits header missing");
93 static_assert(std::is_integral_v<S>,
"Storage type non integral");
94 static_assert(
sizeof(
S) >=
sizeof(T),
"Storage type has insufficient capacity");
bitfield & operator&=(const bitfield v)
void set(T v, Args... args)
bool operator==(const bitfield v)
bool isSet(const S v) const
bitfield(const bitfield &)=default
bool operator!=(const bitfield v)
bool operator==(const T v)
bitfield operator&(const T v) const
bitfield operator|(const T v) const
bitfield operator|(const bitfield v) const
bitfield & setBits(const bitfield v, bool w)
bitfield & operator=(const bitfield &)=default
bitfield operator~() const
bool isSetAll(Args... args)
bitfield & operator|=(const bitfield v)
bool isSetAny(Args... args)
static bitfield lor(const Args &... args)
bool isOnlySet(Args... args)
bool isSet(const bitfield &v) const
bitfield operator&(const bitfield v) const
bool operator!=(const T v)
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const void * bits
GLubyte GLubyte GLubyte GLubyte w