diff --git a/src/main/cpp/CImg.h b/src/main/cpp/CImg.h index 1039a55..6e5303b 100644 --- a/src/main/cpp/CImg.h +++ b/src/main/cpp/CImg.h @@ -24888,27 +24888,28 @@ namespace cimg_library_suffixed { **/ CImg get_stats(const unsigned int variance_method=1) const { if (is_empty()) return CImg(); - const T *const p_end = end(), *pm = _data, *pM = _data; - double S = 0, S2 = 0, P = 1; const ulongT siz = size(); - T m = *pm, M = *pM; + const longT off_end = (longT)siz; + double S = 0, S2 = 0, P = 1; + longT offm = 0, offM = 0; + T m = *_data, M = m; cimg_pragma_openmp(parallel reduction(+:S,S2) reduction(*:P) cimg_openmp_if(siz>=131072)) { - const T *lpm = _data, *lpM = _data; - T lm = *lpm, lM = *lpM; + longT loffm = 0, loffM = 0; + T lm = *_data, lM = lm; cimg_pragma_openmp(for) - for (const T *ptrs = _data; ptrslM) { lM = val; lpM = ptrs; } + if (vallM) { lM = val; loffM = off; } S+=_val; S2+=_val*_val; P*=_val; } cimg_pragma_openmp(critical(get_stats)) { - if (lmM || (lM==M && lpMM || (lM==M && loffM(1,14).fill((double)m,(double)M,mean_value,variance_value, (double)xm,(double)ym,(double)zm,(double)cm, (double)xM,(double)yM,(double)zM,(double)cM,