Skip to content

Commit 0016dc6

Browse files
committed
.
2 parents 8f2bbdd + 87bf088 commit 0016dc6

1 file changed

Lines changed: 8 additions & 26 deletions

File tree

CImg.h

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -34866,8 +34866,7 @@ namespace cimg_library {
3486634866
mp(x,y,z,0,res._data);
3486734867
const double *const cimg_restrict ptrs = res._data;
3486834868
T *cimg_restrict _ptrd = ptrd--;
34869-
cimg_pragma_openmp(simd)
34870-
for (unsigned int n = 0; n<N; ++n) _ptrd[n*whd] = (T)ptrs[n];
34869+
for (unsigned int n = 0; n<N; ++n) _ptrd[n*whd] = (T)ptrs[n];
3487134870
}
3487234871
}
3487334872
mp.end_t();
@@ -34932,33 +34931,17 @@ namespace cimg_library {
3493234931
}
3493334932

3493434933
} else { // Scalar-valued expression
34935-
T *cimg_restrict ptrd = *expression=='<'?end() - _width:_data;
34934+
T *ptrd = *expression=='<'?end() - 1:_data;
3493634935
if (*expression=='<') {
3493734936
mp.begin_t();
34938-
if (mode&4) cimg_rofYZC(*this,y,z,c) {
34939-
cimg_abort_test;
34940-
cimg_rofX(*this,x) mp(x,y,z,c);
34941-
}
34942-
else cimg_rofYZC(*this,y,z,c) {
34943-
cimg_abort_test;
34944-
cimg_pragma_openmp(simd)
34945-
cimg_rofX(*this,x) ptrd[x] = (T)mp(x,y,z,c);
34946-
ptrd-=_width;
34947-
}
34937+
if (mode&4) cimg_rofYZC(*this,y,z,c) { cimg_abort_test; cimg_rofX(*this,x) mp(x,y,z,c); }
34938+
else cimg_rofYZC(*this,y,z,c) { cimg_abort_test; cimg_rofX(*this,x) *(ptrd--) = (T)mp(x,y,z,c); }
3494834939
mp.end_t();
3494934940

3495034941
} else if (*expression=='>' || *expression=='+' || !is_parallelizable) {
3495134942
mp.begin_t();
34952-
if (mode&4) cimg_forYZC(*this,y,z,c) {
34953-
cimg_abort_test;
34954-
cimg_forX(*this,x) mp(x,y,z,c);
34955-
}
34956-
else cimg_forYZC(*this,y,z,c) {
34957-
cimg_abort_test;
34958-
cimg_pragma_openmp(simd)
34959-
cimg_forX(*this,x) ptrd[x] = (T)mp(x,y,z,c);
34960-
ptrd+=_width;
34961-
}
34943+
if (mode&4) cimg_forYZC(*this,y,z,c) { cimg_abort_test; cimg_forX(*this,x) mp(x,y,z,c); }
34944+
else cimg_forYZC(*this,y,z,c) { cimg_abort_test; cimg_forX(*this,x) *(ptrd++) = (T)mp(x,y,z,c); }
3496234945
mp.end_t();
3496334946

3496434947
} else {
@@ -34979,10 +34962,9 @@ namespace cimg_library {
3497934962
cimg_abort_test; \
3498034963
if (mode&4) cimg_for##_X(*this,_x) lmp(x,y,z,c); \
3498134964
else { \
34982-
T *cimg_restrict _ptrd = data(_sx,_sy,_sz,_sc); \
34965+
T *const _ptrd = data(_sx,_sy,_sz,_sc); \
3498334966
const ulongT off = (ulongT)_off; \
34984-
cimg_pragma_openmp(simd) \
34985-
cimg_for##_X(*this,_x) _ptrd[_x*off] = (T)lmp(x,y,z,c); \
34967+
cimg_for##_X(*this,_x) _ptrd[_x*off] = (T)lmp(x,y,z,c); \
3498634968
} \
3498734969
} _cimg_abort_catch_openmp _cimg_abort_catch_fill_openmp
3498834970

0 commit comments

Comments
 (0)