fix an error while setting kernel argument for a 3-D matrix.

pull/8365/head
KUANG, Fangjun 8 years ago
parent 08c6ffaa8d
commit debc1c4c95
  1. 2
      modules/core/src/ocl.cpp

@ -3434,7 +3434,7 @@ int Kernel::set(int i, const KernelArg& arg)
if( !(arg.flags & KernelArg::NO_SIZE) )
{
int cols = u3d.cols*arg.wscale/arg.iwscale;
CV_OclDbgAssert(clSetKernelArg(p->handle, (cl_uint)i, sizeof(u3d.slices), &u3d.rows) == CL_SUCCESS);
CV_OclDbgAssert(clSetKernelArg(p->handle, (cl_uint)i, sizeof(u3d.slices), &u3d.slices) == CL_SUCCESS);
CV_OclDbgAssert(clSetKernelArg(p->handle, (cl_uint)(i+1), sizeof(u3d.rows), &u3d.rows) == CL_SUCCESS);
CV_OclDbgAssert(clSetKernelArg(p->handle, (cl_uint)(i+2), sizeof(u3d.cols), &cols) == CL_SUCCESS);
i += 3;

Loading…
Cancel
Save