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

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Fri Mar 26 15:12:37 EDT 2010


Author: matju
Date: Fri Mar 26 15:12:35 2010
New Revision: 5156

Log:
second fix to [#], as promised

Modified:
    trunk/src/classes1.cxx

Modified: trunk/src/classes1.cxx
==============================================================================
--- trunk/src/classes1.cxx (original)
+++ trunk/src/classes1.cxx Fri Mar 26 15:12:35 2010
@@ -549,14 +549,10 @@
 \class GridOp : FObject {
 	\attr Numop *op;
 	PtrGrid r;
-	\constructor (Numop *op, Grid *r=0) {
-		this->op=op;
-		this->r=r?r:new Grid(new Dim(),int32_e,true);
-	}
+	\constructor (Numop *op, Grid *r=0) {this->op=op; this->r=r?r:new Grid(new Dim(),int32_e,true);}
 	\grin 0
 	\grin 1
 };
-
 GRID_INLET(0) {
 	snap_backstore(r);
 	SAME_TYPE(in,r);
@@ -575,12 +571,10 @@
 		T tada[pn];
 		COPY(tada,data,pn);
 		if (loop>1) {
-			if (dex+pn <= loop) {
-				op->zip(pn/op->size,tada,rdata+dex);
-			} else {
+			if (dex+pn <= loop) op->zip(pn/op->size,tada,rdata+dex); else {
 				// !@#$ should prebuild and reuse this array when "loop" is small
 				T data2[pn];
-				long ii = mod(dex,loop);
+				long ii = mod(out->dex,loop);
 				long m = min(loop-ii,pn);
 				COPY(data2,rdata+ii,m);
 				long nn = m+((pn-m)/loop)*loop;
@@ -593,7 +587,6 @@
 		n-=pn; data+=pn;
 	}
 } GRID_END
-
 GRID_INPUT2(1,r) {} GRID_END
 \end class {install("#",2,1); add_creator("@");}
 



More information about the Gridflow-cvs mailing list