@Namespace(value="nvinfer1") @NoOffset @Properties(inherit=nvinfer.class) public class IRuntime extends INoCopy
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter| Constructor and Description |
|---|
IRuntime()
Default native constructor.
|
IRuntime(long size)
Native array allocator.
|
IRuntime(Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
ICudaEngine |
deserializeCudaEngine(Pointer blob,
long size)
\brief Deserialize an engine from a stream.
|
ICudaEngine |
deserializeCudaEngine(Pointer blob,
long size,
IPluginFactory pluginFactory)
Deprecated.
Deprecated in TensorRT 8.0.
\warning IPluginFactory is no longer supported, therefore pluginFactory must be a nullptr.
|
void |
destroy()
Deprecated.
Use
delete instead. Deprecated in TRT 8.0.
\warning Calling destroy on a managed pointer will result in a double-free error. |
int |
getDLACore()
\brief Get the DLA core that the engine executes on.
|
IErrorRecorder |
getErrorRecorder()
\brief get the ErrorRecorder assigned to this interface.
|
ILogger |
getLogger()
\brief get the logger with which the runtime was created
|
int |
getMaxThreads()
\brief Get the maximum number of threads that can be used by the runtime.
|
int |
getNbDLACores()
\brief Returns number of DLA hardware cores accessible or 0 if DLA is unavailable.
|
IRuntime |
getPointer(long i) |
IRuntime |
position(long position) |
void |
setDLACore(int dlaCore)
\brief Sets the DLA core used by the network.
|
void |
setErrorRecorder(IErrorRecorder recorder) |
void |
setGpuAllocator(IGpuAllocator allocator)
\brief Set the GPU allocator.
|
boolean |
setMaxThreads(int maxThreads)
\brief Set the maximum number of threads.
|
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zeropublic IRuntime()
public IRuntime(long size)
Pointer.position(long).public IRuntime(Pointer p)
Pointer(Pointer).public IRuntime getPointer(long i)
getPointer in class Pointer@Deprecated @NoException(value=true) public ICudaEngine deserializeCudaEngine(@Const Pointer blob, @Cast(value="std::size_t") long size, IPluginFactory pluginFactory)
blob - The memory that holds the serialized engine.size - The size of the memory in bytes.pluginFactory - The plugin factory, if any plugins are used by the network, otherwise nullptr.@NoException(value=true) public void setDLACore(int dlaCore)
dlaCore - The DLA core to execute the engine on, in the range [0,getNbDlaCores()).
This function is used to specify which DLA core to use via indexing, if multiple DLA cores are available.
\warning if getNbDLACores() returns 0, then this function does nothing.getDLACore()@NoException(value=true) public int getDLACore()
@NoException(value=true) public int getNbDLACores()
@Deprecated @NoException(value=true) public void destroy()
delete instead. Deprecated in TRT 8.0.
\warning Calling destroy on a managed pointer will result in a double-free error.@NoException(value=true) public void setGpuAllocator(IGpuAllocator allocator)
allocator - Set the GPU allocator to be used by the runtime. All GPU memory acquired will use this
allocator. If NULL is passed, the default allocator will be used.
Default: uses cudaMalloc/cudaFree.
If nullptr is passed, the default allocator will be used.@NoException(value=true) public void setErrorRecorder(IErrorRecorder recorder)
/**@NoException(value=true) public IErrorRecorder getErrorRecorder()
setErrorRecorder()@NoException(value=true) public ICudaEngine deserializeCudaEngine(@Const Pointer blob, @Cast(value="std::size_t") long size)
blob - The memory that holds the serialized engine.size - The size of the memory.@NoException(value=true) public ILogger getLogger()
@Cast(value="bool") @NoException(value=true) public boolean setMaxThreads(int maxThreads)
maxThreads - The maximum number of threads that can be used by the runtime.@NoException(value=true) public int getMaxThreads()
setMaxThreads()Copyright © 2022. All rights reserved.