Halide 19.0.0
Halide compiler and libraries
|
Represent an associative op with its identity. More...
#include <AssociativeOpsTable.h>
Public Member Functions | |
AssociativePattern ()=default | |
AssociativePattern (size_t size) | |
AssociativePattern (const std::vector< Expr > &ops, const std::vector< Expr > &ids, bool is_commutative) | |
AssociativePattern (Expr op, Expr id, bool is_commutative) | |
bool | operator== (const AssociativePattern &other) const |
bool | operator!= (const AssociativePattern &other) const |
size_t | size () const |
bool | commutative () const |
Public Attributes | |
std::vector< Expr > | ops |
Contain the binary operators for each dimension of the associative op. | |
std::vector< Expr > | identities |
Contain the identities for each dimension of the associative op. | |
bool | is_commutative = false |
Indicate if the associative op is also commutative. | |
Represent an associative op with its identity.
The op may be multi-dimensional, e.g. complex multiplication. 'is_commutative' is set to true if the op is also commutative in addition to being associative.
For example, complex multiplication is represented as:
Definition at line 31 of file AssociativeOpsTable.h.
|
default |
|
inline |
Definition at line 40 of file AssociativeOpsTable.h.
|
inline |
Definition at line 43 of file AssociativeOpsTable.h.
|
inline |
Definition at line 46 of file AssociativeOpsTable.h.
|
inline |
Definition at line 50 of file AssociativeOpsTable.h.
References Halide::Internal::equal(), identities, is_commutative, ops, and size().
|
inline |
Definition at line 61 of file AssociativeOpsTable.h.
|
inline |
Definition at line 64 of file AssociativeOpsTable.h.
References ops.
Referenced by operator==(), and Halide::Internal::AssociativeOp::size().
|
inline |
Definition at line 67 of file AssociativeOpsTable.h.
References is_commutative.
std::vector<Expr> Halide::Internal::AssociativePattern::ops |
Contain the binary operators for each dimension of the associative op.
Definition at line 33 of file AssociativeOpsTable.h.
Referenced by operator==(), and size().
std::vector<Expr> Halide::Internal::AssociativePattern::identities |
Contain the identities for each dimension of the associative op.
Definition at line 35 of file AssociativeOpsTable.h.
Referenced by operator==().
bool Halide::Internal::AssociativePattern::is_commutative = false |
Indicate if the associative op is also commutative.
Definition at line 37 of file AssociativeOpsTable.h.
Referenced by Halide::Internal::AssociativeOp::commutative(), commutative(), and operator==().