Merge pull request #5660 from jet47:cuda-wrap-stream-3.0

This commit is contained in:
Vadim Pisarevsky
2015-12-08 12:28:57 +00:00
5 changed files with 72 additions and 16 deletions

View File

@@ -528,6 +528,7 @@ public:
private:
Ptr<Impl> impl_;
Event(const Ptr<Impl>& impl);
friend struct EventAccessor;
};

View File

@@ -540,6 +540,16 @@ Stream::Stream(const Ptr<Impl>& impl)
{
}
//===================================================================================
// Event
//===================================================================================
inline
Event::Event(const Ptr<Impl>& impl)
: impl_(impl)
{
}
//===================================================================================
// Initialization & Info
//===================================================================================

View File

@@ -52,7 +52,7 @@
*/
#include <cuda_runtime.h>
#include "opencv2/core/cvdef.h"
#include "opencv2/core/cuda.hpp"
namespace cv
{
@@ -62,14 +62,12 @@ namespace cv
//! @addtogroup cudacore_struct
//! @{
class Stream;
class Event;
/** @brief Class that enables getting cudaStream_t from cuda::Stream
*/
struct StreamAccessor
{
CV_EXPORTS static cudaStream_t getStream(const Stream& stream);
CV_EXPORTS static Stream wrapStream(cudaStream_t stream);
};
/** @brief Class that enables getting cudaEvent_t from cuda::Event
@@ -77,6 +75,7 @@ namespace cv
struct EventAccessor
{
CV_EXPORTS static cudaEvent_t getEvent(const Event& event);
CV_EXPORTS static Event wrapEvent(cudaEvent_t event);
};
//! @}