37 template<
typename Result,
typename Operator,
typename Arg,
typename ...Rest>
38 static constexpr Result
binary(Operator op,
const Arg &x,
const Arg &
y,
42 (op, x,
y, op (x.val[M - 1],
y.val[M - 1]), rest...);
47 template<
typename Result,
typename Arg,
typename ...Rest>
48 static constexpr Result
bit_not(
const Arg &x, Rest ...rest)
51 (x, ~(x.val[M - 1]), rest...);
55 template<
typename Arg>
58 return (
bool) x.val[M - 1]
64 template<
typename Arg>
65 static constexpr bool equal(
const Arg &x,
const Arg &
y)
67 return x.val[M - 1] ==
y.val[M - 1]
75 template<
typename Result,
typename ...Rest>
76 static constexpr Result
from_index(
int index, Rest ...rest)
80 uint64_t ((index - (M - 1) * 64) == (index & 63)) << (index & 63),
91 template<
typename Result,
typename Operator,
typename Arg,
typename ...Rest>
92 static constexpr Result
binary(Operator,
const Arg,
const Arg,
95 return Result { rest... };
98 template<
typename Result,
typename Arg,
typename ...Rest>
99 static constexpr Result
bit_not(
const Arg, Rest ...rest)
101 return Result { rest... };
104 template<
typename Arg>
110 template<
typename Arg>
111 static constexpr bool equal(
const Arg,
const Arg)
116 template<
typename Result,
typename ...Rest>
119 return Result { rest... };
140 template<
typename... Rest>
141 constexpr bbitmap(Rest ...rest) : val{(uint64_t) rest...} {}
151 for (
int i = 0;
i <
N;
i++)
152 val[
i] |= other.
val[
i];
165 for (
int i = 0;
i <
N;
i++)
166 val[
i] &= other.
val[
i];
179 for (
int i = 0;
i <
N;
i++)
180 val[
i] ^= other.
val[
i];
195 constexpr explicit operator bool()
const
constexpr T bbitmap_element_and(T x, T y)
Definition bbitmap.h:127
void gt_pch_nx(bbitmap< N > *)
Definition bbitmap.h:226
constexpr T bbitmap_element_xor(T x, T y)
Definition bbitmap.h:130
void gt_ggc_mx(bbitmap< N > *)
Definition bbitmap.h:220
constexpr T bbitmap_element_or(T x, T y)
Definition bbitmap.h:124
constexpr bool operator==(const bbitmap< N > other) const
Definition bbitmap.h:200
constexpr bbitmap< N > operator|(const bbitmap< N > other) const
Definition bbitmap.h:143
constexpr bool operator!=(const bbitmap< N > other) const
Definition bbitmap.h:205
uint64_t val[N]
Definition bbitmap.h:138
static constexpr bbitmap< N > from_index(int index)
Definition bbitmap.h:212
constexpr bbitmap< N > operator^(const bbitmap< N > other) const
Definition bbitmap.h:171
constexpr bool operator!() const
Definition bbitmap.h:190
constexpr bbitmap< N > operator~() const
Definition bbitmap.h:185
constexpr bbitmap(Rest ...rest)
Definition bbitmap.h:141
bbitmap< N > operator^=(const bbitmap< N > other)
Definition bbitmap.h:177
bbitmap< N > operator&=(const bbitmap< N > other)
Definition bbitmap.h:163
constexpr bbitmap< N > operator&(const bbitmap< N > other) const
Definition bbitmap.h:157
bbitmap< N > operator|=(const bbitmap< N > other)
Definition bbitmap.h:149
#define GTY(x)
Definition coretypes.h:41
void(* gt_pointer_operator)(void *, void *, void *)
Definition coretypes.h:473
#define N
Definition gensupport.cc:202
i
Definition poly-int.h:776
static constexpr Result binary(Operator, const Arg, const Arg, Rest ...rest)
Definition bbitmap.h:92
static constexpr Result bit_not(const Arg, Rest ...rest)
Definition bbitmap.h:99
static constexpr bool non_zero(const Arg)
Definition bbitmap.h:105
static constexpr Result from_index(int, Rest ...rest)
Definition bbitmap.h:117
static constexpr bool equal(const Arg, const Arg)
Definition bbitmap.h:111
static constexpr bool non_zero(const Arg &x)
Definition bbitmap.h:56
static constexpr Result from_index(int index, Rest ...rest)
Definition bbitmap.h:76
static constexpr bool equal(const Arg &x, const Arg &y)
Definition bbitmap.h:65
static constexpr Result bit_not(const Arg &x, Rest ...rest)
Definition bbitmap.h:48
static constexpr Result binary(Operator op, const Arg &x, const Arg &y, Rest ...rest)
Definition bbitmap.h:38
#define bool
Definition system.h:886
const T2 & y
Definition wide-int.h:3870