added assertion on Compute Capability >= 1.1 to BruteForceMatcher_GPU_base::radiusMatch
This commit is contained in:
@@ -492,6 +492,10 @@ void cv::gpu::BruteForceMatcher_GPU_base::radiusMatch(const GpuMat& queryDescs,
|
||||
radiusMatchL2_gpu<short>, radiusMatchL2_gpu<int>, radiusMatchL2_gpu<float>, 0, 0
|
||||
}
|
||||
};
|
||||
|
||||
int major, minor;
|
||||
getComputeCapability(getDevice(), major, minor);
|
||||
CV_Assert(100 * major + 10 * minor >= 110); // works onle on device with CC >= 1.1
|
||||
|
||||
const int nQuery = queryDescs.rows;
|
||||
const int nTrain = trainDescs.rows;
|
||||
|
@@ -1104,6 +1104,8 @@ namespace cv { namespace gpu { namespace bfmatcher
|
||||
__global__ void radiusMatch(PtrStep_<T> queryDescs_, DevMem2D_<T> trainDescs_,
|
||||
float maxDistance, Mask mask, DevMem2Di trainIdx_, unsigned int* nMatches, PtrStepf distance)
|
||||
{
|
||||
#if defined (__CUDA_ARCH__) && __CUDA_ARCH__ >= 110
|
||||
|
||||
__shared__ float sdiff[BLOCK_DIM_X * BLOCK_DIM_Y];
|
||||
|
||||
float* sdiff_row = sdiff + BLOCK_DIM_X * threadIdx.y;
|
||||
@@ -1135,6 +1137,8 @@ namespace cv { namespace gpu { namespace bfmatcher
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
Reference in New Issue
Block a user