TensorRT 10.0.0
nvinfer1::IDimensionExpr Class Reference

An IDimensionExpr represents an integer expression constructed from constants, input dimensions, and binary operations. These expressions are can be used in overrides of IPluginV2DynamicExt::getOutputDimensions or IPluginV3OneBuild::getOutputShapes() to define output dimensions in terms of input dimensions. More...

#include <NvInferRuntime.h>

Inheritance diagram for nvinfer1::IDimensionExpr:
nvinfer1::INoCopy

Public Member Functions

bool isConstant () const noexcept
 Return true if expression is a build-time constant. More...
 
int64_t getConstantValue () const noexcept
 Get the value of the constant. More...
 
bool isSizeTensor () const noexcept
 Return true if this denotes the value of a size tensor. More...
 

Protected Member Functions

virtual ~IDimensionExpr () noexcept=default
 
- Protected Member Functions inherited from nvinfer1::INoCopy
 INoCopy ()=default
 
virtual ~INoCopy ()=default
 
 INoCopy (INoCopy const &other)=delete
 
INoCopyoperator= (INoCopy const &other)=delete
 
 INoCopy (INoCopy &&other)=delete
 
INoCopyoperator= (INoCopy &&other)=delete
 

Protected Attributes

apiv::VDimensionExpr * mImpl
 

Detailed Description

An IDimensionExpr represents an integer expression constructed from constants, input dimensions, and binary operations. These expressions are can be used in overrides of IPluginV2DynamicExt::getOutputDimensions or IPluginV3OneBuild::getOutputShapes() to define output dimensions in terms of input dimensions.

Warning
Do not inherit from this class, as doing so will break forward-compatibility of the API and ABI.
See also
DimensionOperation, IPluginV2DynamicExt::getOutputDimensions, IPluginV3OneBuild::getOutputShapes()

Constructor & Destructor Documentation

◆ ~IDimensionExpr()

virtual nvinfer1::IDimensionExpr::~IDimensionExpr ( )
protectedvirtualdefaultnoexcept

Member Function Documentation

◆ getConstantValue()

int64_t nvinfer1::IDimensionExpr::getConstantValue ( ) const
inlinenoexcept

Get the value of the constant.

If isConstant(), returns value of the constant. If !isConstant(), return std::numeric_limits<int64_t>::min().

◆ isConstant()

bool nvinfer1::IDimensionExpr::isConstant ( ) const
inlinenoexcept

Return true if expression is a build-time constant.

◆ isSizeTensor()

bool nvinfer1::IDimensionExpr::isSizeTensor ( ) const
inlinenoexcept

Return true if this denotes the value of a size tensor.

Returns
True if this was created with method IExprBuilder::declareSizeTensor, false otherwise

Member Data Documentation

◆ mImpl

apiv::VDimensionExpr* nvinfer1::IDimensionExpr::mImpl
protected

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