Lines Matching refs:SUM
123 ST* SUM;
127 if( width != (int)sum.size() )
129 sum.resize(width);
133 SUM = &sum[0];
136 memset((void*)SUM, 0, width*sizeof(ST));
143 ST s0 = SUM[i] + Sp[i], s1 = SUM[i+1] + Sp[i+1];
144 SUM[i] = s0; SUM[i+1] = s1;
148 SUM[i] += Sp[i];
166 ST s0 = SUM[i] + Sp[i], s1 = SUM[i+1] + Sp[i+1];
170 SUM[i] = s0; SUM[i+1] = s1;
175 ST s0 = SUM[i] + Sp[i];
177 SUM[i] = s0 - Sm[i];
184 ST s0 = SUM[i] + Sp[i], s1 = SUM[i+1] + Sp[i+1];
188 SUM[i] = s0; SUM[i+1] = s1;
193 ST s0 = SUM[i] + Sp[i];
195 SUM[i] = s0 - Sm[i];
204 std::vector<ST> sum;
226 int* SUM;
234 if( width != (int)sum.size() )
236 sum.resize(width);
240 SUM = &sum[0];
243 memset((void*)SUM, 0, width*sizeof(int));
253 __m128i _sum = _mm_loadu_si128((const __m128i*)(SUM+i));
255 _mm_storeu_si128((__m128i*)(SUM+i),_mm_add_epi32(_sum, _sp));
260 vst1q_s32(SUM + i, vaddq_s32(vld1q_s32(SUM + i), vld1q_s32(Sp + i)));
263 SUM[i] += Sp[i];
289 __m128i _s0 = _mm_add_epi32(_mm_loadu_si128((const __m128i*)(SUM+i)),
291 __m128i _s01 = _mm_add_epi32(_mm_loadu_si128((const __m128i*)(SUM+i+4)),
301 _mm_storeu_si128((__m128i*)(SUM+i), _mm_sub_epi32(_s0,_sm));
302 _mm_storeu_si128((__m128i*)(SUM+i+4),_mm_sub_epi32(_s01,_sm1));
309 int32x4_t v_s0 = vaddq_s32(vld1q_s32(SUM + i), vld1q_s32(Sp + i));
310 int32x4_t v_s01 = vaddq_s32(vld1q_s32(SUM + i + 4), vld1q_s32(Sp + i + 4));
318 vst1q_s32(SUM + i, vsubq_s32(v_s0, vld1q_s32(Sm + i)));
319 vst1q_s32(SUM + i + 4, vsubq_s32(v_s01, vld1q_s32(Sm + i + 4)));
324 int s0 = SUM[i] + Sp[i];
326 SUM[i] = s0 - Sm[i];
340 __m128i _s0 = _mm_add_epi32(_mm_loadu_si128((const __m128i*)(SUM+i)),
342 __m128i _s01 = _mm_add_epi32(_mm_loadu_si128((const __m128i*)(SUM+i+4)),
349 _mm_storeu_si128((__m128i*)(SUM+i), _mm_sub_epi32(_s0,_sm));
350 _mm_storeu_si128((__m128i*)(SUM+i+4),_mm_sub_epi32(_s01,_sm1));
356 int32x4_t v_s0 = vaddq_s32(vld1q_s32(SUM + i), vld1q_s32(Sp + i));
357 int32x4_t v_s01 = vaddq_s32(vld1q_s32(SUM + i + 4), vld1q_s32(Sp + i + 4));
362 vst1q_s32(SUM + i, vsubq_s32(v_s0, vld1q_s32(Sm + i)));
363 vst1q_s32(SUM + i + 4, vsubq_s32(v_s01, vld1q_s32(Sm + i + 4)));
369 int s0 = SUM[i] + Sp[i];
371 SUM[i] = s0 - Sm[i];
380 std::vector<int> sum;
401 int* SUM;
409 if( width != (int)sum.size() )
411 sum.resize(width);
414 SUM = &sum[0];
417 memset((void*)SUM, 0, width*sizeof(int));
427 __m128i _sum = _mm_loadu_si128((const __m128i*)(SUM+i));
429 _mm_storeu_si128((__m128i*)(SUM+i),_mm_add_epi32(_sum, _sp));
434 vst1q_s32(SUM + i, vaddq_s32(vld1q_s32(SUM + i), vld1q_s32(Sp + i)));
437 SUM[i] += Sp[i];
463 __m128i _s0 = _mm_add_epi32(_mm_loadu_si128((const __m128i*)(SUM+i)),
465 __m128i _s01 = _mm_add_epi32(_mm_loadu_si128((const __m128i*)(SUM+i+4)),
473 _mm_storeu_si128((__m128i*)(SUM+i),_mm_sub_epi32(_s0,_sm));
474 SUM+i+4), _mm_sub_epi32(_s01,_sm1));
481 int32x4_t v_s0 = vaddq_s32(vld1q_s32(SUM + i), vld1q_s32(Sp + i));
482 int32x4_t v_s01 = vaddq_s32(vld1q_s32(SUM + i + 4), vld1q_s32(Sp + i + 4));
488 vst1q_s32(SUM + i, vsubq_s32(v_s0, vld1q_s32(Sm + i)));
489 vst1q_s32(SUM + i + 4, vsubq_s32(v_s01, vld1q_s32(Sm + i + 4)));
494 int s0 = SUM[i] + Sp[i];
496 SUM[i] = s0 - Sm[i];
511 __m128i _s0 = _mm_add_epi32(_mm_loadu_si128((const __m128i*)(SUM+i)),
513 __m128i _s01 = _mm_add_epi32(_mm_loadu_si128((const __m128i*)(SUM+i+4)),
518 _mm_storeu_si128((__m128i*)(SUM+i), _mm_sub_epi32(_s0,_sm));
519 _mm_storeu_si128((__m128i*)(SUM+i+4),_mm_sub_epi32(_s01,_sm1));
525 int32x4_t v_s0 = vaddq_s32(vld1q_s32(SUM + i), vld1q_s32(Sp + i));
526 int32x4_t v_s01 = vaddq_s32(vld1q_s32(SUM + i + 4), vld1q_s32(Sp + i + 4));
530 vst1q_s32(SUM + i, vsubq_s32(v_s0, vld1q_s32(Sm + i)));
531 vst1q_s32(SUM + i + 4, vsubq_s32(v_s01, vld1q_s32(Sm + i + 4)));
537 int s0 = SUM[i] + Sp[i];
539 SUM[i] = s0 - Sm[i];
548 std::vector<int> sum;
570 int* SUM;
577 if( width != (int)sum.size() )
579 sum.resize(width);
582 SUM = &sum[0];
585 memset((void*)SUM, 0, width*sizeof(int));
595 __m128i _sum = _mm_loadu_si128((const __m128i*)(SUM+i));
597 _mm_storeu_si128((__m128i*)(SUM+i), _mm_add_epi32(_sum, _sp));
602 vst1q_s32(SUM + i, vaddq_s32(vld1q_s32(SUM + i), vld1q_s32(Sp + i)));
605 SUM[i] += Sp[i];
632 __m128i _s0 = _mm_add_epi32(_mm_loadu_si128((const __m128i*)(SUM+i)),
641 _mm_storeu_si128((__m128i*)(SUM+i), _mm_sub_epi32(_s0,_sm));
648 int32x4_t v_s0 = vaddq_s32(vld1q_s32(SUM + i), vld1q_s32(Sp + i));
649 int32x4_t v_s01 = vaddq_s32(vld1q_s32(SUM + i + 4), vld1q_s32(Sp + i + 4));
655 vst1q_s32(SUM + i, vsubq_s32(v_s0, vld1q_s32(Sm + i)));
656 vst1q_s32(SUM + i + 4, vsubq_s32(v_s01, vld1q_s32(Sm + i + 4)));
661 int s0 = SUM[i] + Sp[i];
663 SUM[i] = s0 - Sm[i];
678 __m128i _s0 = _mm_add_epi32(_mm_loadu_si128((const __m128i*)(SUM+i)),
685 _mm_storeu_si128((__m128i*)(SUM+i), _mm_sub_epi32(_s0,_sm));
691 int32x4_t v_s0 = vaddq_s32(vld1q_s32(SUM + i), vld1q_s32(Sp + i));
692 int32x4_t v_s01 = vaddq_s32(vld1q_s32(SUM + i + 4), vld1q_s32(Sp + i + 4));
696 vst1q_s32(SUM + i, vsubq_s32(v_s0, vld1q_s32(Sm + i)));
697 vst1q_s32(SUM + i + 4, vsubq_s32(v_s01, vld1q_s32(Sm + i + 4)));
703 int s0 = SUM[i] + Sp[i];
705 SUM[i] = s0 - Sm[i];
714 std::vector<int> sum;
735 int* SUM;
743 if( width != (int)sum.size() )
745 sum.resize(width);
748 SUM = &sum[0];
751 memset((void*)SUM, 0, width*sizeof(int));
761 __m128i _sum = _mm_loadu_si128((const __m128i*)(SUM+i));
763 _mm_storeu_si128((__m128i*)(SUM+i),_mm_add_epi32(_sum, _sp));
768 vst1q_s32(SUM + i, vaddq_s32(vld1q_s32(SUM + i), vld1q_s32(Sp + i)));
771 SUM[i] += Sp[i];
796 __m128i _s0 = _mm_add_epi32(_mm_loadu_si128((const __m128i*)(SUM+i)),
802 _mm_storeu_si128((__m128i*)(SUM+i),_mm_sub_epi32(_s0,_sm));
809 int32x4_t v_s0 = vaddq_s32(vld1q_s32(SUM + i), vld1q_s32(Sp + i));
814 vst1q_s32(SUM + i, vsubq_s32(v_s0, vld1q_s32(Sm + i)));
819 int s0 = SUM[i] + Sp[i];
821 SUM[i] = s0 - Sm[i];
833 __m128i _s0 = _mm_add_epi32(_mm_loadu_si128((const __m128i*)(SUM+i)),
837 _mm_storeu_si128((__m128i*)(SUM+i), _mm_sub_epi32(_s0,_sm));
843 int32x4_t v_s0 = vaddq_s32(vld1q_s32(SUM + i), vld1q_s32(Sp + i));
846 vst1q_s32(SUM + i, vsubq_s32(v_s0, vld1q_s32(Sm + i)));
852 int s0 = SUM[i] + Sp[i];
854 SUM[i] = s0 - Sm[i];
863 std::vector<int> sum;
885 int* SUM;
893 if( width != (int)sum.size() )
895 sum.resize(width);
899 SUM = &sum[0];
902 memset((void *)SUM, 0, sizeof(int) * width);
914 __m128i _sum = _mm_loadu_si128((const __m128i*)(SUM+i));
916 _mm_storeu_si128((__m128i*)(SUM+i), _mm_add_epi32(_sum, _sp));
921 vst1q_s32(SUM + i, vaddq_s32(vld1q_s32(SUM + i), vld1q_s32(Sp + i)));
925 SUM[i] += Sp[i];
951 __m128i _s0 = _mm_add_epi32(_mm_loadu_si128((const __m128i*)(SUM+i)),
955 _mm_storeu_si128((__m128i*)(SUM+i), _mm_sub_epi32(_s0,_sm));
962 int32x4_t v_s0 = vaddq_s32(vld1q_s32(SUM + i), vld1q_s32(Sp + i));
963 int32x4_t v_s01 = vaddq_s32(vld1q_s32(SUM + i + 4), vld1q_s32(Sp + i + 4));
968 vst1q_s32(SUM + i, vsubq_s32(v_s0, vld1q_s32(Sm + i)));
969 vst1q_s32(SUM + i + 4, vsubq_s32(v_s01, vld1q_s32(Sm + i + 4)));
975 int s0 = SUM[i] + Sp[i];
977 SUM[i] = s0 - Sm[i];
990 __m128i _s0 = _mm_add_epi32(_mm_loadu_si128((const __m128i*)(SUM+i)),
994 _mm_storeu_si128((__m128i*)(SUM+i), _mm_sub_epi32(_s0,_sm));
1000 int32x4_t v_s0 = vaddq_s32(vld1q_s32(SUM + i), vld1q_s32(Sp + i));
1001 int32x4_t v_s01 = vaddq_s32(vld1q_s32(SUM + i + 4), vld1q_s32(Sp + i + 4));
1006 vst1q_s32(SUM + i, vsubq_s32(v_s0, vld1q_s32(Sm + i)));
1007 vst1q_s32(SUM + i + 4, vsubq_s32(v_s01, vld1q_s32(Sm + i + 4)));
1013 int s0 = SUM[i] + Sp[i];
1015 SUM[i] = s0 - Sm[i];
1024 std::vector<int> sum;
1280 ("Unsupported combination of sum format (=%d), and destination format (=%d)",
1556 double sum = 0;
1566 sum += cf[i];
1571 sum += cd[i];
1575 sum = 1./sum;
1579 cf[i] = (float)(cf[i]*sum);
1581 cd[i] *= sum;
1899 int t = 2*r*r + 2*r, b, sum = 0;
1907 sum += H[c].coarse[k];
1908 if ( sum > t )
1910 sum -= H[c].coarse[k];
1944 sum += segment[b];
1945 if ( sum > t )
1962 int t = 2*r*r + 2*r, b, sum = 0;
1970 sum += H[c].coarse[k];
1971 if ( sum > t )
1973 sum -= H[c].coarse[k];
2007 sum += segment[b];
2008 if ( sum > t )
2786 float sum = 0, wsum = 0;
2813 sum += bufSum[1];
2822 sum += val*w;
2826 dptr[j] = (uchar)cvRound(sum/wsum);
3168 float sum = 0, wsum = 0;
3204 sum = bufSum32[1];
3216 sum += val*w;
3219 dptr[j] = (float)(sum/wsum);
3233 __m128 sum = _mm_setzero_ps();
3278 sum = _mm_add_ps(sum, _w);
3280 _mm_store_ps(bufSum32, sum);