@Namespace(value="nvinfer1") @NoOffset @Properties(inherit=nvinfer.class) public class IErrorRecorder extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Modifier and Type | Field and Description |
---|---|
static long |
kMAX_DESC_LENGTH |
Constructor and Description |
---|
IErrorRecorder(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
\brief Clear the error stack on the error recorder.
|
int |
decRefCount()
\brief Decrements the refcount for the current ErrorRecorder.
|
nvinfer.ErrorCode |
getErrorCode(int errorIdx)
\brief Returns the ErrorCode enumeration.
|
String |
getErrorDesc(int errorIdx)
\brief Returns a null-terminated C-style string description of the error.
|
int |
getNbErrors()
\brief Return the number of errors
Determines the number of errors that occurred between the current point in execution
and the last time that the clear() was executed.
|
boolean |
hasOverflowed()
\brief Determine if the error stack has overflowed.
|
int |
incRefCount()
\brief Increments the refcount for the current ErrorRecorder.
|
static long |
kMAX_DESC_LENGTH()
The length limit for an error description, excluding the '\0' string terminator.
|
boolean |
reportError(int val,
BytePointer desc) |
boolean |
reportError(nvinfer.ErrorCode val,
String desc)
\brief Report an error to the error recorder with the corresponding enum and description.
|
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public IErrorRecorder(Pointer p)
Pointer(Pointer)
.@MemberGetter @Cast(value="const size_t") public static long kMAX_DESC_LENGTH()
@NoException(value=true) public int getNbErrors()
\usage
- Allowed context for the API call
- Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
when multiple execution contexts are used during runtime.
@NoException(value=true) public nvinfer.ErrorCode getErrorCode(int errorIdx)
errorIdx
- A 32-bit integer that indexes into the error array.
The errorIdx specifies what error code from 0 to getNbErrors()-1 that the application
wants to analyze and return the error code enum.getErrorDesc, ErrorCode
\usage
- Allowed context for the API call
- Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
when multiple execution contexts are used during runtime.
@NoException(value=true) public String getErrorDesc(int errorIdx)
errorIdx
- A 32-bit integer that indexes into the error array.
For the error specified by the idx value, return the string description of the error. The
error string is a null-terminated C-style string. In the safety context there is a
constant length requirement to remove any dynamic memory allocations and the error message
may be truncated. The format of the string is "\usage
- Allowed context for the API call
- Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
when multiple execution contexts are used during runtime.
@Cast(value="bool") @NoException(value=true) public boolean hasOverflowed()
@NoException(value=true) public void clear()
\usage
- Allowed context for the API call
- Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
when multiple execution contexts are used during runtime.
@Cast(value="bool") @NoException(value=true) public boolean reportError(nvinfer.ErrorCode val, String desc)
val
- The error code enum that is being reported.desc
- The string description of the error.
Report an error to the user that has a given value and human readable description. The function returns false
if processing can continue, which implies that the reported error is not fatal. This does not guarantee that
processing continues, but provides a hint to TensorRT.
The desc C-string data is only valid during the call to reportError and may be immediately deallocated by the
caller when reportError returns. The implementation must not store the desc pointer in the ErrorRecorder object
or otherwise access the data from desc after reportError returns.@Cast(value="bool") @NoException(value=true) public boolean reportError(@Cast(value="nvinfer1::ErrorCode") int val, @Cast(value="const char*") BytePointer desc)
@Cast(value="nvinfer1::IErrorRecorder::RefCount") @NoException(value=true) public int incRefCount()
@Cast(value="nvinfer1::IErrorRecorder::RefCount") @NoException(value=true) public int decRefCount()
Copyright © 2024. All rights reserved.