1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

Merge pull request #16513 from pwuertz:cuda_py_interop

This commit is contained in:
Alexander Alekhin
2020-03-05 11:56:07 +00:00
4 changed files with 29 additions and 0 deletions
@@ -305,6 +305,9 @@ public:
//! returns true if GpuMat data is NULL
CV_WRAP bool empty() const;
// returns pointer to cuda memory
CV_WRAP void* cudaPtr() const;
//! internal use method: updates the continuity flag
CV_WRAP void updateContinuityFlag();
@@ -681,6 +684,9 @@ public:
//! returns true if stream object is not default (!= 0)
operator bool_type() const;
//! return Pointer to CUDA stream
CV_WRAP void* cudaPtr() const;
class Impl;
private:
@@ -343,6 +343,12 @@ bool GpuMat::empty() const
return data == 0;
}
inline
void* GpuMat::cudaPtr() const
{
return data;
}
static inline
GpuMat createContinuous(int rows, int cols, int type)
{
+9
View File
@@ -535,6 +535,15 @@ Stream& cv::cuda::Stream::Null()
#endif
}
void* cv::cuda::Stream::cudaPtr() const
{
#ifndef HAVE_CUDA
return nullptr;
#else
return impl_->stream;
#endif
}
cv::cuda::Stream::operator bool_type() const
{
#ifndef HAVE_CUDA