Visual Studio 2015 warning and test fixes
This commit is contained in:
@@ -262,7 +262,7 @@ static bool ocl_FAST( InputArray _img, std::vector<KeyPoint>& keypoints,
|
||||
UMat img = _img.getUMat();
|
||||
if( img.cols < 7 || img.rows < 7 )
|
||||
return false;
|
||||
size_t globalsize[] = { img.cols-6, img.rows-6 };
|
||||
size_t globalsize[] = { (size_t)img.cols-6, (size_t)img.rows-6 };
|
||||
|
||||
ocl::Kernel fastKptKernel("FAST_findKeypoints", ocl::features2d::fast_oclsrc);
|
||||
if (fastKptKernel.empty())
|
||||
@@ -306,7 +306,7 @@ static bool ocl_FAST( InputArray _img, std::vector<KeyPoint>& keypoints,
|
||||
if (fastNMSKernel.empty())
|
||||
return false;
|
||||
|
||||
size_t globalsize_nms[] = { counter };
|
||||
size_t globalsize_nms[] = { (size_t)counter };
|
||||
if( !fastNMSKernel.args(ocl::KernelArg::PtrReadOnly(kp1),
|
||||
ocl::KernelArg::PtrReadWrite(kp2),
|
||||
ocl::KernelArg::ReadOnly(img),
|
||||
|
@@ -97,8 +97,8 @@ static bool ocl_matchSingle(InputArray query, InputArray train,
|
||||
if(k.empty())
|
||||
return false;
|
||||
|
||||
size_t globalSize[] = {(query.size().height + block_size - 1) / block_size * block_size, block_size};
|
||||
size_t localSize[] = {block_size, block_size};
|
||||
size_t globalSize[] = {((size_t)query.size().height + block_size - 1) / block_size * block_size, (size_t)block_size};
|
||||
size_t localSize[] = {(size_t)block_size, (size_t)block_size};
|
||||
|
||||
int idx = 0;
|
||||
idx = k.set(idx, ocl::KernelArg::PtrReadOnly(uquery));
|
||||
@@ -197,8 +197,8 @@ static bool ocl_knnMatchSingle(InputArray query, InputArray train, UMat &trainId
|
||||
if(k.empty())
|
||||
return false;
|
||||
|
||||
size_t globalSize[] = {(query_rows + block_size - 1) / block_size * block_size, block_size};
|
||||
size_t localSize[] = {block_size, block_size};
|
||||
size_t globalSize[] = {((size_t)query_rows + block_size - 1) / block_size * block_size, (size_t)block_size};
|
||||
size_t localSize[] = {(size_t)block_size, (size_t)block_size};
|
||||
|
||||
int idx = 0;
|
||||
idx = k.set(idx, ocl::KernelArg::PtrReadOnly(uquery));
|
||||
@@ -306,8 +306,8 @@ static bool ocl_radiusMatchSingle(InputArray query, InputArray train,
|
||||
if (k.empty())
|
||||
return false;
|
||||
|
||||
size_t globalSize[] = {(train_rows + block_size - 1) / block_size * block_size, (query_rows + block_size - 1) / block_size * block_size};
|
||||
size_t localSize[] = {block_size, block_size};
|
||||
size_t globalSize[] = {((size_t)train_rows + block_size - 1) / block_size * block_size, ((size_t)query_rows + block_size - 1) / block_size * block_size};
|
||||
size_t localSize[] = {(size_t)block_size, (size_t)block_size};
|
||||
|
||||
int idx = 0;
|
||||
idx = k.set(idx, ocl::KernelArg::PtrReadOnly(uquery));
|
||||
|
@@ -64,7 +64,7 @@ ocl_HarrisResponses(const UMat& imgbuf,
|
||||
UMat& responses,
|
||||
int nkeypoints, int blockSize, float harris_k)
|
||||
{
|
||||
size_t globalSize[] = {nkeypoints};
|
||||
size_t globalSize[] = {(size_t)nkeypoints};
|
||||
|
||||
float scale = 1.f/((1 << 2) * blockSize * 255.f);
|
||||
float scale_sq_sq = scale * scale * scale * scale;
|
||||
@@ -86,7 +86,7 @@ ocl_ICAngles(const UMat& imgbuf, const UMat& layerinfo,
|
||||
const UMat& keypoints, UMat& responses,
|
||||
const UMat& umax, int nkeypoints, int half_k)
|
||||
{
|
||||
size_t globalSize[] = {nkeypoints};
|
||||
size_t globalSize[] = {(size_t)nkeypoints};
|
||||
|
||||
ocl::Kernel icangle_ker("ORB_ICAngle", ocl::features2d::orb_oclsrc, "-D ORB_ANGLES");
|
||||
if( icangle_ker.empty() )
|
||||
@@ -106,7 +106,7 @@ ocl_computeOrbDescriptors(const UMat& imgbuf, const UMat& layerInfo,
|
||||
const UMat& keypoints, UMat& desc, const UMat& pattern,
|
||||
int nkeypoints, int dsize, int wta_k)
|
||||
{
|
||||
size_t globalSize[] = {nkeypoints};
|
||||
size_t globalSize[] = {(size_t)nkeypoints};
|
||||
|
||||
ocl::Kernel desc_ker("ORB_computeDescriptor", ocl::features2d::orb_oclsrc,
|
||||
format("-D ORB_DESCRIPTORS -D WTA_K=%d", wta_k));
|
||||
|
Reference in New Issue
Block a user