Commit c942c653 authored by Alexander Karsakov's avatar Alexander Karsakov

Remove mul24 since id can be larger 2^23

parent 618c75fe
...@@ -68,7 +68,7 @@ __kernel void meanStdDev(__global const uchar * srcptr, int src_step, int src_of ...@@ -68,7 +68,7 @@ __kernel void meanStdDev(__global const uchar * srcptr, int src_step, int src_of
#endif #endif
{ {
#ifdef HAVE_SRC_CONT #ifdef HAVE_SRC_CONT
int src_index = mul24(id, srcTSIZE); int src_index = id * srcTSIZE;
#else #else
int src_index = mad24(id / cols, src_step, mul24(id % cols, srcTSIZE)); int src_index = mad24(id / cols, src_step, mul24(id % cols, srcTSIZE));
#endif #endif
......
...@@ -578,13 +578,13 @@ __kernel void reduce(__global const uchar * srcptr, int src_step, int src_offset ...@@ -578,13 +578,13 @@ __kernel void reduce(__global const uchar * srcptr, int src_step, int src_offset
for (int grain = groupnum * WGS * kercn; id < total; id += grain) for (int grain = groupnum * WGS * kercn; id < total; id += grain)
{ {
#ifdef HAVE_SRC_CONT #ifdef HAVE_SRC_CONT
int src_index = mul24(id, srcTSIZE); int src_index = id * srcTSIZE;
#else #else
int src_index = mad24(id / cols, src_step, mul24(id % cols, srcTSIZE)); int src_index = mad24(id / cols, src_step, mul24(id % cols, srcTSIZE));
#endif #endif
#ifdef HAVE_SRC2 #ifdef HAVE_SRC2
#ifdef HAVE_SRC2_CONT #ifdef HAVE_SRC2_CONT
int src2_index = mul24(id, srcTSIZE); int src2_index = id * srcTSIZE;
#else #else
int src2_index = mad24(id / cols, src2_step, mul24(id % cols, srcTSIZE)); int src2_index = mad24(id / cols, src2_step, mul24(id % cols, srcTSIZE));
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment