MCPcopy Create free account
hub / github.com/CVCUDA/CV-CUDA / ExternalBuffer

Method ExternalBuffer

python/mod_cvcuda/nvcv/ExternalBuffer.cpp:74–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74ExternalBuffer::ExternalBuffer(DLPackTensor &&dlTensor)
75{
76 if (!IsCudaAccessible(dlTensor->device.device_type))
77 {
78 throw std::runtime_error("Only CUDA memory buffers can be wrapped");
79 }
80
81 if (dlTensor->data != nullptr)
82 {
83 CheckValidCUDABuffer(dlTensor->data);
84 }
85
86 m_dlTensor = std::move(dlTensor);
87}
88
89Shape ExternalBuffer::shape() const
90{

Callers

nothing calls this directly

Calls 2

IsCudaAccessibleFunction · 0.85
CheckValidCUDABufferFunction · 0.85

Tested by

no test coverage detected