optflow gpu compilation fix under vs2010

pull/13383/head
Anatoly Baksheev 13 years ago
parent f366553a80
commit f444f9b43e
  1. 7
      modules/gpu/src/nvidia/NCVBroxOpticalFlow.cu
  2. 2
      modules/gpu/src/opencv2/gpu/device/utility.hpp

@ -62,7 +62,7 @@
#include "NPP_staging/NPP_staging.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
return *this;
}
////////////////////////////////////////////
//using std::tr1::shared_ptr;
@ -1181,8 +1182,8 @@ NCVStatus NCVBroxOpticalFlow(const NCVBroxOpticalFlowDescriptor desc,
ScaleVector(ptrVNew->ptr(), ptrVNew->ptr(), 1.0f/scale_factor, ns * nh, stream);
}
std::swap<FloatVector*>(ptrU, ptrUNew);
std::swap<FloatVector*>(ptrV, ptrVNew);
cv::gpu::device::swap<FloatVector*>(ptrU, ptrUNew);
cv::gpu::device::swap<FloatVector*>(ptrV, ptrVNew);
}
scale /= scale_factor;
}

@ -58,7 +58,7 @@ namespace cv { namespace gpu { namespace device
///////////////////////////////////////////////////////////////////////////////
// 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;
a = b;

Loading…
Cancel
Save