Commit f444f9b4 authored by Anatoly Baksheev's avatar Anatoly Baksheev

optflow gpu compilation fix under vs2010

parent f366553a
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
#include "NPP_staging/NPP_staging.hpp" #include "NPP_staging/NPP_staging.hpp"
#include "NCVBroxOpticalFlow.hpp" #include "NCVBroxOpticalFlow.hpp"
#include "opencv2/gpu/device/utility.hpp"
//////////////////////////////////////////// ////////////////////////////////////////////
...@@ -131,6 +131,7 @@ template<typename _Tp> inline shared_ptr<_Tp>& shared_ptr<_Tp>::operator = (cons ...@@ -131,6 +131,7 @@ template<typename _Tp> inline shared_ptr<_Tp>& shared_ptr<_Tp>::operator = (cons
return *this; return *this;
} }
//////////////////////////////////////////// ////////////////////////////////////////////
//using std::tr1::shared_ptr; //using std::tr1::shared_ptr;
...@@ -1181,8 +1182,8 @@ NCVStatus NCVBroxOpticalFlow(const NCVBroxOpticalFlowDescriptor desc, ...@@ -1181,8 +1182,8 @@ NCVStatus NCVBroxOpticalFlow(const NCVBroxOpticalFlowDescriptor desc,
ScaleVector(ptrVNew->ptr(), ptrVNew->ptr(), 1.0f/scale_factor, ns * nh, stream); ScaleVector(ptrVNew->ptr(), ptrVNew->ptr(), 1.0f/scale_factor, ns * nh, stream);
} }
std::swap<FloatVector*>(ptrU, ptrUNew); cv::gpu::device::swap<FloatVector*>(ptrU, ptrUNew);
std::swap<FloatVector*>(ptrV, ptrVNew); cv::gpu::device::swap<FloatVector*>(ptrV, ptrVNew);
} }
scale /= scale_factor; scale /= scale_factor;
} }
......
...@@ -58,7 +58,7 @@ namespace cv { namespace gpu { namespace device ...@@ -58,7 +58,7 @@ namespace cv { namespace gpu { namespace device
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// swap // swap
template <typename T> void __device__ __forceinline__ swap(T& a, T& b) template <typename T> void __device__ __host__ __forceinline__ swap(T& a, T& b)
{ {
const T temp = a; const T temp = a;
a = b; a = b;
......
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