aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chilbert/BigBitVec.hpp7
-rw-r--r--chilbert/FixBitVec.hpp7
2 files changed, 14 insertions, 0 deletions
diff --git a/chilbert/BigBitVec.hpp b/chilbert/BigBitVec.hpp
index 1f97039..7a1b49a 100644
--- a/chilbert/BigBitVec.hpp
+++ b/chilbert/BigBitVec.hpp
@@ -75,6 +75,13 @@ public:
return *this;
}
+ /// Set all bits to one
+ CBigBitVec& set()
+ {
+ memset(m_pcRacks.get(), 0xFF, sizeof(CFixBitVec) * m_iRacks);
+ return *this;
+ }
+
/// Truncate to a given precision in bits (zero MSBs)
CBigBitVec& truncate(const int bits)
{
diff --git a/chilbert/FixBitVec.hpp b/chilbert/FixBitVec.hpp
index 2106aa5..ac02e40 100644
--- a/chilbert/FixBitVec.hpp
+++ b/chilbert/FixBitVec.hpp
@@ -43,6 +43,13 @@ public:
/// Return the size in bits
int size() const { return FBV_BITS; }
+ /// Set all bits to one
+ CFixBitVec& set()
+ {
+ m_rack = FBV1S;
+ return *this;
+ }
+
/// Set all bits to zero
CFixBitVec& reset()
{