Merge pull request #3195 from akarsakov:ocl_rm_mul24

This commit is contained in:
Alexander Alekhin 2014-09-08 11:00:59 +00:00
commit eac4042ed5
2 changed files with 3 additions and 3 deletions

View File

@ -68,7 +68,7 @@ __kernel void meanStdDev(__global const uchar * srcptr, int src_step, int src_of
#endif
{
#ifdef HAVE_SRC_CONT
int src_index = mul24(id, srcTSIZE);
int src_index = id * srcTSIZE;
#else
int src_index = mad24(id / cols, src_step, mul24(id % cols, srcTSIZE));
#endif

View File

@ -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)
{
#ifdef HAVE_SRC_CONT
int src_index = mul24(id, srcTSIZE);
int src_index = id * srcTSIZE;
#else
int src_index = mad24(id / cols, src_step, mul24(id % cols, srcTSIZE));
#endif
#ifdef HAVE_SRC2
#ifdef HAVE_SRC2_CONT
int src2_index = mul24(id, srcTSIZE);
int src2_index = id * srcTSIZE;
#else
int src2_index = mad24(id / cols, src2_step, mul24(id % cols, srcTSIZE));
#endif