Compatibility and bug fixes.

pull/6290/head
Dan 9 years ago committed by Dan
parent a8ca560684
commit 7a934f9ee0
  1. 5
      modules/cudafeatures2d/src/cuda/orb.cu
  2. 2
      modules/cudafeatures2d/src/orb.cpp

@ -45,6 +45,7 @@
#include <thrust/device_ptr.h>
#include <thrust/sort.h>
#include <thrust/system/cuda/execution_policy.h>
#include <thrust/version.h>
#include "opencv2/core/cuda/common.hpp"
@ -62,6 +63,7 @@ namespace cv { namespace cuda { namespace device
{
thrust::device_ptr<int> loc_ptr(loc);
thrust::device_ptr<float> response_ptr(response);
#if THRUST_VERSION >= 100800
if(stream)
{
thrust::sort_by_key(thrust::cuda::par.on(stream), response_ptr, response_ptr + size, loc_ptr, thrust::greater<float>());
@ -69,6 +71,9 @@ namespace cv { namespace cuda { namespace device
{
thrust::sort_by_key(response_ptr, response_ptr + size, loc_ptr, thrust::greater<float>());
}
#else
thrust::sort_by_key(response_ptr, response_ptr + size, loc_ptr, thrust::greater<float>());
#endif
return n_points;
}

@ -652,7 +652,7 @@ namespace
Rect inner(edgeThreshold_, edgeThreshold_, sz.width - 2 * edgeThreshold_, sz.height - 2 * edgeThreshold_);
buf_(inner).setTo(Scalar::all(255), stream);
cuda::bitwise_and(maskPyr_[level], buf_, maskPyr_[level], stream);
cuda::bitwise_and(maskPyr_[level], buf_, maskPyr_[level], cv::noArray(), stream);
}
}

Loading…
Cancel
Save