[Gridflow-cvs] [svn] commit: r5310 - /trunk/src/classes1.cxx

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Mon Apr 5 15:31:07 EDT 2010


Author: matju
Date: Mon Apr  5 15:31:06 2010
New Revision: 5310

Log:
[#inner] optimisation attempt for case op *, fold +

Modified:
    trunk/src/classes1.cxx

Modified: trunk/src/classes1.cxx
==============================================================================
--- trunk/src/classes1.cxx (original)
+++ trunk/src/classes1.cxx Mon Apr  5 15:31:06 2010
@@ -710,7 +710,7 @@
 // -j--*---k---
 // AAA i CCCCC
 // AAA | CCCCC
-#define FOO for (long k=0; k<sk; k++) {T c=0; for (long j=0; j<sj; j++) {c+=as[j]*bs[j*sk+k];} *cs++=c;}
+#define FOO for (long k=0; k<sk; k++) {T c=0; for (long j=0,z=k; j<sj; j++,z+=sk) {c+=as[j]*bs[z];} *cs++=c;}
 template <class T> void dot_add_mul (long sk, long sj, T *cs, T *as, T *bs) {FOO}
 template <class T, long sj> void dot_add_mul (long sk, T *cs, T *as, T *bs) {FOO}
 template <class T, long sj, long sk> void dot_add_mul (T *cs, T *as, T *bs) {FOO}



More information about the Gridflow-cvs mailing list