Definition at line 26 of file MatNorm2DistSSE.h. References Impala::IntAlignDown(), MatE(), MatNrCol(), and MatNrRow(). Referenced by MatNorm2DistSSE(). 00027 { 00028 int n = MatNrRow(m); 00029 Mat* res = MatCreate<Mat>(n, 1); 00030 for (int i=0 ; i<n ; i++) 00031 { 00032 __m128d tmp = _mm_setzero_pd(); 00033 __m128d* base = (__m128d*) MatE(m, i, 0); 00034 for (int j=0 ; j<IntAlignDown(MatNrCol(m), 2) / 2 ; j++) 00035 tmp = _mm_add_pd(tmp, _mm_mul_pd(base[j], base[j])); 00036 00037 __m128d shuffle = _mm_shuffle_pd(tmp, tmp, _MM_SHUFFLE2(0, 1)); 00038 Real64 result = _mm_cvtsd_f64(_mm_add_pd(tmp, shuffle)); 00039 for (int j=IntAlignDown(MatNrCol(m), 2); j<MatNrCol(m) ; j++) 00040 result += result + *MatE(m, i, j); 00041 *MatE(res, i, 0) = result; 00042 } 00043 return res; 00044 }
Here is the call graph for this function:
|