Commit c5a273f5 authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #406 from mshabunin:fix-vs2015

parents 35735686 d15d490a
......@@ -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()
......@@ -179,4 +180,4 @@ endif()
if(NOT BUILD_SHARED_LIBS)
ocv_install_target(libprotobuf EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
endif()
\ No newline at end of file
endif()
......@@ -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);
}
......
......@@ -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];
......
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