TensorRT  8.0.2
nvinfer1::IHostMemory Class Reference

Class to handle library allocated memory that is accessible to the user. More...

#include <NvInferRuntime.h>

Inheritance diagram for nvinfer1::IHostMemory:
nvinfer1::INoCopy

Public Member Functions

void * data () const noexcept
 A pointer to the raw data that is owned by the library.
 
std::size_t size () const noexcept
 The size in bytes of the data that was allocated.
 
DataType type () const noexcept
 The type of the memory that was allocated.
 
TRT_DEPRECATED void destroy () noexcept
 

Protected Attributes

apiv::VHostMemorymImpl
 

Additional Inherited Members

- Protected Member Functions inherited from nvinfer1::INoCopy
 INoCopy (const INoCopy &other)=delete
 
INoCopyoperator= (const INoCopy &other)=delete
 
 INoCopy (INoCopy &&other)=delete
 
INoCopyoperator= (INoCopy &&other)=delete
 

Detailed Description

Class to handle library allocated memory that is accessible to the user.

The memory allocated via the host memory object is owned by the library and will be de-allocated when the destroy method is called.

Warning
Do not inherit from this class, as doing so will break forward-compatibility of the API and ABI.

Member Function Documentation

◆ destroy()

TRT_DEPRECATED void nvinfer1::IHostMemory::destroy ( )
inlinenoexcept

Destroy the allocated memory.

Deprecated:
Deprecated interface will be removed in TensorRT 10.0.
Warning
Calling destroy on a managed pointer will result in a double-free error.

The documentation for this class was generated from the following file: