mirror of
https://github.com/opencv/opencv.git
synced 2024-11-28 21:20:18 +08:00
optflow gpu compilation fix under vs2010
This commit is contained in:
parent
f366553a80
commit
f444f9b43e
@ -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…
Reference in New Issue
Block a user