[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/work/eigen2/Eigen/src/Core
From:       BenoƮt Jacob <jacob () math ! jussieu ! fr>
Date:       2008-06-24 18:08:35
Message-ID: 1214330915.775597.24565.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 824040 by bjacob:

make use of ei_pmadd in dot-product: will further improve performance
on architectures having a packed-mul-add assembly instruction.



 M  +7 -8      Dot.h  


--- branches/work/eigen2/Eigen/src/Core/Dot.h #824039:824040
@@ -108,8 +108,9 @@
 
   inline static PacketScalar run(const Derived1& v1, const Derived2& v2)
   {
-    return ei_padd(
-      ei_pmul(v1.template packet<Aligned>(row1, col1), v2.template packet<Aligned>(row2, col2)),
+    return ei_pmadd(
+      v1.template packet<Aligned>(row1, col1),
+      v2.template packet<Aligned>(row2, col2),
       ei_dot_vec_unroller<Derived1, Derived2, Index+ei_packet_traits<Scalar>::size, Stop>::run(v1, v2)
     );
   }
@@ -192,12 +193,10 @@
         const int col1 = rowVector1 ? index : 0;
         const int row2 = rowVector2 ? 0 : index;
         const int col2 = rowVector2 ? index : 0;
-        packet_res = ei_padd(
-                       packet_res,
-                       ei_pmul(
-                         v1.template packet<Aligned>(row1, col1),
-                         v2.template packet<Aligned>(row2, col2)
-                       )
+        packet_res = ei_pmadd(
+                       v1.template packet<Aligned>(row1, col1),
+                       v2.template packet<Aligned>(row2, col2),
+                       packet_res
                      );
       }
       res = ei_predux(packet_res);
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic