ExprMVNode
ExprMVNode
Section titled “ExprMVNode”#include <mvnode.hh>template<class MemTag = DevTag>struct ExprMVNodeDefined in src/lib/ncarray/expression/mvnode.hh:99
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:100
dtypes
Section titled “dtypes”std::vector< DType > dtypesDefined in src/lib/ncarray/expression/mvnode.hh:101
std::vector< void * > dataDefined in src/lib/ncarray/expression/mvnode.hh:102
instrs
Section titled “instrs”std::vector< Instruction > instrsDefined in src/lib/ncarray/expression/mvnode.hh:103
scalars
Section titled “scalars”std::vector< Scalar > scalarsDefined in src/lib/ncarray/expression/mvnode.hh:104
soarray
Section titled “soarray”bool soarray { true }Defined in src/lib/ncarray/expression/mvnode.hh:105
final_shape
Section titled “final_shape”Metadata final_shapeDefined in src/lib/ncarray/expression/mvnode.hh:107
final_size
Section titled “final_size”ssize_t final_size { 0 }Defined in src/lib/ncarray/expression/mvnode.hh:108
expr_dtype
Section titled “expr_dtype”DType expr_dtypeDefined in src/lib/ncarray/expression/mvnode.hh:109
The DType for the final evaluated expression.
work_dtype
Section titled “work_dtype”DType work_dtypeDefined in src/lib/ncarray/expression/mvnode.hh:110
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:111
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:116
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:125
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:130
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:173
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:197
const inline
inline const ssize_t * shape() constDefined in src/lib/ncarray/expression/mvnode.hh:282
const inline
inline ssize_t size() constDefined in src/lib/ncarray/expression/mvnode.hh:285
const inline
inline ssize_t ndim() constDefined in src/lib/ncarray/expression/mvnode.hh:288
const inline
inline DType dtype() constDefined in src/lib/ncarray/expression/mvnode.hh:291
operator-
Section titled “operator-”inline
inline auto operator-()Defined in src/lib/ncarray/expression/mvnode.hh:295
operator++
Section titled “operator++”inline
inline auto operator++()Defined in src/lib/ncarray/expression/mvnode.hh:302
operator–
Section titled “operator–”inline
inline auto operator--()Defined in src/lib/ncarray/expression/mvnode.hh:309
operator!
Section titled “operator!”inline
inline auto operator!()Defined in src/lib/ncarray/expression/mvnode.hh:316
operator+
Section titled “operator+”inline
template<AnyExpressionOrScalar RightNode> inline auto operator+(const RightNode & right)Defined in src/lib/ncarray/expression/mvnode.hh:326
operator-
Section titled “operator-”inline
template<AnyExpressionOrScalar RightNode> inline auto operator-(const RightNode & right)Defined in src/lib/ncarray/expression/mvnode.hh:336
operator*
Section titled “operator*”inline
template<AnyExpressionOrScalar RightNode> inline auto operator*(const RightNode & right)Defined in src/lib/ncarray/expression/mvnode.hh:346
operator/
Section titled “operator/”inline
template<AnyExpressionOrScalar RightNode> inline auto operator/(const RightNode & right)Defined in src/lib/ncarray/expression/mvnode.hh:356
operator%
Section titled “operator%”inline
template<AnyExpressionOrScalar RightNode> inline auto operator%(const RightNode & right)Defined in src/lib/ncarray/expression/mvnode.hh:366
operator==
Section titled “operator==”inline
template<AnyExpressionOrScalar RightNode> inline auto operator==(const RightNode & right)Defined in src/lib/ncarray/expression/mvnode.hh:378
operator!=
Section titled “operator!=”inline
template<AnyExpressionOrScalar RightNode> inline auto operator!=(const RightNode & right)Defined in src/lib/ncarray/expression/mvnode.hh:388
operator<
Section titled “operator<”inline
template<AnyExpressionOrScalar RightNode> inline auto operator<(const RightNode & right)Defined in src/lib/ncarray/expression/mvnode.hh:398
operator<=
Section titled “operator<=”inline
template<AnyExpressionOrScalar RightNode> inline auto operator<=(const RightNode & right)Defined in src/lib/ncarray/expression/mvnode.hh:408
operator>
Section titled “operator>”inline
template<AnyExpressionOrScalar RightNode> inline auto operator>(const RightNode & right)Defined in src/lib/ncarray/expression/mvnode.hh:418
operator>=
Section titled “operator>=”inline
template<AnyExpressionOrScalar RightNode> inline auto operator>=(const RightNode & right)Defined in src/lib/ncarray/expression/mvnode.hh:428
operator&&
Section titled “operator&&”inline
template<AnyExpressionOrScalar RightNode> inline auto operator&&(const RightNode & right)Defined in src/lib/ncarray/expression/mvnode.hh:440
operator||
Section titled “operator||”inline
template<AnyExpressionOrScalar RightNode> inline auto operator||(const RightNode & right)Defined in src/lib/ncarray/expression/mvnode.hh:450
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:461