Revision: 10531 http://pure-data.svn.sourceforge.net/pure-data/?rev=10531&view=rev Author: zmoelnig Date: 2009-01-13 17:03:08 +0000 (Tue, 13 Jan 2009)
Log Message: ----------- really made array access 64bit able
Modified Paths: -------------- trunk/externals/iem/iem_spec2/src/spec2_tab_conv~.c trunk/externals/iem/iem_spec2/src/spec2_tabreceive_enable~.c trunk/externals/iem/iem_spec2/src/spec2_tabreceive~.c
Modified: trunk/externals/iem/iem_spec2/src/spec2_tab_conv~.c =================================================================== --- trunk/externals/iem/iem_spec2/src/spec2_tab_conv~.c 2009-01-13 16:50:33 UTC (rev 10530) +++ trunk/externals/iem/iem_spec2/src/spec2_tab_conv~.c 2009-01-13 17:03:08 UTC (rev 10531) @@ -39,7 +39,8 @@ t_float *out = (t_float *)(w[2]); t_spec2_tab_conv_tilde *x = (t_spec2_tab_conv_tilde *)(w[3]); t_float sum=0.0f; - t_float *vec1, *vec2, *vec3, *win; + t_float *vec1, *vec2, *vec3; + iemarray_t*win; int i, m, n = (int)(w[4])+1; int j, ws=x->x_winsize;
@@ -61,7 +62,7 @@ { sum = 0.0f; for(j=0; j<ws; j++) - sum += win[j] * vec2[j]; + sum += iemarray_getfloat(win, j) * vec2[j]; out[i] = sum; vec2++; } @@ -125,7 +126,7 @@ argv++; x->x_winsize = (int)(atom_getint(argv)); x->x_spec = (t_float *)0; - x->x_beg_array = (t_float *)0; + x->x_beg_array = (iemarray_t *)0; x->x_blocksize = 0; x->x_has_changed = 1; outlet_new(&x->x_obj, &s_signal);
Modified: trunk/externals/iem/iem_spec2/src/spec2_tabreceive_enable~.c =================================================================== --- trunk/externals/iem/iem_spec2/src/spec2_tabreceive_enable~.c 2009-01-13 16:50:33 UTC (rev 10530) +++ trunk/externals/iem/iem_spec2/src/spec2_tabreceive_enable~.c 2009-01-13 17:03:08 UTC (rev 10531) @@ -38,11 +38,13 @@ t_spec2_tabreceive_enable_tilde *x = (t_spec2_tabreceive_enable_tilde *)(w[1]); t_float *out = (t_float *)(w[2]); int n = w[3]+1; - t_float *vec = x->x_vec; + iemarray_t *vec = x->x_vec;
if(vec && x->x_enable) - while(n--) - *out++ = *vec++; + while(n--) { + *out++ = iemarray_getfloat(vec, 0); + vec++; + } else while(n--) *out++ = 0.0f; @@ -54,34 +56,34 @@ t_spec2_tabreceive_enable_tilde *x = (t_spec2_tabreceive_enable_tilde *)(w[1]); t_float *out = (t_float *)(w[2]); int n = w[3]; - t_float *vec = x->x_vec; + iemarray_t *vec = x->x_vec;
if(vec && x->x_enable) { while(n) { - out[0] = vec[0]; - out[1] = vec[1]; - out[2] = vec[2]; - out[3] = vec[3]; - out[4] = vec[4]; - out[5] = vec[5]; - out[6] = vec[6]; - out[7] = vec[7]; - out[8] = vec[8]; - out[9] = vec[9]; - out[10] = vec[10]; - out[11] = vec[11]; - out[12] = vec[12]; - out[13] = vec[13]; - out[14] = vec[14]; - out[15] = vec[15]; + out[0] = iemarray_getfloat(vec, 0); + out[1] = iemarray_getfloat(vec, 1); + out[2] = iemarray_getfloat(vec, 2); + out[3] = iemarray_getfloat(vec, 3); + out[4] = iemarray_getfloat(vec, 4); + out[5] = iemarray_getfloat(vec, 5); + out[6] = iemarray_getfloat(vec, 6); + out[7] = iemarray_getfloat(vec, 7); + out[8] = iemarray_getfloat(vec, 8); + out[9] = iemarray_getfloat(vec, 9); + out[10] = iemarray_getfloat(vec, 10); + out[11] = iemarray_getfloat(vec, 11); + out[12] = iemarray_getfloat(vec, 12); + out[13] = iemarray_getfloat(vec, 13); + out[14] = iemarray_getfloat(vec, 14); + out[15] = iemarray_getfloat(vec, 15);
vec += 16; out += 16; n -= 16; } - out[0] = vec[0]; + out[0] = iemarray_getfloat(vec, 0); } else {
Modified: trunk/externals/iem/iem_spec2/src/spec2_tabreceive~.c =================================================================== --- trunk/externals/iem/iem_spec2/src/spec2_tabreceive~.c 2009-01-13 16:50:33 UTC (rev 10530) +++ trunk/externals/iem/iem_spec2/src/spec2_tabreceive~.c 2009-01-13 17:03:08 UTC (rev 10531) @@ -28,14 +28,20 @@ t_float *out = (t_float *)(w[2]); int n = w[3]+1; iemarray_t *vec = x->x_vec; - if(vec) + while(n--) { +#ifdef __x86_64__ + t_word wp=*vec++; + *out++=wp.w_float; +#else + *out++ = *vec++; +#endif + } + else while(n--) - *out++ = *vec++; - else - while(n--) - *out++ = 0.0f; - return(w+4); + *out++ = 0.0f; + return(w+4); + }
static t_int *spec2_tabreceive_tilde_perf16(t_int *w) @@ -49,28 +55,28 @@ { while(n) { - out[0] = vec[0]; - out[1] = vec[1]; - out[2] = vec[2]; - out[3] = vec[3]; - out[4] = vec[4]; - out[5] = vec[5]; - out[6] = vec[6]; - out[7] = vec[7]; - out[8] = vec[8]; - out[9] = vec[9]; - out[10] = vec[10]; - out[11] = vec[11]; - out[12] = vec[12]; - out[13] = vec[13]; - out[14] = vec[14]; - out[15] = vec[15]; - + out[0] = iemarray_getfloat(vec, 0); + out[1] = iemarray_getfloat(vec, 1); + out[2] = iemarray_getfloat(vec, 2); + out[3] = iemarray_getfloat(vec, 3); + out[4] = iemarray_getfloat(vec, 4); + out[5] = iemarray_getfloat(vec, 5); + out[6] = iemarray_getfloat(vec, 6); + out[7] = iemarray_getfloat(vec, 7); + out[8] = iemarray_getfloat(vec, 8); + out[9] = iemarray_getfloat(vec, 9); + out[10] = iemarray_getfloat(vec, 10); + out[11] = iemarray_getfloat(vec, 11); + out[12] = iemarray_getfloat(vec, 12); + out[13] = iemarray_getfloat(vec, 13); + out[14] = iemarray_getfloat(vec, 14); + out[15] = iemarray_getfloat(vec, 15); + vec += 16; out += 16; n -= 16; } - out[0] = vec[0]; + out[0] = iemarray_getfkiat(vec, 0); } else {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.