diff options
author | Aina Niemetz <aina.niemetz@gmail.com> | 2020-09-30 17:26:46 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-30 17:26:46 -0700 |
commit | d7f92f70bb8ff221dc3d7cb086e5e2e237dadc67 (patch) | |
tree | 26916ced6f98142dd9dc04c454ff6d0c8161a8d6 /src/util/integer_cln_imp.h | |
parent | aa65c60968d0b8c0a7cd47adb2e9e1a684c0332a (diff) |
BitVector: Extend interface of setBit to set it to a specific value. (#5173)
Previously, BitVector::setBit only allowed to set the bit at the given
index to 1. This changes its behavior to be also able to set it to 0.
Diffstat (limited to 'src/util/integer_cln_imp.h')
-rw-r--r-- | src/util/integer_cln_imp.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/util/integer_cln_imp.h b/src/util/integer_cln_imp.h index c4f5182bf..2c62aa02e 100644 --- a/src/util/integer_cln_imp.h +++ b/src/util/integer_cln_imp.h @@ -162,12 +162,7 @@ class CVC4_PUBLIC Integer bool isBitSet(uint32_t i) const { return !extractBitRange(1, i).isZero(); } - Integer setBit(uint32_t i) const - { - cln::cl_I mask(1); - mask = mask << i; - return Integer(cln::logior(d_value, mask)); - } + Integer setBit(uint32_t i, bool value) const; Integer oneExtend(uint32_t size, uint32_t amount) const; |