From efc278746b34da586dcf43a228ebe59627a17b58 Mon Sep 17 00:00:00 2001 From: Daniel Grund Date: Tue, 19 Apr 2005 10:18:45 +0000 Subject: [PATCH] added set_all func [r5715] --- ir/adt/bitset.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ir/adt/bitset.h b/ir/adt/bitset.h index 1f621680b..5d86c2383 100644 --- a/ir/adt/bitset.h +++ b/ir/adt/bitset.h @@ -306,6 +306,18 @@ static INLINE void bitset_clear_all(bitset_t *bs) memset(bs->data, 0, BS_UNIT_SIZE * bs->units); } +/** + * Set the bitset. + * This sets all bits to one. + * @param bs The bitset. + */ +static INLINE void bitset_set_all(bitset_t *bs) +{ + //TODO is this correct (last unit)? + //TODO is -1 correct == all bits equal 1 + memset(bs->data, -1, BS_UNIT_SIZE * bs->units); +} + /** * Check, if one bitset is contained by another. * That is, each bit set in lhs is also set in rhs. -- 2.20.1