--- /home/vilas/downloads/m5-2.0b2/src/base/statistics.hh	2007-03-06 12:09:52.000000000 -0500
+++ ../../src/base/statistics.hh	2007-03-08 16:17:52.058688951 -0500
@@ -2027,6 +2027,39 @@
     virtual std::string str() const { return to_string(vresult[0]); }
 };
 
+template <class T>
+class ConstVectorNode : public Node
+{
+  private:
+    VResult vresult;
+
+  public:
+    ConstVectorNode(T s) : vresult(s.begin(), s.end()) {}
+    const VResult &result() const { return vresult; }
+    virtual Result total() const 
+    { 
+        int size = this->size();
+        Result tmp = 0;
+        for (int i = 0; i < size; i++)
+        {
+            tmp += vresult[i];
+        }
+        return tmp;
+    }
+    virtual size_t size() const { return vresult.size(); }
+    virtual std::string str() const
+    {
+        int size = this->size();
+        std::string tmp = "(";
+        for (int i = 0; i < size; i++)
+        {    
+            tmp += csprintf("%s ",to_string(vresult[i]));
+        }
+        tmp += ")";
+        return tmp;
+    }
+};
+
 template <class Op>
 struct OpString;
 
@@ -2147,8 +2180,13 @@
     }
 
     Result total() const {
-	Op op;
-	return op(l->total(), r->total());
+	VResult res = this->result();
+        Result tmp = 0;
+        for (int i = 0; i < size(); i++)
+        {
+            tmp += res[i];
+        }
+        return tmp;
     }
 
     virtual size_t size() const {
@@ -2876,6 +2914,13 @@
     return NodePtr(new ConstNode<T>(val));
 }
 
+template <typename T>
+inline Temp
+constantVector(T val)
+{
+    return NodePtr(new ConstVectorNode<T>(val));
+}
+
 inline Temp
 sum(Temp val)
 {
