Gromacs  2018.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros | Typedefs | Functions
bitmask.h File Reference
#include "config.h"
#include <string.h>
#include "gromacs/utility/basedefinitions.h"
+ Include dependency graph for bitmask.h:


Declares gmx_bitmask_t and associated functions.

Roland Schulz


 Size of bitmask. Has to be 32 or multiple of 64.


typedef gmx_uint64_t gmx_bitmask_t
 bitmask type


static void bitmask_clear (gmx_bitmask_t *m)
 Initialize all bits to 0.
static void bitmask_set_bit (gmx_bitmask_t *m, int b)
 Set bit at position b to 1.
static void bitmask_init_bit (gmx_bitmask_t *m, int b)
 Initialize all bits: bit b to 1, others to 0.
static void bitmask_init_low_bits (gmx_bitmask_t *m, int b)
 Initialize all bits: all bits below b to 1, others to 0.
static gmx_bool bitmask_is_set (gmx_bitmask_t m, int b)
 Test if bit b is set.
static gmx_bool bitmask_is_disjoint (gmx_bitmask_t a, gmx_bitmask_t b)
 Test if both bitmasks have no common bits enabled.
static gmx_bool bitmask_is_equal (gmx_bitmask_t a, gmx_bitmask_t b)
 Test if both bitmasks are equal.
static gmx_bool bitmask_is_zero (gmx_bitmask_t m)
 Test if bitmask has no enabled bits.
static void bitmask_union (gmx_bitmask_t *a, gmx_bitmask_t b)
 Set all bits enabled in either mask and write into a.