1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-19 02:16:34 +08:00

Merge pull request #406 from mshabunin:fix-vs2015

This commit is contained in:
Alexander Alekhin
2015-10-22 16:28:14 +00:00
3 changed files with 5 additions and 4 deletions

View File

@@ -97,6 +97,7 @@ configure_file("cmake/config.h.in" "config.h")
if(MSVC)
add_definitions( -D_CRT_SECURE_NO_WARNINGS=1 )
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4244 /wd4267 /wd4018 /wd4355 /wd4800 /wd4251 /wd4996 /wd4146 /wd4305 /wd4127 /wd4100 /wd4512 /wd4125 /wd4389 /wd4510 /wd4610 /wd4702)
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4456) # VS 2015
else()
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wno-deprecated -Wmissing-prototypes -Wmissing-declarations -Wshadow -Wunused-parameter -Wunused-local-typedefs -Wsign-compare -Wsign-promo -Wundef)
endif()

View File

@@ -62,7 +62,7 @@ static bool ocl_updateMotionHistory( InputArray _silhouette, InputOutputArray _m
k.args(ocl::KernelArg::ReadOnlyNoSize(silh), ocl::KernelArg::ReadWrite(mhi),
timestamp, delbound);
size_t globalsize[2] = { silh.cols, silh.rows };
size_t globalsize[2] = { (size_t)silh.cols, (size_t)silh.rows };
return k.run(2, globalsize, NULL, false);
}

View File

@@ -204,7 +204,7 @@ bool SURF_OCL::setUpRight(UMat &keypoints)
if( nFeatures == 0 )
return true;
size_t globalThreads[3] = {nFeatures, 1};
size_t globalThreads[3] = {(size_t)nFeatures, 1};
ocl::Kernel kerUpRight("SURF_setUpRight", ocl::xfeatures2d::surf_oclsrc, kerOpts);
return kerUpRight.args(ocl::KernelArg::ReadWrite(keypoints)).run(2, globalThreads, 0, true);
}
@@ -260,7 +260,7 @@ bool SURF_OCL::computeDescriptors(const UMat &keypoints, OutputArray _descriptor
if(!kerCalcDesc.run(2, globalThreads, localThreads, true))
return false;
size_t localThreads_n[] = {dsize, 1};
size_t localThreads_n[] = {(size_t)dsize, 1};
size_t globalThreads_n[] = {nFeatures*localThreads_n[0], localThreads_n[1]};
globalThreads[0] = nFeatures * localThreads[0];