diff --git a/modules/ocl/src/moments.cpp b/modules/ocl/src/moments.cpp index e872093faf..60d6ad7c53 100644 --- a/modules/ocl/src/moments.cpp +++ b/modules/ocl/src/moments.cpp @@ -146,7 +146,7 @@ static void icvContourMoments( CvSeq* contour, CvMoments* mom ) cl_int dst_step = (cl_int)dst_a.step; args.push_back( std::make_pair( sizeof(cl_int) , (void *)&dst_step )); - openCLExecuteKernel(dst_a.clCxt, &moments, "icvContourMoments", globalThreads, localThreads, args, -1, -1); + openCLExecuteKernel2(dst_a.clCxt, &moments, "icvContourMoments", globalThreads, localThreads, args, -1, -1); cv::Mat dst(dst_a); a00 = a10 = a01 = a20 = a11 = a02 = a30 = a21 = a12 = a03 = 0.0; @@ -301,7 +301,7 @@ static void ocl_cvMoments( const void* array, CvMoments* mom, int binary ) args.push_back( std::make_pair( sizeof(cl_int) , (void *)&coi )); args.push_back( std::make_pair( sizeof(cl_int) , (void *)&binary )); args.push_back( std::make_pair( sizeof(cl_int) , (void *)&TILE_SIZE )); - openCLExecuteKernel(Context::getContext(), &moments, "CvMoments", globalThreads, localThreads, args, -1, depth); + openCLExecuteKernel2(Context::getContext(), &moments, "CvMoments", globalThreads, localThreads, args, -1, depth); size_t localThreadss[3] = { 128, 1, 1}; size_t globalThreadss[3] = { 128, 1, 1}; @@ -310,10 +310,10 @@ static void ocl_cvMoments( const void* array, CvMoments* mom, int binary ) args_sum.push_back( std::make_pair( sizeof(cl_int) , (void *)&tile_height )); args_sum.push_back( std::make_pair( sizeof(cl_int) , (void *)&tile_width )); args_sum.push_back( std::make_pair( sizeof(cl_int) , (void *)&TILE_SIZE )); - args_sum.push_back( std::make_pair( sizeof(cl_mem) , (void *)&sum )); + args_sum.push_back( std::make_pair( sizeof(cl_mem) , (void *)&sum.data )); args_sum.push_back( std::make_pair( sizeof(cl_mem) , (void *)&dst_m.data )); args_sum.push_back( std::make_pair( sizeof(cl_int) , (void *)&dst_m.step )); - openCLExecuteKernel(Context::getContext(), &moments, "dst_sum", globalThreadss, localThreadss, args_sum, -1, -1); + openCLExecuteKernel2(Context::getContext(), &moments, "dst_sum", globalThreadss, localThreadss, args_sum, -1, -1); Mat dstsum(sum); mom->m00 = dstsum.at(0, 0); diff --git a/modules/ocl/test/test_moments.cpp b/modules/ocl/test/test_moments.cpp index d83e6e18c1..50b8379d86 100644 --- a/modules/ocl/test/test_moments.cpp +++ b/modules/ocl/test/test_moments.cpp @@ -34,7 +34,7 @@ PARAM_TEST_CASE(MomentsTest, MatType, bool) }; -TEST_P(MomentsTest, DISABLED_Mat) +TEST_P(MomentsTest, Mat) { bool binaryImage = 0; SetUp();