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

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Thu May 13 14:32:57 EDT 2010


Author: matju
Date: Thu May 13 14:32:55 2010
New Revision: 5679

Log:
do not use the global MAX_PACKET_SIZE because it is going to disappear

Modified:
    trunk/src/classes1.cxx

Modified: trunk/src/classes1.cxx
==============================================================================
--- trunk/src/classes1.cxx (original)
+++ trunk/src/classes1.cxx Thu May 13 14:32:55 2010
@@ -722,6 +722,7 @@
 MAKE_DOT(dot_add_mul,FOO)
 #undef FOO
 
+#define MAX_PACKET_SIZE 4096
 GRID_INLET(0) {
 	SAME_TYPE(in,r);
 	SAME_TYPE(in,seed);
@@ -737,7 +738,7 @@
 	out=new GridOutlet(this,0,Dim(n,v),in.nt);
 	in.set_chunk(a.n-1);
 	long sjk=r->dim.prod(), sj=in.dim.prod(a.n-1), sk=sjk/sj;
-	long chunk = max(1L,GridOutlet::MAX_PACKET_SIZE/sjk);
+	long chunk = max(1L,MAX_PACKET_SIZE/sjk);
 	T *rdata = (T *)*r;
 	r2=new Grid(Dim(chunk*sjk),r->nt);
 	T *buf3 = (T *)*r2;
@@ -747,7 +748,7 @@
 	use_dot = op==op_mul && fold==op_add && seed->dim.n==0 && *(T *)*seed==0;
 } GRID_FLOW {
     long sjk=r->dim.prod(), sj=in.dim.prod(in.dim.n-1), sk=sjk/sj;
-    long chunk = max(1L,GridOutlet::MAX_PACKET_SIZE/sjk), off=chunk;
+    long chunk = max(1L,MAX_PACKET_SIZE/sjk), off=chunk;
     T buf [chunk*sk];
     T buf2[chunk*sk];
     if (use_dot) {



More information about the Gridflow-cvs mailing list