Removed the if statements from the constructors to improve performance
authorLukasz Wesolowski <wesolwsk@illinois.edu>
Tue, 7 Jul 2009 20:01:17 +0000 (20:01 +0000)
committerLukasz Wesolowski <wesolwsk@illinois.edu>
Tue, 7 Jul 2009 20:01:17 +0000 (20:01 +0000)
src/util/SSE-Double.h
src/util/SSE-Float.h

index 78429be4ef507a550c68ebb2ca1433e147f39c00..00d0c3ef3f25705e7ef39fbbf54126421d012776 100644 (file)
@@ -17,17 +17,9 @@ class SSEDouble
     
            SSEDouble() {} 
   
-           SSEDouble(double d) { if (d==0.0) val = _mm_setzero_pd(); else val= _mm_set1_pd(d);}
+           SSEDouble(double d) { val= _mm_set1_pd(d);}
 
-           SSEDouble(double d0, double d1) {val = _mm_setr_pd(d0,d1);}
-
-           //SSEDouble(double d=0.0) { val = _mm_setzero_pd();} 
-
-           
-
-          // operator __m128d() const  {return val;}   
-
-           
+           SSEDouble(double d0, double d1) {val = _mm_setr_pd(d0,d1);}           
 
            /* Arithmetic Operators*/ 
            friend inline SSEDouble operator -(const SSEDouble &a) {SSEDouble c;c.val=_mm_sub_pd(_mm_setzero_pd(),a.val);return c;}
index 75dc91f2fd1f600122c1620187fd6f4130735f46..badb109a5b5e8a9203f947caedb86ae4b9059e4e 100644 (file)
@@ -16,17 +16,9 @@ class SSEFloat
     
            SSEFloat() {} 
   
-           SSEFloat(float f) { if (f==0.0) val = _mm_setzero_ps(); else val= _mm_set1_ps(f);}
+           SSEFloat(float f) { val= _mm_set1_ps(f);}
 
-           SSEFloat(float f0, float f1,float f2, float f3) {val = _mm_setr_ps(f0,f1,f2,f3);}
-
-           //Double(double d=0.0) { val = _mm_setzero_pd();} 
-
-           
-
-          // operator __m128d() const  {return val;}   
-
-           
+           SSEFloat(float f0, float f1,float f2, float f3) {val = _mm_setr_ps(f0,f1,f2,f3);}                     
 
            /* Arithmetic Operators*/