ExprMVNode
ExprMVNode
Section titled “ExprMVNode”#include <ncarray/expression/mvnode.hh>template<class MemTag = DevTag>struct ExprMVNodeDefined in src/lib/ncarray/expression/mvnode.hh:83
Inherits:
ExpressionTag
A multi-view array expression builder.
ExprMVNode is a host-only expression builder. It has no restrictions on the number, or type of arrays (e.g. operands including views from multiple arrays are supported).
List of all members
Section titled “List of all members”| Name | Kind | Owner |
|---|---|---|
layouts |
variable |
Declared here |
dtypes |
variable |
Declared here |
data |
variable |
Declared here |
instrs |
variable |
Declared here |
scalars |
variable |
Declared here |
soarray |
variable |
Declared here |
final_shape |
variable |
Declared here |
final_size |
variable |
Declared here |
expr_dtype |
variable |
Declared here |
work_dtype |
variable |
Declared here |
has_expr_dtype |
variable |
Declared here |
ExprMVNode |
function |
Declared here |
ExprMVNode |
function |
Declared here |
eval |
function |
Declared here |
apply_op |
function |
Declared here |
build_node |
function |
Declared here |
shape |
function |
Declared here |
size |
function |
Declared here |
ndim |
function |
Declared here |
dtype |
function |
Declared here |
operator- |
function |
Declared here |
operator++ |
function |
Declared here |
operator-- |
function |
Declared here |
operator! |
function |
Declared here |
operator+ |
function |
Declared here |
operator- |
function |
Declared here |
operator* |
function |
Declared here |
operator/ |
function |
Declared here |
operator% |
function |
Declared here |
operator== |
function |
Declared here |
operator!= |
function |
Declared here |
operator< |
function |
Declared here |
operator<= |
function |
Declared here |
operator> |
function |
Declared here |
operator>= |
function |
Declared here |
operator&& |
function |
Declared here |
| [`operator | `](#operator-59) | |
node_dtype |
function |
Declared here |
Public Attributes
Section titled “Public Attributes”| Return | Name | Description |
|---|---|---|
std::vector< SOArrayPolicy > |
layouts |
|
std::vector< DType > |
dtypes |
|
std::vector< void * > |
data |
|
std::vector< Instruction > |
instrs |
|
std::vector< Scalar > |
scalars |
|
bool |
soarray |
|
Metadata |
final_shape |
|
ssize_t |
final_size |
|
DType |
expr_dtype |
The DType for the final evaluated expression. |
DType |
work_dtype |
The DType for intermediate sub-expression evaluations. |
bool |
has_expr_dtype |
layouts
Section titled “layouts”std::vector< SOArrayPolicy > layoutsDefined in src/lib/ncarray/expression/mvnode.hh:84
dtypes
Section titled “dtypes”std::vector< DType > dtypesDefined in src/lib/ncarray/expression/mvnode.hh:85
std::vector< void * > dataDefined in src/lib/ncarray/expression/mvnode.hh:86
instrs
Section titled “instrs”std::vector< Instruction > instrsDefined in src/lib/ncarray/expression/mvnode.hh:87
scalars
Section titled “scalars”std::vector< Scalar > scalarsDefined in src/lib/ncarray/expression/mvnode.hh:88
soarray
Section titled “soarray”bool soarray { true }Defined in src/lib/ncarray/expression/mvnode.hh:89
final_shape
Section titled “final_shape”Metadata final_shapeDefined in src/lib/ncarray/expression/mvnode.hh:91
final_size
Section titled “final_size”ssize_t final_size { 0 }Defined in src/lib/ncarray/expression/mvnode.hh:92
expr_dtype
Section titled “expr_dtype”DType expr_dtypeDefined in src/lib/ncarray/expression/mvnode.hh:93
The DType for the final evaluated expression.
work_dtype
Section titled “work_dtype”DType work_dtypeDefined in src/lib/ncarray/expression/mvnode.hh:94
The DType for intermediate sub-expression evaluations.
has_expr_dtype
Section titled “has_expr_dtype”bool has_expr_dtype { false }Defined in src/lib/ncarray/expression/mvnode.hh:95
Public Methods
Section titled “Public Methods”| Return | Name | Description |
|---|---|---|
ExprMVNode |
Default constructor provided as the converting one below exists. | |
ExprMVNode inline |
A converting constructor is provided for ergonomics. | |
DestT |
eval const inline |
|
DestT |
apply_op const inline |
|
auto |
build_node inline |
|
const ssize_t * |
shape const inline |
|
ssize_t |
size const inline |
|
ssize_t |
ndim const inline |
|
DType |
dtype const inline |
|
auto |
operator- inline |
|
auto |
operator++ inline |
|
auto |
operator-- inline |
|
auto |
operator! inline |
|
auto |
operator+ inline |
|
auto |
operator- inline |
|
auto |
operator* inline |
|
auto |
operator/ inline |
|
auto |
operator% inline |
|
auto |
operator== inline |
|
auto |
operator!= inline |
|
auto |
operator< inline |
|
auto |
operator<= inline |
|
auto |
operator> inline |
|
auto |
operator>= inline |
|
auto |
operator&& inline |
|
auto |
[`operator |
ExprMVNode
Section titled “ExprMVNode”ExprMVNode() = defaultDefined in src/lib/ncarray/expression/mvnode.hh:100
Default constructor provided as the converting one below exists.
ExprMVNode
Section titled “ExprMVNode”inline
template<AnyExpressionOrScalar Node> inline ExprMVNode(const Node & node)Defined in src/lib/ncarray/expression/mvnode.hh:109
A converting constructor is provided for ergonomics.
This mostly allows inplace operators to work without end-users needing to think or know about the underlying expression tape/tree/node/etc….
const inline
template<typename DestT, typename Coords> inline DestT eval(const Coords & coords) constDefined in src/lib/ncarray/expression/mvnode.hh:114
apply_op
Section titled “apply_op”const inline
template<typename DestT> inline DestT apply_op(DestT res, DestT leaf, OpCode op) constDefined in src/lib/ncarray/expression/mvnode.hh:157
build_node
Section titled “build_node”inline
template<AnyExpressionOrScalar Node> inline auto build_node(const Node & node)Defined in src/lib/ncarray/expression/mvnode.hh:181
const inline
inline const ssize_t * shape() constDefined in src/lib/ncarray/expression/mvnode.hh:266
const inline
inline ssize_t size() constDefined in src/lib/ncarray/expression/mvnode.hh:269
const inline
inline ssize_t ndim() constDefined in src/lib/ncarray/expression/mvnode.hh:272
const inline
inline DType dtype() constDefined in src/lib/ncarray/expression/mvnode.hh:275
operator-
Section titled “operator-”inline
inline auto operator-()Defined in src/lib/ncarray/expression/mvnode.hh:279
operator++
Section titled “operator++”inline
inline auto operator++()Defined in src/lib/ncarray/expression/mvnode.hh:286
operator–
Section titled “operator–”inline
inline auto operator--()Defined in src/lib/ncarray/expression/mvnode.hh:293
operator!
Section titled “operator!”inline
inline auto operator!()Defined in src/lib/ncarray/expression/mvnode.hh:300
operator+
Section titled “operator+”inline
template<AnyExpressionOrScalar RightNode> inline auto operator+(const RightNode & right)Defined in src/lib/ncarray/expression/mvnode.hh:310
operator-
Section titled “operator-”inline
template<AnyExpressionOrScalar RightNode> inline auto operator-(const RightNode & right)Defined in src/lib/ncarray/expression/mvnode.hh:320
operator*
Section titled “operator*”inline
template<AnyExpressionOrScalar RightNode> inline auto operator*(const RightNode & right)Defined in src/lib/ncarray/expression/mvnode.hh:330
operator/
Section titled “operator/”inline
template<AnyExpressionOrScalar RightNode> inline auto operator/(const RightNode & right)Defined in src/lib/ncarray/expression/mvnode.hh:340
operator%
Section titled “operator%”inline
template<AnyExpressionOrScalar RightNode> inline auto operator%(const RightNode & right)Defined in src/lib/ncarray/expression/mvnode.hh:350
operator==
Section titled “operator==”inline
template<AnyExpressionOrScalar RightNode> inline auto operator==(const RightNode & right)Defined in src/lib/ncarray/expression/mvnode.hh:362
operator!=
Section titled “operator!=”inline
template<AnyExpressionOrScalar RightNode> inline auto operator!=(const RightNode & right)Defined in src/lib/ncarray/expression/mvnode.hh:372
operator<
Section titled “operator<”inline
template<AnyExpressionOrScalar RightNode> inline auto operator<(const RightNode & right)Defined in src/lib/ncarray/expression/mvnode.hh:382
operator<=
Section titled “operator<=”inline
template<AnyExpressionOrScalar RightNode> inline auto operator<=(const RightNode & right)Defined in src/lib/ncarray/expression/mvnode.hh:392
operator>
Section titled “operator>”inline
template<AnyExpressionOrScalar RightNode> inline auto operator>(const RightNode & right)Defined in src/lib/ncarray/expression/mvnode.hh:402
operator>=
Section titled “operator>=”inline
template<AnyExpressionOrScalar RightNode> inline auto operator>=(const RightNode & right)Defined in src/lib/ncarray/expression/mvnode.hh:412
operator&&
Section titled “operator&&”inline
template<AnyExpressionOrScalar RightNode> inline auto operator&&(const RightNode & right)Defined in src/lib/ncarray/expression/mvnode.hh:424
operator||
Section titled “operator||”inline
template<AnyExpressionOrScalar RightNode> inline auto operator||(const RightNode & right)Defined in src/lib/ncarray/expression/mvnode.hh:434
Private Methods
Section titled “Private Methods”| Return | Name | Description |
|---|---|---|
DType |
node_dtype const inline |
node_dtype
Section titled “node_dtype”const inline
template<class Node> inline DType node_dtype(const Node & node) constDefined in src/lib/ncarray/expression/mvnode.hh:445