| 247 | } |
| 248 | |
| 249 | NvOFBufferCudaArray::NvOFBufferCudaArray( |
| 250 | std::shared_ptr<NvOFCudaAPI> ofAPI, const NV_OF_BUFFER_DESCRIPTOR& desc, |
| 251 | uint32_t elementSize) |
| 252 | : NvOFBuffer(desc, elementSize), m_cuArray(0), m_NvOFAPI(ofAPI) { |
| 253 | m_cuContext = m_NvOFAPI->GetCudaContext(); |
| 254 | NVOF_API_CALL(m_NvOFAPI->GetAPI()->nvOFCreateGPUBufferCuda( |
| 255 | m_NvOFAPI->GetHandle(), &desc, NV_OF_CUDA_BUFFER_TYPE_CUARRAY, |
| 256 | &m_hGPUBuffer)); |
| 257 | m_cuArray = m_NvOFAPI->GetAPI()->nvOFGPUBufferGetCUarray(m_hGPUBuffer); |
| 258 | NVOF_API_CALL(m_NvOFAPI->GetAPI()->nvOFGPUBufferGetStrideInfo( |
| 259 | m_hGPUBuffer, &m_strideInfo)); |
| 260 | } |
| 261 | |
| 262 | NvOFBufferCudaArray::~NvOFBufferCudaArray() { |
| 263 | m_NvOFAPI->GetAPI()->nvOFDestroyGPUBufferCuda(m_hGPUBuffer); |
nothing calls this directly
no test coverage detected