[Gridflow-cvs] [svn] commit: r3464 - /trunk/base/flow_objects.c

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Fri Apr 4 12:31:56 EDT 2008


Author: matju
Date: Fri Apr  4 12:31:55 2008
New Revision: 3464

Log:
[#pack] now accepts 1-element lists. [#unpack] now outputs floats instead of 1-element lists. [#unpack] now outputs right-to-left like it used 
to.

Modified:
    trunk/base/flow_objects.c

Modified: trunk/base/flow_objects.c
==============================================================================
--- trunk/base/flow_objects.c (original)
+++ trunk/base/flow_objects.c Fri Apr  4 12:31:55 2008
@@ -2265,6 +2265,7 @@
 	\decl void initialize (int n=2, NumberTypeE nt=int32_e);
 	\decl void initialize2 ();
 	\decl void _n_float (int inlet, float f);
+	\decl void _n_list  (int inlet, float f);
 	\decl 0 bang ();
 	//\grin 0
 };
@@ -2285,6 +2286,7 @@
 #undef FOO
 	_0_bang(argc,argv);
 }
+\def void _n_list (int inlet, float f) {_n_float(argc,argv,inlet,f);}
 \def 0 bang () {
 	out=new GridOutlet(this,0,a->dim,a->nt);
 #define FOO(T) out->send(n,(T *)*a);
@@ -2302,7 +2304,7 @@
 GRID_INLET(GridUnpack,0) {
 	in->set_chunk(0);
 } GRID_FLOW {
-	for (int i=0; i<n; i++) send_out(i,1,data+i);
+	for (int i=n-1; i>=0; i--) outlet_float(bself->out[i],(t_float)data[i]);
 } GRID_END
 \def void initialize (int n=2) {
 	if (n<1) RAISE("n=%d must be at least 1",n);



More information about the Gridflow-cvs mailing list