a minor bug fix for brute force

pull/120/head
NikoKJ 12 years ago
parent 78fd99abdb
commit 2045c85ad5
  1. 4
      modules/ocl/src/brute_force_matcher.cpp
  2. 3
      modules/ocl/src/initialization.cpp

@ -300,7 +300,7 @@ void matchUnrolledCached(const oclMat &query, const oclMat &train, float maxDist
args.push_back( make_pair( sizeof(cl_int), (void *)&query.cols ));
args.push_back( make_pair( sizeof(cl_int), (void *)&train.rows ));
args.push_back( make_pair( sizeof(cl_int), (void *)&train.cols ));
args.push_back( make_pair( sizeof(cl_mem), (void *)&trainIdx.cols ));
args.push_back( make_pair( sizeof(cl_int), (void *)&trainIdx.cols ));
args.push_back( make_pair( sizeof(cl_int), (void *)&query.step ));
args.push_back( make_pair( sizeof(cl_int), (void *)&trainIdx.step ));
args.push_back( make_pair( sizeof(cl_int), (void *)&distType ));
@ -338,7 +338,7 @@ void radius_match(const oclMat &query, const oclMat &train, float maxDistance, c
args.push_back( make_pair( sizeof(cl_int), (void *)&query.cols ));
args.push_back( make_pair( sizeof(cl_int), (void *)&train.rows ));
args.push_back( make_pair( sizeof(cl_int), (void *)&train.cols ));
args.push_back( make_pair( sizeof(cl_mem), (void *)&trainIdx.cols ));
args.push_back( make_pair( sizeof(cl_int), (void *)&trainIdx.cols ));
args.push_back( make_pair( sizeof(cl_int), (void *)&query.step ));
args.push_back( make_pair( sizeof(cl_int), (void *)&trainIdx.step ));
args.push_back( make_pair( sizeof(cl_int), (void *)&distType ));

@ -338,7 +338,8 @@ namespace cv
EXT_LEN, (void *)extends_set, &extends_size));
CV_Assert(extends_size < EXT_LEN);
extends_set[EXT_LEN - 1] = 0;
//oclinfo.extra_options = NULL;
memset(oclinfo.impl->extra_options, 0, 512);
oclinfo.impl->double_support = 0;
int fp64_khr = string(extends_set).find("cl_khr_fp64");
if(fp64_khr >= 0 && fp64_khr < EXT_LEN)

Loading…
Cancel
Save