[PD-cvs] pd/src g_io.c,1.1.1.1.16.2,1.1.1.1.16.3

Tim Blechmann timblech at users.sourceforge.net
Mon Sep 6 10:02:46 CEST 2004


Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8072

Modified Files:
      Tag: devel_0_37
	g_io.c 
Log Message:
vectorized vinlet_perform

Index: g_io.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_io.c,v
retrieving revision 1.1.1.1.16.2
retrieving revision 1.1.1.1.16.3
diff -C2 -d -r1.1.1.1.16.2 -r1.1.1.1.16.3
*** g_io.c	25 Nov 2003 19:19:57 -0000	1.1.1.1.16.2
--- g_io.c	6 Sep 2004 08:02:43 -0000	1.1.1.1.16.3
***************
*** 128,131 ****
--- 128,150 ----
  }
  
+ /* tb: vectorized */
+ t_int *vinlet_perf8(t_int *w)
+ {
+     t_vinlet *x = (t_vinlet *)(w[1]);
+     t_float *out = (t_float *)(w[2]);
+     int n = (int)(w[3]);
+     t_float *in = x->x_read;
+ 
+     for (; n; n -= 8, in += 8, out += 8)
+     {
+ 	out[0] = in[0]; out[1] = in[1]; out[2] = in[2]; out[3] = in[3]; 
+ 	out[4] = in[4]; out[5] = in[5]; out[6] = in[6]; out[7] = in[7]; 
+     }
+ 
+     if (in == x->x_endbuf) in = x->x_buf;
+     x->x_read = in;
+     return (w+4);
+ }
+ 
  static void vinlet_dsp(t_vinlet *x, t_signal **sp)
  {
***************
*** 141,145 ****
      else
      {
! 	dsp_add(vinlet_perform, 3, x, outsig->s_vec, outsig->s_n);
  	x->x_read = x->x_buf;
      }
--- 160,167 ----
      else
      {
! 	if (sp[0]->s_n & 7)
! 	    dsp_add(vinlet_perform, 3, x, outsig->s_vec, outsig->s_n);
! 	else
! 	    dsp_add(vinlet_perf8, 3, x, outsig->s_vec, outsig->s_n);
  	x->x_read = x->x_buf;
      }





More information about the Pd-cvs mailing list