Halide 19.0.0
Halide compiler and libraries
|
Construct a new vector by taking elements from another sequence of vectors. More...
#include <IR.h>
Public Member Functions | |
bool | is_interleave () const |
Check if this shuffle is an interleaving of the vector arguments. | |
bool | is_broadcast () const |
Check if this shuffle can be represented as a repeating pattern that repeats the same shuffle of the single input vector some number of times. | |
int | broadcast_factor () const |
bool | is_concat () const |
Check if this shuffle is a concatenation of the vector arguments. | |
bool | is_extract_element () const |
Check if this shuffle is extracting a scalar from the vector arguments. | |
bool | is_slice () const |
Check if this shuffle is a contiguous strict subset of the vector arguments, and if so, the offset and stride of the slice. | |
int | slice_begin () const |
Check if this shuffle is a contiguous strict subset of the vector arguments, and if so, the offset and stride of the slice. | |
int | slice_stride () const |
Check if this shuffle is a contiguous strict subset of the vector arguments, and if so, the offset and stride of the slice. | |
Public Member Functions inherited from Halide::Internal::ExprNode< Shuffle > | |
void | accept (IRVisitor *v) const override |
We use the visitor pattern to traverse IR nodes throughout the compiler, so we have a virtual accept method which accepts visitors. | |
Expr | mutate_expr (IRMutator *v) const override |
ExprNode () | |
~ExprNode () override=default | |
Public Member Functions inherited from Halide::Internal::BaseExprNode | |
BaseExprNode (IRNodeType t) | |
Public Member Functions inherited from Halide::Internal::IRNode | |
IRNode (IRNodeType t) | |
virtual | ~IRNode ()=default |
Static Public Member Functions | |
static Expr | make (const std::vector< Expr > &vectors, const std::vector< int > &indices) |
static Expr | make_interleave (const std::vector< Expr > &vectors) |
Convenience constructor for making a shuffle representing an interleaving of vectors of the same length. | |
static Expr | make_concat (const std::vector< Expr > &vectors) |
Convenience constructor for making a shuffle representing a concatenation of the vectors. | |
static Expr | make_broadcast (Expr vector, int factor) |
Convenience constructor for making a shuffle representing a broadcast of a vector. | |
static Expr | make_slice (Expr vector, int begin, int stride, int size) |
Convenience constructor for making a shuffle representing a contiguous subset of a vector. | |
static Expr | make_extract_element (Expr vector, int i) |
Convenience constructor for making a shuffle representing extracting a single element. | |
Public Attributes | |
std::vector< Expr > | vectors |
std::vector< int > | indices |
Indices indicating which vector element to place into the result. | |
Public Attributes inherited from Halide::Internal::BaseExprNode | |
Type | type |
Public Attributes inherited from Halide::Internal::IRNode | |
RefCount | ref_count |
These classes are all managed with intrusive reference counting, so we also track a reference count. | |
IRNodeType | node_type |
Each IR node subclass has a unique identifier. | |
Static Public Attributes | |
static const IRNodeType | _node_type = IRNodeType::Shuffle |
Construct a new vector by taking elements from another sequence of vectors.
|
static |
|
static |
Convenience constructor for making a shuffle representing an interleaving of vectors of the same length.
Convenience constructor for making a shuffle representing a concatenation of the vectors.
Convenience constructor for making a shuffle representing a broadcast of a vector.
|
static |
Convenience constructor for making a shuffle representing a contiguous subset of a vector.
Referenced by Halide::Internal::IRMatcher::SliceOp< Vec, Base, Stride, Lanes >::make().
Convenience constructor for making a shuffle representing extracting a single element.
bool Halide::Internal::Shuffle::is_interleave | ( | ) | const |
Check if this shuffle is an interleaving of the vector arguments.
bool Halide::Internal::Shuffle::is_broadcast | ( | ) | const |
Check if this shuffle can be represented as a repeating pattern that repeats the same shuffle of the single input vector some number of times.
For example: 0, 3, 1, 1, 0, 3, 1, 1, ....., 0, 3, 1, 1
int Halide::Internal::Shuffle::broadcast_factor | ( | ) | const |
bool Halide::Internal::Shuffle::is_concat | ( | ) | const |
Check if this shuffle is a concatenation of the vector arguments.
bool Halide::Internal::Shuffle::is_slice | ( | ) | const |
Check if this shuffle is a contiguous strict subset of the vector arguments, and if so, the offset and stride of the slice.
Referenced by Halide::Internal::IRMatcher::SliceOp< Vec, Base, Stride, Lanes >::match().
|
inline |
Check if this shuffle is a contiguous strict subset of the vector arguments, and if so, the offset and stride of the slice.
Definition at line 906 of file IR.h.
References indices.
Referenced by Halide::Internal::IRMatcher::SliceOp< Vec, Base, Stride, Lanes >::match().
|
inline |
Check if this shuffle is a contiguous strict subset of the vector arguments, and if so, the offset and stride of the slice.
Definition at line 909 of file IR.h.
References indices.
Referenced by Halide::Internal::IRMatcher::SliceOp< Vec, Base, Stride, Lanes >::match().
bool Halide::Internal::Shuffle::is_extract_element | ( | ) | const |
Check if this shuffle is extracting a scalar from the vector arguments.
std::vector<Expr> Halide::Internal::Shuffle::vectors |
Definition at line 856 of file IR.h.
Referenced by Halide::Internal::IRMatcher::SliceOp< Vec, Base, Stride, Lanes >::match().
std::vector<int> Halide::Internal::Shuffle::indices |
Indices indicating which vector element to place into the result.
The elements are numbered by their position in the concatenation of the vector arguments.
Definition at line 861 of file IR.h.
Referenced by slice_begin(), and slice_stride().
|
static |