[Gridflow-cvs] [svn] commit: r3366 - in /trunk/base: grid.c grid.h

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Sun Mar 30 18:49:07 EDT 2008


Author: matju
Date: Sun Mar 30 18:49:06 2008
New Revision: 3366

Log:
can't send grids from Ruby anymore. (send_out_grid_begin and stuff)

Modified:
    trunk/base/grid.c
    trunk/base/grid.h

Modified: trunk/base/grid.c
==============================================================================
--- trunk/base/grid.c (original)
+++ trunk/base/grid.c Sun Mar 30 18:49:06 2008
@@ -495,29 +495,6 @@
 	inl->set_chunk(whichdim);
 }
 
-\def void send_out_grid_begin (int outlet, Array buf, NumberTypeE nt=int32_e) {
-	if (outlet<0) RAISE("bad outlet number");
-	int n = rb_ary_len(buf);
-	Ruby *p = rb_ary_ptr(buf);
-	int32 v[n];
-	for (int i=0; i<n; i++) v[i] = convert(p[i],(int32*)0);
-	out = new GridOutlet(this,outlet,new Dim(n,v),nt); // valgrind says leak?
-}
-
-\def void send_out_grid_flow (int outlet,String buf, NumberTypeE nt=int32_e) {
-	if (outlet<0) RAISE("bad outlet number");
-#define FOO(T) out->send(rb_str_len(buf)/sizeof(T),(T*)rb_str_ptr(buf));
-	TYPESWITCH(nt,FOO,)
-#undef FOO
-}
-
-\def void send_out_grid_flow_3 (int outlet, long n, long data, NumberTypeE nt=int32_e) {
-	if (outlet<0) RAISE("bad outlet number");
-#define FOO(T) out->send(n,INT2PTR(T,data));
-	TYPESWITCH(nt,FOO,)
-#undef FOO
-}
-
 // install_rgrid(Integer inlet, Boolean multi_type? = true)
 static Ruby GridObject_s_install_rgrid(int argc, Ruby *argv, Ruby rself) {
 	if (argc<1 || argc>2) RAISE("er...");

Modified: trunk/base/grid.h
==============================================================================
--- trunk/base/grid.h (original)
+++ trunk/base/grid.h Sun Mar 30 18:49:06 2008
@@ -439,7 +439,10 @@
 		name(name_), size(size_), flags(flags_), aliases(aliases_) {}
 };
 
+NumberTypeE NumberTypeE_find (string sym);
+#ifdef USE_RUBY
 NumberTypeE NumberTypeE_find (Symbol sym);
+#endif
 
 #define TYPESWITCH(T,C,E) switch (T) { \
   case uint8_e:   C(uint8) break;         case int16_e: C(int16) break; \
@@ -550,10 +553,6 @@
 		typename NumopOn<T>::Scan f = on(*as)->scan;
 		if (!f) RAISE("operator %s does not support scan",name);
 		f(an,n,(T *)as,(T *)bs);}
-	void map_m  (NumberTypeE nt,          long n, String as, String b);
-	void zip_m  (NumberTypeE nt,          long n, String as, String bs);
-	void fold_m (NumberTypeE nt, long an, long n, String as, String bs);
-	void scan_m (NumberTypeE nt, long an, long n, String as, String bs);
 
 	Numop(Symbol sym_, const char *name_,
 #define FOO(T) NumopOn<T> op_##T, 
@@ -877,9 +876,6 @@
 	\decl Symbol inlet_nt(int inln);
 	\decl void inlet_set_factor(int inln, long factor);
 	\decl void inlet_set_chunk(int inln, long chunk);
-	\decl void send_out_grid_begin (int outlet, Array dim,        NumberTypeE nt=int32_e);
-	\decl void send_out_grid_flow  (int outlet, String buf,       NumberTypeE nt=int32_e);
-	\decl void send_out_grid_flow_3(int outlet, long n, long buf, NumberTypeE nt=int32_e);
 };
 \end class GridObject
 



More information about the Gridflow-cvs mailing list