[PD-cvs] externals/ext13 catch13~.c,1.1.1.1,1.2
Tim Blechmann
timblech at users.sourceforge.net
Fri Sep 3 09:56:08 CEST 2004
Update of /cvsroot/pure-data/externals/ext13
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1717
Modified Files:
catch13~.c
Log Message:
added vectorized function
Index: catch13~.c
===================================================================
RCS file: /cvsroot/pure-data/externals/ext13/catch13~.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** catch13~.c 9 Jul 2002 12:41:49 -0000 1.1.1.1
--- catch13~.c 3 Sep 2004 07:56:06 -0000 1.2
***************
*** 25,30 ****
}
!
! t_int *sigcatch13_perform(t_int *w)
{
t_float *in = (t_float *)(w[1]);
--- 25,29 ----
}
! t_int *sigcatch13_perform(t_int *w)
{
t_float *in = (t_float *)(w[1]);
***************
*** 35,38 ****
--- 34,54 ----
}
+ /* tb: vectorized */
+ t_int *sigcatch13_perf8(t_int *w)
+ {
+ t_float *in = (t_float *)(w[1]);
+ t_float *out = (t_float *)(w[2]);
+ int n = (int)(w[3]);
+ 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];
+
+ in[0] = 0; in[1] = 0; in[2] = 0; in[3] = 0;
+ in[4] = 0; in[5] = 0; in[6] = 0; in[7] = 0;
+ }
+ return (w+4);
+ }
+
void sigcatch13_set(t_sigcatch13 *x, t_symbol *s)
{
***************
*** 45,49 ****
{
if (x->x_n == sp[0]->s_n)
! dsp_add(sigcatch13_perform, 3, x->x_vec, sp[0]->s_vec, sp[0]->s_n);
else error("sigcatch13 %s: unexpected vector size", x->x_sym->s_name);
}
--- 61,70 ----
{
if (x->x_n == sp[0]->s_n)
! {
! if(sp[0]->s_n&7)
! dsp_add(sigcatch13_perform, 3, x->x_vec, sp[0]->s_vec, sp[0]->s_n);
! else
! dsp_add(sigcatch13_perf8, 3, x->x_vec, sp[0]->s_vec, sp[0]->s_n);
! }
else error("sigcatch13 %s: unexpected vector size", x->x_sym->s_name);
}
More information about the Pd-cvs
mailing list