Halide 21.0.0
Halide compiler and libraries
|
#include <Dimension.h>
Public Member Functions | |
Expr | min () const |
Get an expression representing the minimum coordinates of this image parameter in the given dimension. | |
Expr | extent () const |
Get an expression representing the extent of this image parameter in the given dimension. | |
Expr | max () const |
Get an expression representing the maximum coordinates of this image parameter in the given dimension. | |
Expr | stride () const |
Get an expression representing the stride of this image in the given dimension. | |
Dimension | set_min (const Expr &min) |
Set the min in a given dimension to equal the given expression. | |
Dimension | set_extent (const Expr &extent) |
Set the extent in a given dimension to equal the given expression. | |
Dimension | set_stride (const Expr &stride) |
Set the stride in a given dimension to equal the given value. | |
Dimension | set_bounds (const Expr &min, const Expr &extent) |
Set the min and extent in one call. | |
Dimension | set_estimate (const Expr &min, const Expr &extent) |
Set the min and extent estimates in one call. | |
Expr | min_estimate () const |
Expr | extent_estimate () const |
Dimension | dim (int i) const |
Get a different dimension of the same buffer. |
Definition at line 16 of file Dimension.h.
Expr Halide::Internal::Dimension::min | ( | ) | const |
Get an expression representing the minimum coordinates of this image parameter in the given dimension.
Referenced by set_bounds(), set_estimate(), and set_min().
Expr Halide::Internal::Dimension::extent | ( | ) | const |
Get an expression representing the extent of this image parameter in the given dimension.
Referenced by set_bounds(), set_estimate(), and set_extent().
Expr Halide::Internal::Dimension::max | ( | ) | const |
Get an expression representing the maximum coordinates of this image parameter in the given dimension.
Expr Halide::Internal::Dimension::stride | ( | ) | const |
Get an expression representing the stride of this image in the given dimension.
Referenced by set_stride().
Set the min in a given dimension to equal the given expression.
Setting the mins to zero may simplify some addressing math.
References min().
Set the extent in a given dimension to equal the given expression.
Images passed in that fail this check will generate a runtime error. Returns a reference to the ImageParam so that these calls may be chained.
This may help the compiler generate better code. E.g:
tells the compiler that dimension zero must be of extent 100, which may result in simplification of boundary checks. The value can be an arbitrary expression:
declares that im is a square image (of unknown size), whereas:
tells the compiler that the extent is a multiple of 32.
References extent().
Set the stride in a given dimension to equal the given value.
This is particularly helpful to set when vectorizing. Known strides for the vectorized dimension generate better code.
References stride().
Expr Halide::Internal::Dimension::min_estimate | ( | ) | const |
Expr Halide::Internal::Dimension::extent_estimate | ( | ) | const |
Dimension Halide::Internal::Dimension::dim | ( | int | i | ) | const |
Get a different dimension of the same buffer.