Update of /cvsroot/pure-data/externals/zexy/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11638
Modified Files: sgn~.c Log Message: only do 8x loop unrolling since it seems to be more efficient (well, rather a joke: 4096 [abs~] need about 24% with 16x unrolling and about 23-24% with 8x unrolling)
Index: sgn~.c =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/sgn~.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sgn~.c 21 Dec 2005 17:05:47 -0000 1.1 --- sgn~.c 21 Dec 2005 17:15:41 -0000 1.2 *************** *** 80,84 ****
__m128 val; ! int n = (int)(w[3])>>4; // yea, we do 16x loop-unrolling
const __m128 sgnmask= _mm_loadu_ps((float*)l_bitmask); --- 80,84 ----
__m128 val; ! int n = (int)(w[3])>>3; // we do 8x loop-unrolling
const __m128 sgnmask= _mm_loadu_ps((float*)l_bitmask); *************** *** 102,119 **** out[1]= _mm_or_ps (xmm1, xmm0);
! val=in[2]; ! xmm0 = _mm_cmpneq_ps(val , zero); ! xmm1 = _mm_and_ps (val, sgnmask); ! xmm0 = _mm_and_ps (xmm0, one); ! out[2]= _mm_or_ps (xmm1, xmm0); ! ! val=in[3]; ! xmm0 = _mm_cmpneq_ps(val , zero); ! xmm1 = _mm_and_ps (val, sgnmask); ! xmm0 = _mm_and_ps (xmm0, one); ! out[3]= _mm_or_ps (xmm1, xmm0); ! ! in +=4; ! out+=4;
} --- 102,107 ---- out[1]= _mm_or_ps (xmm1, xmm0);
! in +=2; ! out+=2;
}