Commit b273e1b9 authored by Rok Mandeljc's avatar Rok Mandeljc

opencv_xfeatures2d: CUDA SURF: check if __CUDA_ARCH__ is defined before comparing it

Changed statements of type "#if __CUDA_ARCH__ >= 200" to
"#if defined __CUDA_ARCH__ && __CUDA_ARCH__ >= 200" in order to
avoid warnings about __CUDA_ARCH__ being undefined.
parent 10ad8a91
......@@ -150,7 +150,7 @@ namespace cv { namespace cuda { namespace device
template <int N> __device__ float icvCalcHaarPatternSum(const float src[][5], int oldSize, int newSize, int y, int x)
{
#if __CUDA_ARCH__ && __CUDA_ARCH__ >= 200
#if defined __CUDA_ARCH__ && __CUDA_ARCH__ >= 200
typedef double real_t;
#else
typedef float real_t;
......@@ -284,7 +284,7 @@ namespace cv { namespace cuda { namespace device
__global__ void icvFindMaximaInLayer(const PtrStepf det, const PtrStepf trace, int4* maxPosBuffer,
unsigned int* maxCounter)
{
#if __CUDA_ARCH__ && __CUDA_ARCH__ >= 110
#if defined __CUDA_ARCH__ && __CUDA_ARCH__ >= 110
extern __shared__ float N9[];
......@@ -407,7 +407,7 @@ namespace cv { namespace cuda { namespace device
float* featureX, float* featureY, int* featureLaplacian, int* featureOctave, float* featureSize, float* featureHessian,
unsigned int* featureCounter)
{
#if __CUDA_ARCH__ && __CUDA_ARCH__ >= 110
#if defined __CUDA_ARCH__ && __CUDA_ARCH__ >= 110
const int4 maxPos = maxPosBuffer[blockIdx.x];
......@@ -592,7 +592,7 @@ namespace cv { namespace cuda { namespace device
float bestx = 0, besty = 0, best_mod = 0;
#if __CUDA_ARCH__ >= 200
#if defined __CUDA_ARCH__ && __CUDA_ARCH__ >= 200
#pragma unroll
#endif
for (int i = 0; i < 18; ++i)
......
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