mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-21 14:41:58 +08:00
Remove useless locks.
This commit is contained in:
@@ -314,15 +314,11 @@ private:
|
|||||||
|
|
||||||
NV_OF_CUDA_API_FUNCTION_LIST* GetAPI()
|
NV_OF_CUDA_API_FUNCTION_LIST* GetAPI()
|
||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> lock(m_lock);
|
|
||||||
return m_ofAPI.get();
|
return m_ofAPI.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
NvOFHandle GetHandle() { return m_hOF; }
|
NvOFHandle GetHandle() { return m_hOF; }
|
||||||
|
|
||||||
protected:
|
|
||||||
std::mutex m_lock;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NvidiaOpticalFlowImpl(cv::Size imageSize, NV_OF_PERF_LEVEL perfPreset, bool bEnableTemporalHints,
|
NvidiaOpticalFlowImpl(cv::Size imageSize, NV_OF_PERF_LEVEL perfPreset, bool bEnableTemporalHints,
|
||||||
bool bEnableExternalHints, bool bEnableCostBuffer, int gpuId, Stream inputStream, Stream outputStream);
|
bool bEnableExternalHints, bool bEnableCostBuffer, int gpuId, Stream inputStream, Stream outputStream);
|
||||||
@@ -767,15 +763,11 @@ private:
|
|||||||
|
|
||||||
NV_OF_CUDA_API_FUNCTION_LIST* GetAPI()
|
NV_OF_CUDA_API_FUNCTION_LIST* GetAPI()
|
||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> lock(m_lock);
|
|
||||||
return m_ofAPI.get();
|
return m_ofAPI.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
NvOFHandle GetHandle() { return m_hOF; }
|
NvOFHandle GetHandle() { return m_hOF; }
|
||||||
|
|
||||||
protected:
|
|
||||||
std::mutex m_lock;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NvidiaOpticalFlowImpl_2(cv::Size imageSize, NV_OF_PERF_LEVEL perfPreset,
|
NvidiaOpticalFlowImpl_2(cv::Size imageSize, NV_OF_PERF_LEVEL perfPreset,
|
||||||
NV_OF_OUTPUT_VECTOR_GRID_SIZE outputGridSize, NV_OF_HINT_VECTOR_GRID_SIZE hintGridSize,
|
NV_OF_OUTPUT_VECTOR_GRID_SIZE outputGridSize, NV_OF_HINT_VECTOR_GRID_SIZE hintGridSize,
|
||||||
|
Reference in New Issue
Block a user