bitset-base.hpp
Go to the documentation of this file.
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
* Main authors:
* Mikael Lagerkvist <lagerkvist@gecode.org>
*
* Contributing authors:
* Linnea Ingmar <linnea.ingmar@hotmail.com>
* Christian Schulte <schulte@gecode.org>
*
* Copyright:
* Linnea Ingmar, 2017
* Mikael Lagerkvist, 2007
* Christian Schulte, 2007
*
* This file is part of Gecode, the generic constraint
* development environment:
* http://www.gecode.org
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
#include <climits>
#ifdef _MSC_VER
#include <intrin.h>
#if defined(_M_IX86)
#pragma intrinsic(_BitScanForward)
#pragma intrinsic(__popcnt)
#define GECODE_SUPPORT_MSVC_32
#endif
#if defined(_M_X64) || defined(_M_IA64)
#pragma intrinsic(_BitScanForward64)
#pragma intrinsic(__popcnt64)
#define GECODE_SUPPORT_MSVC_64
#endif
#endif
namespace Gecode { namespace Support {
class RawBitSetBase;
class BitSetData {
friend class RawBitSetBase;
protected:
#if defined(GECODE_SUPPORT_MSVC_32)
typedef unsigned long int Base;
#else
typedef unsigned long long int Base;
#endif
Base bits;
public:
static const unsigned int bpb =
static_cast<unsigned int>(CHAR_BIT * sizeof(Base));
void init(bool setbits=false);
static unsigned int data(unsigned int s);
bool operator ()(unsigned int i=0U) const;
bool get(unsigned int i) const;
void set(unsigned int i);
void clear(unsigned int i);
unsigned int next(unsigned int i=0U) const;
bool all(void) const;
bool all(unsigned int i) const;
bool none(void) const;
bool none(unsigned int i) const;
unsigned int ones(void) const;
unsigned int zeroes(void) const;
bool one(void) const;
void a(BitSetData a);
void a(BitSetData a, unsigned int i);
static BitSetData a(BitSetData a, BitSetData b);
void o(BitSetData a);
void o(BitSetData a, unsigned int i);
static BitSetData o(BitSetData a, BitSetData b);
bool operator ==(BitSetData a) const;
bool operator !=(BitSetData a) const;
BitSetData operator ~(void) const;
};
enum BitSetStatus {
BSS_NONE,
BSS_ALL,
BSS_SOME
};
class RawBitSetBase {
protected:
static const unsigned int bpb = BitSetData::bpb;
BitSetData* data;
private:
RawBitSetBase(const RawBitSetBase&);
RawBitSetBase& operator =(const RawBitSetBase&);
public:
RawBitSetBase(void);
template<class A>
RawBitSetBase(A& a, unsigned int sz, bool setbits=false);
template<class A>
RawBitSetBase(A& a, unsigned int sz, const RawBitSetBase& bs);
template<class A>
void allocate(A& a, unsigned int sz);
template<class A>
void init(A& a, unsigned int sz, bool setbits=false);
void clearall(unsigned int sz, bool setbits=false);
void copy(unsigned int sz, const RawBitSetBase& bs);
bool get(unsigned int i) const;
void set(unsigned int i);
void clear(unsigned int i);
unsigned int next(unsigned int i) const;
BitSetStatus status(unsigned int sz) const;
bool all(unsigned int sz) const;
bool none(unsigned int sz) const;
template<class A>
void resize(A& a, unsigned int sz, unsigned int n, bool setbits=false);
template<class A>
void dispose(A& a, unsigned int sz);
};
class BitSetBase : public RawBitSetBase {
protected:
unsigned int sz;
private:
BitSetBase(const BitSetBase&);
BitSetBase& operator =(const BitSetBase&);
public:
BitSetBase(void);
template<class A>
BitSetBase(A& a, unsigned int s, bool setbits=false);
template<class A>
BitSetBase(A& a, const BitSetBase& bs);
template<class A>
void init(A& a, unsigned int s, bool setbits=false);
void clearall(bool setbits=false);
void copy(const BitSetBase& bs);
unsigned int size(void) const;
bool get(unsigned int i) const;
void set(unsigned int i);
void clear(unsigned int i);
unsigned int next(unsigned int i) const;
BitSetStatus status(void) const;
bool all(void) const;
bool none(void) const;
template<class A>
void resize(A& a, unsigned int n, bool setbits=false);
template<class A>
void dispose(A& a);
};
/*
* Bitset data
*
*/
forceinline void
BitSetData::init(bool setbits) {
bits = setbits ? ~static_cast<Base>(0) : static_cast<Base>(0);
}
forceinline unsigned int
BitSetData::data(unsigned int s) {
return s == 0 ? 0 : ((s-1) / bpb + 1);
}
forceinline bool
BitSetData::operator ()(unsigned int i) const {
return (bits >> i) != static_cast<Base>(0U);
}
forceinline bool
BitSetData::get(unsigned int i) const {
return (bits & (static_cast<Base>(1U) << i)) != static_cast<Base>(0U);
}
forceinline void
BitSetData::set(unsigned int i) {
bits |= (static_cast<Base>(1U) << i);
}
forceinline void
BitSetData::clear(unsigned int i) {
bits &= ~(static_cast<Base>(1U) << i);
}
forceinline unsigned int
BitSetData::next(unsigned int i) const {
assert(bits != static_cast<Base>(0));
#if defined(GECODE_SUPPORT_MSVC_32)
assert(bpb == 32);
unsigned long int p;
_BitScanForward(&p,bits >> i);
return static_cast<unsigned int>(p)+i;
#elif defined(GECODE_SUPPORT_MSVC_64)
assert(bpb == 64);
unsigned long int p;
_BitScanForward64(&p,bits >> i);
return static_cast<unsigned int>(p)+i;
#elif defined(GECODE_HAS_BUILTIN_FFSLL)
if (bpb == 64) {
int p = __builtin_ffsll(bits >> i);
assert(p > 0);
return static_cast<unsigned int>(p-1)+i;
}
#else
while (!get(i)) i++;
return i;
#endif
}
forceinline bool
BitSetData::all(void) const {
return bits == ~static_cast<Base>(0U);
}
forceinline bool
BitSetData::all(unsigned int i) const {
const Base mask = (static_cast<Base>(1U) << i) - static_cast<Base>(1U);
return (bits & mask) == mask;
}
forceinline bool
BitSetData::none(void) const {
return bits == static_cast<Base>(0U);
}
forceinline bool
BitSetData::none(unsigned int i) const {
const Base mask = (static_cast<Base>(1U) << i) - static_cast<Base>(1U);
return (bits & mask) == static_cast<Base>(0U);
}
forceinline unsigned int
BitSetData::ones(void) const {
#if defined(GECODE_SUPPORT_MSVC_32)
assert(bpb == 32);
return static_cast<unsigned int>(__popcnt(bits));
#elif defined(GECODE_SUPPORT_MSVC_64)
assert(bpb == 64);
return static_cast<unsigned int>(__popcnt64(bits));
#elif defined(GECODE_HAS_BUILTIN_POPCOUNTLL)
if (bpb == 64)
return static_cast<unsigned int>(__builtin_popcountll(bits));
#else
const unsigned long long int m1 = 0x5555555555555555;
const unsigned long long int m2 = 0x3333333333333333;
const unsigned long long int m4 = 0x0f0f0f0f0f0f0f0f;
unsigned long long int b = bits;
b -= (b >> 1) & m1;
b = (b & m2) + ((b >> 2) & m2);
b = (b + (b >> 4)) & m4;
b += b >> 8; b += b >> 16; b += b >> 32;
return static_cast<unsigned int>(b & 0x7f);
#endif
}
forceinline unsigned int
BitSetData::zeroes(void) const {
return bpb - ones();
}
forceinline bool
BitSetData::one(void) const {
return (bits & (bits - static_cast<Base>(1U))) ==
static_cast<Base>(0U);
}
forceinline void
BitSetData::a(BitSetData a) {
bits &= a.bits;
}
forceinline void
BitSetData::a(BitSetData a, unsigned int i) {
const Base mask = (static_cast<Base>(1U) << i) - static_cast<Base>(1U);
bits &= (a.bits & mask);
}
forceinline BitSetData
BitSetData::a(BitSetData a, BitSetData b) {
BitSetData ab;
ab.bits = a.bits & b.bits;
return ab;
}
forceinline void
BitSetData::o(BitSetData a) {
bits |= a.bits;
}
forceinline void
BitSetData::o(BitSetData a, unsigned int i) {
const Base mask = (static_cast<Base>(1U) << i) - static_cast<Base>(1U);
bits |= (a.bits & mask);
}
forceinline BitSetData
BitSetData::o(BitSetData a, BitSetData b) {
BitSetData ab;
ab.bits = a.bits | b.bits;
return ab;
}
forceinline BitSetData
BitSetData::operator ~(void) const {
BitSetData iv;
iv.bits = ~bits;
return iv;
}
forceinline bool
BitSetData::operator ==(BitSetData a) const {
return bits == a.bits;
}
forceinline bool
BitSetData::operator !=(BitSetData a) const {
return bits != a.bits;
}
/*
* Basic bit sets
*
*/
forceinline bool
RawBitSetBase::get(unsigned int i) const {
return data[i / bpb].get(i % bpb);
}
forceinline void
RawBitSetBase::set(unsigned int i) {
data[i / bpb].set(i % bpb);
}
forceinline void
RawBitSetBase::clear(unsigned int i) {
data[i / bpb].clear(i % bpb);
}
template<class A>
void
RawBitSetBase::resize(A& a, unsigned int sz, unsigned int n, bool setbits) {
if (n>sz) {
data = a.template realloc<BitSetData>(data,BitSetData::data(sz+1),
BitSetData::data(n+1));
for (unsigned int i=BitSetData::data(sz)+1;
i<BitSetData::data(n+1); i++) {
data[i].init(setbits);
}
for (unsigned int i=(sz%bpb); i<bpb; i++)
if (setbits)
data[sz / bpb].set(i);
else
data[sz / bpb].clear(i);
}
set(n);
}
template<class A>
forceinline void
RawBitSetBase::dispose(A& a, unsigned int sz) {
a.template free<BitSetData>(data,BitSetData::data(sz+1));
}
forceinline
RawBitSetBase::RawBitSetBase(void)
: data(NULL) {}
template<class A>
forceinline
RawBitSetBase::RawBitSetBase(A& a, unsigned int sz, bool setbits)
: data(a.template alloc<BitSetData>(BitSetData::data(sz+1))) {
for (unsigned int i=0U; i<BitSetData::data(sz+1); i++)
data[i].init(setbits);
// Set a bit at position sz as sentinel (for efficient next)
set(sz);
}
template<class A>
forceinline
RawBitSetBase::RawBitSetBase(A& a, unsigned int sz, const RawBitSetBase& bs)
: data(a.template alloc<BitSetData>(BitSetData::data(sz+1))) {
for (unsigned int i=0U; i<BitSetData::data(sz+1); i++)
data[i] = bs.data[i];
// Set a bit at position sz as sentinel (for efficient next)
set(sz);
}
template<class A>
forceinline void
RawBitSetBase::allocate(A& a, unsigned int sz) {
assert(data == NULL);
data=a.template alloc<BitSetData>(BitSetData::data(sz+1));
}
template<class A>
forceinline void
RawBitSetBase::init(A& a, unsigned int sz, bool setbits) {
assert(data == NULL);
data=a.template alloc<BitSetData>(BitSetData::data(sz+1));
for (unsigned int i=0U; i<BitSetData::data(sz+1); i++)
data[i].init(setbits);
// Set a bit at position sz as sentinel (for efficient next)
set(sz);
}
forceinline void
RawBitSetBase::copy(unsigned int sz, const RawBitSetBase& bs) {
for (unsigned int i=0U; i<BitSetData::data(sz+1); i++)
data[i] = bs.data[i];
}
forceinline void
RawBitSetBase::clearall(unsigned int sz, bool setbits) {
for (unsigned int i=0U; i<BitSetData::data(sz+1); i++)
data[i].init(setbits);
}
forceinline unsigned int
RawBitSetBase::next(unsigned int i) const {
unsigned int pos = i / bpb;
unsigned int bit = i % bpb;
if (data[pos](bit))
return pos * bpb + data[pos].next(bit);
// The sentinel bit guarantees that this loop always terminates
do {
pos++;
} while (!data[pos]());
return pos * bpb + data[pos].next();
}
forceinline BitSetStatus
RawBitSetBase::status(unsigned int sz) const {
unsigned int pos = sz / bpb;
unsigned int bits = sz % bpb;
if (pos > 0) {
if (data[0].all()) {
for (unsigned int i=1; i<pos; i++)
if (!data[i].all())
return BSS_SOME;
return data[pos].all(bits) ? BSS_ALL : BSS_SOME;
} else if (data[0].none()) {
for (unsigned int i=1; i<pos; i++)
if (!data[i].none())
return BSS_SOME;
return data[pos].none(bits) ? BSS_NONE : BSS_SOME;
} else {
return BSS_SOME;
}
}
if (data[0].all(bits))
return BSS_ALL;
if (data[0].none(bits))
return BSS_NONE;
return BSS_SOME;
}
forceinline bool
RawBitSetBase::all(unsigned int sz) const {
return status(sz) == BSS_ALL;
}
forceinline bool
RawBitSetBase::none(unsigned int sz) const {
return status(sz) == BSS_NONE;
}
template<class A>
void
BitSetBase::resize(A& a, unsigned int n, bool setbits) {
RawBitSetBase::resize(a,sz,n,setbits); sz=n;
}
template<class A>
forceinline void
BitSetBase::dispose(A& a) {
RawBitSetBase::dispose(a,sz);
}
forceinline
BitSetBase::BitSetBase(void)
: sz(0U) {}
template<class A>
forceinline
BitSetBase::BitSetBase(A& a, unsigned int s, bool setbits)
: RawBitSetBase(a,s,setbits), sz(s) {}
template<class A>
forceinline
BitSetBase::BitSetBase(A& a, const BitSetBase& bs)
: RawBitSetBase(a,bs.sz,bs), sz(bs.sz) {}
template<class A>
forceinline void
BitSetBase::init(A& a, unsigned int s, bool setbits) {
assert(sz == 0);
RawBitSetBase::init(a,s,setbits); sz=s;
}
forceinline void
BitSetBase::copy(const BitSetBase& bs) {
assert(sz == bs.sz);
RawBitSetBase::copy(sz,bs);
}
forceinline void
BitSetBase::clearall(bool setbits) {
RawBitSetBase::clearall(sz,setbits);
}
forceinline unsigned int
BitSetBase::size(void) const {
return sz;
}
forceinline bool
BitSetBase::get(unsigned int i) const {
assert(i < sz);
return RawBitSetBase::get(i);
}
forceinline void
BitSetBase::set(unsigned int i) {
assert(i < sz);
RawBitSetBase::set(i);
}
forceinline void
BitSetBase::clear(unsigned int i) {
assert(i < sz);
RawBitSetBase::clear(i);
}
forceinline unsigned int
BitSetBase::next(unsigned int i) const {
assert(i <= sz);
return RawBitSetBase::next(i);
}
forceinline BitSetStatus
BitSetBase::status(void) const {
return RawBitSetBase::status(sz);
}
forceinline bool
BitSetBase::all(void) const {
return RawBitSetBase::all(sz);
}
forceinline bool
BitSetBase::none(void) const {
return RawBitSetBase::none(sz);
}
}}
#ifdef GECODE_SUPPORT_MSVC_32
#undef GECODE_SUPPORT_MSVC_32
#endif
#ifdef GECODE_SUPPORT_MSVC_64
#undef GECODE_SUPPORT_MSVC_64
#endif
// STATISTICS: support-any
Gecode::Support::BitSetBase::BitSetBase
BitSetBase(void)
Default constructor (yields empty set).
Definition bitset-base.hpp:553
Gecode::Support::BitSetBase::dispose
void dispose(A &a)
Dispose memory for bit set.
Definition bitset-base.hpp:548
Gecode::Support::BitSetBase::status
BitSetStatus status(void) const
Return status of bitset.
Definition bitset-base.hpp:612
Gecode::Support::BitSetBase::all
bool all(void) const
Test whether all bits are set.
Definition bitset-base.hpp:617
Gecode::Support::BitSetBase::init
void init(A &a, unsigned int s, bool setbits=false)
Initialize for s bits and allocator a (only after default constructor).
Definition bitset-base.hpp:568
Gecode::Support::BitSetBase::get
bool get(unsigned int i) const
Access value at bit i.
Definition bitset-base.hpp:590
Gecode::Support::BitSetBase::clearall
void clearall(bool setbits=false)
Clear sz bits.
Definition bitset-base.hpp:580
Gecode::Support::BitSetBase::copy
void copy(const BitSetBase &bs)
Copy sz bits from bs.
Definition bitset-base.hpp:574
Gecode::Support::BitSetBase::size
unsigned int size(void) const
Return size of bitset (number of bits).
Definition bitset-base.hpp:585
Gecode::Support::BitSetBase::clear
void clear(unsigned int i)
Clear bit i.
Definition bitset-base.hpp:600
Gecode::Support::BitSetBase::none
bool none(void) const
Test whether no bits are set.
Definition bitset-base.hpp:622
Gecode::Support::BitSetBase::set
void set(unsigned int i)
Set bit i.
Definition bitset-base.hpp:595
Gecode::Support::BitSetBase::sz
unsigned int sz
Size of bitset (number of bits).
Definition bitset-base.hpp:193
Gecode::Support::BitSetBase::next
unsigned int next(unsigned int i) const
Return position greater or equal i of next set bit (i is allowed to be equal to size).
Definition bitset-base.hpp:606
Gecode::Support::BitSetBase::resize
void resize(A &a, unsigned int n, bool setbits=false)
Resize bitset to n elememts.
Definition bitset-base.hpp:542
Gecode::Support::BitSetData
Date item for bitsets.
Definition bitset-base.hpp:65
Gecode::Support::BitSetData::all
bool all(void) const
Whether all bits are set.
Definition bitset-base.hpp:294
Gecode::Support::BitSetData::operator==
bool operator==(BitSetData a) const
Check if bits are the same as for a.
Definition bitset-base.hpp:384
Gecode::Support::BitSetData::operator()
bool operator()(unsigned int i=0U) const
Test wether any bit with position greater or equal to i is set.
Definition bitset-base.hpp:254
Gecode::Support::BitSetData::clear
void clear(unsigned int i)
Clear bit i.
Definition bitset-base.hpp:266
Gecode::Support::BitSetData::RawBitSetBase
friend class RawBitSetBase
Definition bitset-base.hpp:66
Gecode::Support::BitSetData::zeroes
unsigned int zeroes(void) const
Return the number of bits not set.
Definition bitset-base.hpp:336
Gecode::Support::BitSetData::bpb
static const unsigned int bpb
Bits per base.
Definition bitset-base.hpp:79
Gecode::Support::BitSetData::operator!=
bool operator!=(BitSetData a) const
Check if bits are not the same as for a.
Definition bitset-base.hpp:388
Gecode::Support::BitSetData::get
bool get(unsigned int i) const
Access value at bit i.
Definition bitset-base.hpp:258
Gecode::Support::BitSetData::init
void init(bool setbits=false)
Initialize with all bits set if setbits.
Definition bitset-base.hpp:246
Gecode::Support::BitSetData::Base
unsigned long long int Base
Basetype for bits.
Definition bitset-base.hpp:73
Gecode::Support::BitSetData::one
bool one(void) const
Check whether exactly one bit is set.
Definition bitset-base.hpp:340
Gecode::Support::BitSetData::bits
Base bits
The bits.
Definition bitset-base.hpp:76
Gecode::Support::BitSetData::a
void a(BitSetData a)
Perform "and" with a.
Definition bitset-base.hpp:346
Gecode::Support::BitSetData::none
bool none(void) const
Whether no bits are set.
Definition bitset-base.hpp:303
Gecode::Support::BitSetData::ones
unsigned int ones(void) const
Return the number of bits set.
Definition bitset-base.hpp:313
Gecode::Support::BitSetData::next
unsigned int next(unsigned int i=0U) const
Return next set bit with position greater or equal to i (there must be a bit).
Definition bitset-base.hpp:270
Gecode::Support::BitSetData::operator~
BitSetData operator~(void) const
Invert all bits in b.
Definition bitset-base.hpp:378
Gecode::Support::BitSetData::o
void o(BitSetData a)
Perform "or" with a.
Definition bitset-base.hpp:362
Gecode::Support::BitSetData::data
static unsigned int data(unsigned int s)
Get number of data elements for s bits.
Definition bitset-base.hpp:250
Gecode::Support::BitSetData::set
void set(unsigned int i)
Set bit i.
Definition bitset-base.hpp:262
Gecode::Support::RawBitSetBase
Basic bitset support (without stored size information).
Definition bitset-base.hpp:137
Gecode::Support::RawBitSetBase::RawBitSetBase
RawBitSetBase(void)
Default constructor (yields empty set).
Definition bitset-base.hpp:437
Gecode::Support::RawBitSetBase::get
bool get(unsigned int i) const
Access value at bit i.
Definition bitset-base.hpp:399
Gecode::Support::RawBitSetBase::resize
void resize(A &a, unsigned int sz, unsigned int n, bool setbits=false)
Resize bitset from sz to n elememts.
Definition bitset-base.hpp:413
Gecode::Support::RawBitSetBase::init
void init(A &a, unsigned int sz, bool setbits=false)
Initialize for sz bits and allocator a (only after default constructor).
Definition bitset-base.hpp:469
Gecode::Support::RawBitSetBase::bpb
static const unsigned int bpb
Bits per base.
Definition bitset-base.hpp:140
Gecode::Support::RawBitSetBase::allocate
void allocate(A &a, unsigned int sz)
Allocate for sz bits and allocator a (only after default constructor).
Definition bitset-base.hpp:462
Gecode::Support::RawBitSetBase::status
BitSetStatus status(unsigned int sz) const
Return status of bitset.
Definition bitset-base.hpp:504
Gecode::Support::RawBitSetBase::none
bool none(unsigned int sz) const
Test whether no bits are set.
Definition bitset-base.hpp:535
Gecode::Support::RawBitSetBase::clear
void clear(unsigned int i)
Clear bit i.
Definition bitset-base.hpp:407
Gecode::Support::RawBitSetBase::data
BitSetData * data
Stored bits.
Definition bitset-base.hpp:142
Gecode::Support::RawBitSetBase::set
void set(unsigned int i)
Set bit i.
Definition bitset-base.hpp:403
Gecode::Support::RawBitSetBase::all
bool all(unsigned int sz) const
Test whether all bits are set.
Definition bitset-base.hpp:530
Gecode::Support::RawBitSetBase::clearall
void clearall(unsigned int sz, bool setbits=false)
Clear sz bits.
Definition bitset-base.hpp:485
Gecode::Support::RawBitSetBase::copy
void copy(unsigned int sz, const RawBitSetBase &bs)
Copy sz bits from bs.
Definition bitset-base.hpp:479
Gecode::Support::RawBitSetBase::dispose
void dispose(A &a, unsigned int sz)
Dispose memory for bit set.
Definition bitset-base.hpp:432
Gecode::Support::RawBitSetBase::next
unsigned int next(unsigned int i) const
Return position greater or equal i of next set bit (i is allowed to be equal to size).
Definition bitset-base.hpp:491
Gecode::Support
Support algorithms and datastructures
Gecode::Support::BitSetStatus
BitSetStatus
Status of a bitset.
Definition bitset-base.hpp:130
Gecode::Support::BSS_NONE
@ BSS_NONE
No bits set.
Definition bitset-base.hpp:131
Gecode::Support::BSS_ALL
@ BSS_ALL
All bits set.
Definition bitset-base.hpp:132
Gecode::Support::BSS_SOME
@ BSS_SOME
Some but not all bits set.
Definition bitset-base.hpp:133
Gecode
Gecode toplevel namespace
forceinline
#define forceinline
Definition config.hpp:187