diff --git a/sma.hh b/sma.hh index aaac5e1..5000c76 100644 --- a/sma.hh +++ b/sma.hh @@ -85,6 +85,9 @@ class SMA4 struct Add { TYPE operator () (TYPE a, TYPE b) { return a + b; } }; SWA swa; public: + SMA4() : swa(0) + { + } TYPE operator () (TYPE input) { if (NORM) diff --git a/swa.hh b/swa.hh index c92e649..9909232 100644 --- a/swa.hh +++ b/swa.hh @@ -15,10 +15,10 @@ class SWA int leaf; OP op; public: - SWA() : leaf(NUM) + SWA(TYPE ident) : leaf(NUM) { for (int i = 0; i < 2 * NUM; ++i) - tree[i] = 0; + tree[i] = ident; } TYPE operator () (TYPE input) {