Update of /cvsroot/pure-data/externals/zexy/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32636
Modified Files: 0x260x260x7e.c 0x3c0x7e.c 0x3d0x3d0x7e.c 0x3e0x7e.c 0x7c0x7c0x7e.c drip.c lpt.c pack~.c relay.c sfplay.c sgn~.c zexy.c Log Message: use t_float/t_sample instead of "float" and where appropriate
Index: lpt.c =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/lpt.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** lpt.c 30 Oct 2007 09:26:46 -0000 1.15 --- lpt.c 3 Jan 2008 11:15:25 -0000 1.16 *************** *** 148,156 **** unsigned char b=0; ioctl (x->device, PPRCONTROL, &b); ! outlet_float(x->x_obj.ob_outlet, (float)b); } else # endif if (x->port) { ! outlet_float(x->x_obj.ob_outlet, (float)sys_inb(x->port+1)); } #endif /* Z_WANT_LPT */ --- 148,156 ---- unsigned char b=0; ioctl (x->device, PPRCONTROL, &b); ! outlet_float(x->x_obj.ob_outlet, (t_float)b); } else # endif if (x->port) { ! outlet_float(x->x_obj.ob_outlet, (t_float)sys_inb(x->port+1)); } #endif /* Z_WANT_LPT */
Index: 0x3c0x7e.c =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/0x3c0x7e.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** 0x3c0x7e.c 20 Jun 2007 06:55:17 -0000 1.8 --- 0x3c0x7e.c 3 Jan 2008 11:15:25 -0000 1.9 *************** *** 32,36 **** { t_object x_obj; ! float x_f; } t_lt_tilde;
--- 32,36 ---- { t_object x_obj; ! t_float x_f; } t_lt_tilde;
*************** *** 38,42 **** { t_object x_obj; ! float x_f; t_float x_g; /* inlet value */ } t_scalarlt_tilde; --- 38,42 ---- { t_object x_obj; ! t_float x_f; t_float x_g; /* inlet value */ } t_scalarlt_tilde; *************** *** 67,73 **** static t_int *lt_tilde_perform(t_int *w) { ! t_float *in1 = (t_float *)(w[1]); ! t_float *in2 = (t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); while (n--) *out++ = *in1++ < *in2++; --- 67,73 ---- static t_int *lt_tilde_perform(t_int *w) { ! t_sample *in1 = (t_sample *)(w[1]); ! t_sample *in2 = (t_sample *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); while (n--) *out++ = *in1++ < *in2++; *************** *** 77,91 **** static t_int *lt_tilde_perf8(t_int *w) { ! t_float *in1 = (t_float *)(w[1]); ! t_float *in2 = (t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in1 += 8, in2 += 8, out += 8) { ! float f0 = in1[0], f1 = in1[1], f2 = in1[2], f3 = in1[3]; ! float f4 = in1[4], f5 = in1[5], f6 = in1[6], f7 = in1[7];
! float g0 = in2[0], g1 = in2[1], g2 = in2[2], g3 = in2[3]; ! float g4 = in2[4], g5 = in2[5], g6 = in2[6], g7 = in2[7];
out[0] = f0 < g0; out[1] = f1 < g1; out[2] = f2 < g2; out[3] = f3 < g3; --- 77,91 ---- static t_int *lt_tilde_perf8(t_int *w) { ! t_sample *in1 = (t_sample *)(w[1]); ! t_sample *in2 = (t_sample *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in1 += 8, in2 += 8, out += 8) { ! t_sample f0 = in1[0], f1 = in1[1], f2 = in1[2], f3 = in1[3]; ! t_sample f4 = in1[4], f5 = in1[5], f6 = in1[6], f7 = in1[7];
! t_sample g0 = in2[0], g1 = in2[1], g2 = in2[2], g3 = in2[3]; ! t_sample g4 = in2[4], g5 = in2[5], g6 = in2[6], g7 = in2[7];
out[0] = f0 < g0; out[1] = f1 < g1; out[2] = f2 < g2; out[3] = f3 < g3; *************** *** 97,103 **** static t_int *scalarlt_tilde_perform(t_int *w) { ! t_float *in = (t_float *)(w[1]); ! t_float f = *(t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); while (n--) *out++ = *in++ < f; --- 97,103 ---- static t_int *scalarlt_tilde_perform(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); ! t_sample f = *(t_float *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); while (n--) *out++ = *in++ < f; *************** *** 107,118 **** static t_int *scalarlt_tilde_perf8(t_int *w) { ! t_float *in = (t_float *)(w[1]); ! t_float g = *(t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in += 8, out += 8) { ! float f0 = in[0], f1 = in[1], f2 = in[2], f3 = in[3]; ! float f4 = in[4], f5 = in[5], f6 = in[6], f7 = in[7];
out[0] = f0 < g; out[1] = f1 < g; out[2] = f2 < g; out[3] = f3 < g; --- 107,118 ---- static t_int *scalarlt_tilde_perf8(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); ! t_sample g = *(t_float *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in += 8, out += 8) { ! t_sample f0 = in[0], f1 = in[1], f2 = in[2], f3 = in[3]; ! t_sample f4 = in[4], f5 = in[5], f6 = in[6], f7 = in[7];
out[0] = f0 < g; out[1] = f1 < g; out[2] = f2 < g; out[3] = f3 < g; *************** *** 155,159 **** __m128 *in = (__m128 *)(w[1]); __m128 *out = (__m128 *)(w[3]); ! t_float f = *(t_float *)(w[2]); __m128 scalar = _mm_set1_ps(f); int n = (int)(w[4])>>4; --- 155,159 ---- __m128 *in = (__m128 *)(w[1]); __m128 *out = (__m128 *)(w[3]); ! float f = *(t_float *)(w[2]); __m128 scalar = _mm_set1_ps(f); int n = (int)(w[4])>>4; *************** *** 194,198 **** Z_SIMD_CHKALIGN(in1)&& Z_SIMD_CHKALIGN(in2)&& ! Z_SIMD_CHKALIGN(out) ) { --- 194,199 ---- Z_SIMD_CHKALIGN(in1)&& Z_SIMD_CHKALIGN(in2)&& ! Z_SIMD_CHKALIGN(out)&& ! ZEXY_TYPE_EQUAL(t_sample, float) ) { *************** *** 216,220 **** Z_SIMD_CHKBLOCKSIZE(n)&& Z_SIMD_CHKALIGN(in)&& ! Z_SIMD_CHKALIGN(out) ) { --- 217,222 ---- Z_SIMD_CHKBLOCKSIZE(n)&& Z_SIMD_CHKALIGN(in)&& ! Z_SIMD_CHKALIGN(out)&& ! ZEXY_TYPE_EQUAL(t_sample, float) ) {
Index: 0x3e0x7e.c =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/0x3e0x7e.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** 0x3e0x7e.c 14 Mar 2007 09:08:55 -0000 1.6 --- 0x3e0x7e.c 3 Jan 2008 11:15:25 -0000 1.7 *************** *** 31,35 **** { t_object x_obj; ! float x_f; } t_gt_tilde;
--- 31,35 ---- { t_object x_obj; ! t_float x_f; } t_gt_tilde;
*************** *** 37,41 **** { t_object x_obj; ! float x_f; t_float x_g; /* inlet value */ } t_scalargt_tilde; --- 37,41 ---- { t_object x_obj; ! t_float x_f; t_float x_g; /* inlet value */ } t_scalargt_tilde; *************** *** 66,72 **** static t_int *gt_tilde_perform(t_int *w) { ! t_float *in1 = (t_float *)(w[1]); ! t_float *in2 = (t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); while (n--) *out++ = *in1++ > *in2++; --- 66,72 ---- static t_int *gt_tilde_perform(t_int *w) { ! t_sample *in1 = (t_sample *)(w[1]); ! t_sample *in2 = (t_sample *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); while (n--) *out++ = *in1++ > *in2++; *************** *** 76,90 **** static t_int *gt_tilde_perf8(t_int *w) { ! t_float *in1 = (t_float *)(w[1]); ! t_float *in2 = (t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in1 += 8, in2 += 8, out += 8) { ! float f0 = in1[0], f1 = in1[1], f2 = in1[2], f3 = in1[3]; ! float f4 = in1[4], f5 = in1[5], f6 = in1[6], f7 = in1[7];
! float g0 = in2[0], g1 = in2[1], g2 = in2[2], g3 = in2[3]; ! float g4 = in2[4], g5 = in2[5], g6 = in2[6], g7 = in2[7];
out[0] = f0 > g0; out[1] = f1 > g1; out[2] = f2 > g2; out[3] = f3 > g3; --- 76,90 ---- static t_int *gt_tilde_perf8(t_int *w) { ! t_sample *in1 = (t_sample *)(w[1]); ! t_sample *in2 = (t_sample *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in1 += 8, in2 += 8, out += 8) { ! t_sample f0 = in1[0], f1 = in1[1], f2 = in1[2], f3 = in1[3]; ! t_sample f4 = in1[4], f5 = in1[5], f6 = in1[6], f7 = in1[7];
! t_sample g0 = in2[0], g1 = in2[1], g2 = in2[2], g3 = in2[3]; ! t_sample g4 = in2[4], g5 = in2[5], g6 = in2[6], g7 = in2[7];
out[0] = f0 > g0; out[1] = f1 > g1; out[2] = f2 > g2; out[3] = f3 > g3; *************** *** 96,102 **** static t_int *scalargt_tilde_perform(t_int *w) { ! t_float *in = (t_float *)(w[1]); ! t_float f = *(t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); while (n--) *out++ = *in++ > f; --- 96,102 ---- static t_int *scalargt_tilde_perform(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); ! t_sample f = *(t_float *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); while (n--) *out++ = *in++ > f; *************** *** 106,117 **** static t_int *scalargt_tilde_perf8(t_int *w) { ! t_float *in = (t_float *)(w[1]); ! t_float g = *(t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in += 8, out += 8) { ! float f0 = in[0], f1 = in[1], f2 = in[2], f3 = in[3]; ! float f4 = in[4], f5 = in[5], f6 = in[6], f7 = in[7];
out[0] = f0 > g; out[1] = f1 > g; out[2] = f2 > g; out[3] = f3 > g; --- 106,117 ---- static t_int *scalargt_tilde_perf8(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); ! t_sample g = *(t_float *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in += 8, out += 8) { ! t_sample f0 = in[0], f1 = in[1], f2 = in[2], f3 = in[3]; ! t_sample f4 = in[4], f5 = in[5], f6 = in[6], f7 = in[7];
out[0] = f0 > g; out[1] = f1 > g; out[2] = f2 > g; out[3] = f3 > g; *************** *** 154,158 **** __m128 *in = (__m128 *)(w[1]); __m128 *out = (__m128 *)(w[3]); ! t_float f = *(t_float *)(w[2]); __m128 scalar = _mm_set1_ps(f); int n = (int)(w[4])>>4; --- 154,158 ---- __m128 *in = (__m128 *)(w[1]); __m128 *out = (__m128 *)(w[3]); ! float f = *(t_float *)(w[2]); __m128 scalar = _mm_set1_ps(f); int n = (int)(w[4])>>4; *************** *** 196,200 **** Z_SIMD_CHKALIGN(in1)&& Z_SIMD_CHKALIGN(in2)&& ! Z_SIMD_CHKALIGN(out) ) { --- 196,201 ---- Z_SIMD_CHKALIGN(in1)&& Z_SIMD_CHKALIGN(in2)&& ! Z_SIMD_CHKALIGN(out)&& ! ZEXY_TYPE_EQUAL(t_sample, float) ) { *************** *** 218,222 **** Z_SIMD_CHKBLOCKSIZE(n)&& Z_SIMD_CHKALIGN(in)&& ! Z_SIMD_CHKALIGN(out) ) { --- 219,224 ---- Z_SIMD_CHKBLOCKSIZE(n)&& Z_SIMD_CHKALIGN(in)&& ! Z_SIMD_CHKALIGN(out)&& ! ZEXY_TYPE_EQUAL(t_sample, float) ) {
Index: 0x7c0x7c0x7e.c =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/0x7c0x7c0x7e.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** 0x7c0x7c0x7e.c 14 Mar 2007 09:08:55 -0000 1.7 --- 0x7c0x7c0x7e.c 3 Jan 2008 11:15:25 -0000 1.8 *************** *** 29,33 **** { t_object x_obj; ! float x_f; } t_oror_tilde;
--- 29,33 ---- { t_object x_obj; ! t_float x_f; } t_oror_tilde;
*************** *** 35,39 **** { t_object x_obj; ! float x_f; t_float x_g; /* inlet value */ } t_scalaroror_tilde; --- 35,39 ---- { t_object x_obj; ! t_float x_f; t_float x_g; /* inlet value */ } t_scalaroror_tilde; *************** *** 210,214 **** Z_SIMD_CHKALIGN(in1)&& Z_SIMD_CHKALIGN(in2)&& ! Z_SIMD_CHKALIGN(out) ) { --- 210,215 ---- Z_SIMD_CHKALIGN(in1)&& Z_SIMD_CHKALIGN(in2)&& ! Z_SIMD_CHKALIGN(out)&& ! ZEXY_TYPE_EQUAL(t_sample, float) ) { *************** *** 232,236 **** Z_SIMD_CHKBLOCKSIZE(n)&& Z_SIMD_CHKALIGN(in)&& ! Z_SIMD_CHKALIGN(out) ) { --- 233,238 ---- Z_SIMD_CHKBLOCKSIZE(n)&& Z_SIMD_CHKALIGN(in)&& ! Z_SIMD_CHKALIGN(out)&& ! ZEXY_TYPE_EQUAL(t_sample, float) ) {
Index: pack~.c =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/pack~.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** pack~.c 31 Oct 2007 10:46:46 -0000 1.6 --- pack~.c 3 Jan 2008 11:15:25 -0000 1.7 *************** *** 44,49 **** i++; } ! #ifndef __WIN32__ ! #warning defer list-output to next block with a clock! #endif outlet_list(x->x_obj.ob_outlet, &s_list, x->vector_length, x->buffer); --- 44,49 ---- i++; } ! #ifdef __GNUC__ ! # warning defer list-output to next block with a clock! #endif outlet_list(x->x_obj.ob_outlet, &s_list, x->vector_length, x->buffer);
Index: zexy.c =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/zexy.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** zexy.c 31 Oct 2007 10:46:46 -0000 1.20 --- zexy.c 3 Jan 2008 11:15:25 -0000 1.21 *************** *** 167,169 **** post("zverbose(%d): %s", level, buf); } ! #endif \ No newline at end of file --- 167,169 ---- post("zverbose(%d): %s", level, buf); } ! #endif
Index: relay.c =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/relay.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** relay.c 5 Apr 2006 11:27:26 -0000 1.4 --- relay.c 3 Jan 2008 11:15:25 -0000 1.5 *************** *** 75,79 **** if (x->x_type == A_FLOAT) { ! float f; if (!argc){ outlet_bang(x->x_rejectout); --- 75,79 ---- if (x->x_type == A_FLOAT) { ! t_float f; if (!argc){ outlet_bang(x->x_rejectout);
Index: sfplay.c =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/sfplay.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** sfplay.c 14 Mar 2007 09:08:56 -0000 1.9 --- sfplay.c 3 Jan 2008 11:15:25 -0000 1.10 *************** *** 252,256 ****
/* new offset postion ? (fom inlet offset) */ ! if( ((float) of) != x->x_offset) { x->skip=1; --- 252,256 ----
/* new offset postion ? (fom inlet offset) */ ! if( ((t_float) of) != x->x_offset) { x->skip=1;
Index: drip.c =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/drip.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** drip.c 14 Mar 2007 09:08:56 -0000 1.5 --- drip.c 3 Jan 2008 11:15:25 -0000 1.6 *************** *** 38,42 ****
t_clock *x_clock; ! float deltime;
int flush; --- 38,42 ----
t_clock *x_clock; ! t_float deltime;
int flush;
Index: 0x260x260x7e.c =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/0x260x260x7e.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** 0x260x260x7e.c 14 Mar 2007 09:08:55 -0000 1.6 --- 0x260x260x7e.c 3 Jan 2008 11:15:25 -0000 1.7 *************** *** 31,35 **** { t_object x_obj; ! float x_f; } t_andand_tilde;
--- 31,35 ---- { t_object x_obj; ! t_float x_f; } t_andand_tilde;
*************** *** 37,41 **** { t_object x_obj; ! float x_f; t_float x_g; /* inlet value */ } t_scalarandand_tilde; --- 37,41 ---- { t_object x_obj; ! t_float x_f; t_float x_g; /* inlet value */ } t_scalarandand_tilde; *************** *** 66,72 **** static t_int *andand_tilde_perform(t_int *w) { ! t_float *in1 = (t_float *)(w[1]); ! t_float *in2 = (t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); while (n--){ --- 66,72 ---- static t_int *andand_tilde_perform(t_int *w) { ! t_sample *in1 = (t_sample *)(w[1]); ! t_sample *in2 = (t_sample *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); while (n--){ *************** *** 80,86 **** static t_int *andand_tilde_perf8(t_int *w) { ! t_float *in1 = (t_float *)(w[1]); ! t_float *in2 = (t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in1 += 8, in2 += 8, out += 8) --- 80,86 ---- static t_int *andand_tilde_perf8(t_int *w) { ! t_sample *in1 = (t_sample *)(w[1]); ! t_sample *in2 = (t_sample *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in1 += 8, in2 += 8, out += 8) *************** *** 100,108 **** static t_int *scalarandand_tilde_perform(t_int *w) { ! t_float *in = (t_float *)(w[1]); ! t_float f = *(t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); ! while (n--) *out++ = (int)*in++ && (int)f; return (w+5); } --- 100,108 ---- static t_int *scalarandand_tilde_perform(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); ! int f = *(t_float *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); ! while (n--) *out++ = (int)*in++ && f; return (w+5); } *************** *** 110,116 **** static t_int *scalarandand_tilde_perf8(t_int *w) { ! t_float *in = (t_float *)(w[1]); int g = *(t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in += 8, out += 8) --- 110,116 ---- static t_int *scalarandand_tilde_perf8(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); int g = *(t_float *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in += 8, out += 8) *************** *** 179,183 **** __m128 *in = (__m128 *)(w[1]); __m128 *out = (__m128 *)(w[3]); ! t_float f = *(t_float *)(w[2]); __m128 scalar = _mm_set1_ps(f); int n = (int)(w[4])>>4; --- 179,183 ---- __m128 *in = (__m128 *)(w[1]); __m128 *out = (__m128 *)(w[3]); ! float f = *(t_float *)(w[2]); __m128 scalar = _mm_set1_ps(f); int n = (int)(w[4])>>4; *************** *** 232,236 **** Z_SIMD_CHKALIGN(in1)&& Z_SIMD_CHKALIGN(in2)&& ! Z_SIMD_CHKALIGN(out) ) { --- 232,237 ---- Z_SIMD_CHKALIGN(in1)&& Z_SIMD_CHKALIGN(in2)&& ! Z_SIMD_CHKALIGN(out)&& ! ZEXY_TYPE_EQUAL(t_sample, float) ) { *************** *** 256,260 **** Z_SIMD_CHKBLOCKSIZE(n)&& Z_SIMD_CHKALIGN(in)&& ! Z_SIMD_CHKALIGN(out) ) { --- 257,262 ---- Z_SIMD_CHKBLOCKSIZE(n)&& Z_SIMD_CHKALIGN(in)&& ! Z_SIMD_CHKALIGN(out)&& ! ZEXY_TYPE_EQUAL(t_sample, float) ) {
Index: sgn~.c =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/sgn~.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** sgn~.c 30 Oct 2007 09:21:52 -0000 1.8 --- sgn~.c 3 Jan 2008 11:15:25 -0000 1.9 *************** *** 40,44 **** t_sample x; while (n--) { ! if ((x=*in++)>0.) *out++=1.; else if (x<0.) *out++=-1.; else *out++=0.; --- 40,45 ---- t_sample x; while (n--) { ! x=*in++; ! if (x>0.) *out++=1.; else if (x<0.) *out++=-1.; else *out++=0.;
Index: 0x3d0x3d0x7e.c =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/0x3d0x3d0x7e.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** 0x3d0x3d0x7e.c 14 Mar 2007 09:08:55 -0000 1.7 --- 0x3d0x3d0x7e.c 3 Jan 2008 11:15:25 -0000 1.8 *************** *** 29,33 **** { t_object x_obj; ! float x_f; } t_eq_tilde;
--- 29,33 ---- { t_object x_obj; ! t_float x_f; } t_eq_tilde;
*************** *** 35,39 **** { t_object x_obj; ! float x_f; t_float x_g; /* inlet value */ } t_scalareq_tilde; --- 35,39 ---- { t_object x_obj; ! t_float x_f; t_float x_g; /* inlet value */ } t_scalareq_tilde; *************** *** 64,70 **** static t_int *eq_tilde_perform(t_int *w) { ! t_float *in1 = (t_float *)(w[1]); ! t_float *in2 = (t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); while (n--) *out++ = (*in1++ == *in2++); --- 64,70 ---- static t_int *eq_tilde_perform(t_int *w) { ! t_sample *in1 = (t_sample *)(w[1]); ! t_sample *in2 = (t_sample *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); while (n--) *out++ = (*in1++ == *in2++); *************** *** 74,88 **** static t_int *eq_tilde_perf8(t_int *w) { ! t_float *in1 = (t_float *)(w[1]); ! t_float *in2 = (t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in1 += 8, in2 += 8, out += 8) { ! float f0 = in1[0], f1 = in1[1], f2 = in1[2], f3 = in1[3]; ! float f4 = in1[4], f5 = in1[5], f6 = in1[6], f7 = in1[7];
! float g0 = in2[0], g1 = in2[1], g2 = in2[2], g3 = in2[3]; ! float g4 = in2[4], g5 = in2[5], g6 = in2[6], g7 = in2[7];
out[0] = f0 == g0; out[1] = f1 == g1; out[2] = f2 == g2; out[3] = f3 == g3; --- 74,88 ---- static t_int *eq_tilde_perf8(t_int *w) { ! t_sample *in1 = (t_sample *)(w[1]); ! t_sample *in2 = (t_sample *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in1 += 8, in2 += 8, out += 8) { ! t_sample f0 = in1[0], f1 = in1[1], f2 = in1[2], f3 = in1[3]; ! t_sample f4 = in1[4], f5 = in1[5], f6 = in1[6], f7 = in1[7];
! t_sample g0 = in2[0], g1 = in2[1], g2 = in2[2], g3 = in2[3]; ! t_sample g4 = in2[4], g5 = in2[5], g6 = in2[6], g7 = in2[7];
out[0] = f0 == g0; out[1] = f1 == g1; out[2] = f2 == g2; out[3] = f3 == g3; *************** *** 94,100 **** static t_int *scalareq_tilde_perform(t_int *w) { ! t_float *in = (t_float *)(w[1]); ! t_float f = *(t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); while (n--) *out++ = (*in++ == f); --- 94,100 ---- static t_int *scalareq_tilde_perform(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); ! t_sample f = *(t_float *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); while (n--) *out++ = (*in++ == f); *************** *** 104,115 **** static t_int *scalareq_tilde_perf8(t_int *w) { ! t_float *in = (t_float *)(w[1]); ! t_float g = *(t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in += 8, out += 8) { ! float f0 = in[0], f1 = in[1], f2 = in[2], f3 = in[3]; ! float f4 = in[4], f5 = in[5], f6 = in[6], f7 = in[7];
out[0] = (f0 == g); out[1] = (f1 == g); out[2] = (f2 == g); out[3] = (f3 == g); --- 104,115 ---- static t_int *scalareq_tilde_perf8(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); ! t_sample g = *(t_float *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in += 8, out += 8) { ! t_sample f0 = in[0], f1 = in[1], f2 = in[2], f3 = in[3]; ! t_sample f4 = in[4], f5 = in[5], f6 = in[6], f7 = in[7];
out[0] = (f0 == g); out[1] = (f1 == g); out[2] = (f2 == g); out[3] = (f3 == g); *************** *** 153,157 **** __m128 *in = (__m128 *)(w[1]); __m128 *out = (__m128 *)(w[3]); ! t_float f = *(t_float *)(w[2]); __m128 scalar = _mm_set1_ps(f); int n = (int)(w[4])>>4; --- 153,157 ---- __m128 *in = (__m128 *)(w[1]); __m128 *out = (__m128 *)(w[3]); ! float f = *(float *)(w[2]); __m128 scalar = _mm_set1_ps(f); int n = (int)(w[4])>>4; *************** *** 194,198 **** Z_SIMD_CHKALIGN(in1)&& Z_SIMD_CHKALIGN(in2)&& ! Z_SIMD_CHKALIGN(out) ) { --- 194,199 ---- Z_SIMD_CHKALIGN(in1)&& Z_SIMD_CHKALIGN(in2)&& ! Z_SIMD_CHKALIGN(out)&& ! ZEXY_TYPE_EQUAL(t_sample, float) ) { *************** *** 216,220 **** Z_SIMD_CHKBLOCKSIZE(n)&& Z_SIMD_CHKALIGN(in)&& ! Z_SIMD_CHKALIGN(out) ) { --- 217,222 ---- Z_SIMD_CHKBLOCKSIZE(n)&& Z_SIMD_CHKALIGN(in)&& ! Z_SIMD_CHKALIGN(out) && ! ZEXY_TYPE_EQUAL(t_sample, float) ) {