@Namespace(value="nvinfer1") @NoOffset @Properties(inherit=nvinfer.class) public class ITensor extends INoCopy
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
ITensor(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
dynamicRangeIsSet()
\brief Query whether dynamic range is set.
|
int |
getAllowedFormats()
\brief Get a bitmask of TensorFormat values that the tensor supports.
|
boolean |
getBroadcastAcrossBatch()
\brief Check if tensor is broadcast across the batch.
|
String |
getDimensionName(int index)
\brief Get the name of an input dimension.
|
Dims32 |
getDimensions()
\brief Get the dimensions of a tensor.
|
float |
getDynamicRangeMax()
\brief Get maximum of dynamic range.
|
float |
getDynamicRangeMin()
\brief Get minimum of dynamic range.
|
nvinfer.TensorLocation |
getLocation()
\brief Get the storage location of a tensor.
|
String |
getName()
\brief Get the tensor name.
|
nvinfer.DataType |
getType()
\brief Get the data type of a tensor.
|
boolean |
isExecutionTensor()
\brief Whether the tensor is an execution tensor.
|
boolean |
isNetworkInput()
\brief Whether the tensor is a network input.
|
boolean |
isNetworkOutput()
\brief Whether the tensor is a network output.
|
boolean |
isShapeTensor()
\brief Whether the tensor is a shape tensor.
|
void |
resetDynamicRange()
\brief Undo effect of setDynamicRange.
|
void |
setAllowedFormats(int formats)
\brief Set allowed formats for this tensor.
|
void |
setBroadcastAcrossBatch(boolean broadcastAcrossBatch)
\brief Set whether to enable broadcast of tensor across the batch.
|
void |
setDimensionName(int index,
BytePointer name) |
void |
setDimensionName(int index,
String name)
\brief Name a dimension of an input tensor.
|
void |
setDimensions(Dims32 dimensions)
\brief Set the dimensions of a tensor.
|
boolean |
setDynamicRange(float min,
float max)
\brief Set dynamic range for the tensor
Currently, only symmetric ranges are supported.
|
void |
setLocation(int location) |
void |
setLocation(nvinfer.TensorLocation location)
\brief Set the storage location of a tensor
|
void |
setName(BytePointer name) |
void |
setName(String name)
\brief Set the tensor name.
|
void |
setType(int type) |
void |
setType(nvinfer.DataType type)
\brief Set the data type of a tensor.
|
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 ITensor(Pointer p)
Pointer(Pointer)
.@NoException(value=true) public void setName(String name)
name
- The name.
\warning The string name must be null-terminated, and be at most 4096 bytes including the terminator.getName()
@NoException(value=true) public void setName(@Cast(value="const char*") BytePointer name)
@NoException(value=true) public String getName()
setName()
@NoException(value=true) public void setDimensions(@ByVal @Cast(value="nvinfer1::Dims*") Dims32 dimensions)
dimensions
- The dimensions of the tensor.getDimensions()
@ByVal @Cast(value="nvinfer1::Dims*") @NoException(value=true) public Dims32 getDimensions()
setDimensions()
@NoException(value=true) public void setType(nvinfer.DataType type)
type
- The data type of the tensor.
The type is unchanged if the tensor is not a network input tensor, or marked as an output tensor or shape
output tensor.getType()
@NoException(value=true) public void setType(@Cast(value="nvinfer1::DataType") int type)
@NoException(value=true) public nvinfer.DataType getType()
setType()
@Cast(value="bool") @NoException(value=true) public boolean setDynamicRange(float min, float max)
@Cast(value="bool") @NoException(value=true) public boolean isNetworkInput()
@Cast(value="bool") @NoException(value=true) public boolean isNetworkOutput()
@NoException(value=true) public void setBroadcastAcrossBatch(@Cast(value="bool") boolean broadcastAcrossBatch)
broadcastAcrossBatch
- Whether to enable broadcast of tensor across the batch.getBroadcastAcrossBatch()
@Cast(value="bool") @NoException(value=true) public boolean getBroadcastAcrossBatch()
setBroadcastAcrossBatch()
@NoException(value=true) public nvinfer.TensorLocation getLocation()
setLocation()
@NoException(value=true) public void setLocation(nvinfer.TensorLocation location)
location
- the location of tensor data
Only network input tensors for storing sequence lengths for RNNv2 are supported.
Using host storage for layers that do not support it will generate
errors at build time.getLocation()
@NoException(value=true) public void setLocation(@Cast(value="nvinfer1::TensorLocation") int location)
@Cast(value="bool") @NoException(value=true) public boolean dynamicRangeIsSet()
@NoException(value=true) public void resetDynamicRange()
@NoException(value=true) public float getDynamicRangeMin()
@NoException(value=true) public float getDynamicRangeMax()
@NoException(value=true) public void setAllowedFormats(@Cast(value="nvinfer1::TensorFormats") int formats)
formats
- A bitmask of TensorFormat values that are supported for this tensor.ITensor::getAllowedFormats()
,
TensorFormats
@Cast(value="nvinfer1::TensorFormats") @NoException(value=true) public int getAllowedFormats()
ITensor::setAllowedFormats()
@Cast(value="bool") @NoException(value=true) public boolean isShapeTensor()
INetworkDefinition::markOutputForShapes(), ICudaEngine::isShapeBinding()
@Cast(value="bool") @NoException(value=true) public boolean isExecutionTensor()
@NoException(value=true) public void setDimensionName(int index, String name)
index
- index of the dimensionname
- of the dimension, as a pointer to a null-terminated character sequence.
\warning The string name must be null-terminated, and be at most 4096 bytes including the terminator.getDimensionName()
@NoException(value=true) public void setDimensionName(int index, @Cast(value="const char*") BytePointer name)
@NoException(value=true) public String getDimensionName(int index)
index
- index of the dimensionsetDimensionName()
Copyright © 2024. All rights reserved.