|
waLBerla 7.2
|
Bit operations on integer data types.
Namespaces | |
| namespace | walberla |
| Storage for detected contacts which can be used to perform actions for all contacts, e.g. | |
| namespace | walberla::field |
Functions | |
Operations on bit-masks | |
| |
| template<class T > | |
| void | walberla::field::addMask (T &val, T mask) |
| template<class T > | |
| void | walberla::field::removeMask (T &val, T mask) |
| template<class T > | |
| bool | walberla::field::isMaskSet (const T &val, T mask) |
| template<class T > | |
| bool | walberla::field::isPartOfMaskSet (const T &val, T mask) |
Operations on bit-masks using flags | |
Flag is defined as a mask, where exactly one bit is set. This restriction is enforced in debug mode using asserts. In release mode the following functions are equivalent to their Mask variants. | |
| #define | F_MSG "Second parameter f=" << f << " has to be a flag (only one bit is 1)" |
| template<class T > | |
| bool | walberla::field::isFlag (T f) |
| template<class T > | |
| void | walberla::field::addFlag (T &v, T f) |
| template<class T > | |
| void | walberla::field::removeFlag (T &v, T f) |
| template<class T > | |
| bool | walberla::field::isFlagSet (const T &v, T f) |
| #define F_MSG "Second parameter f=" << f << " has to be a flag (only one bit is 1)" |