summaryrefslogtreecommitdiff
path: root/cacount.cpp
diff options
context:
space:
mode:
authorJan Huwald <jh@sotun.de>2013-03-06 10:09:37 (GMT)
committerJan Huwald <jh@sotun.de>2013-03-06 10:09:37 (GMT)
commitd10811d0e87ad9965d30c0e516fd804b0f26d0aa (patch)
tree51dff01adf3852310d90f052857413e63fb613c3 /cacount.cpp
parent54ce2e60ccf93fb9f5d63e89b59d6adc223180ed (diff)
add compile-time variable bit length
Diffstat (limited to 'cacount.cpp')
-rw-r--r--cacount.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/cacount.cpp b/cacount.cpp
index 07863ca..26b2069 100644
--- a/cacount.cpp
+++ b/cacount.cpp
@@ -15,8 +15,12 @@
using namespace std;
+#ifndef BIT_WIDTH
+#define BIT_WIDTH 31
+#endif
+
typedef uint32_t State;
-const State logState = 31;
+const State logState = BIT_WIDTH;
const State maxState = 1 << logState;
bitset<8> rule(110);
contact: Jan Huwald // Impressum