Skip to content

ExprMVNode

#include <mvnode.hh>
template<class MemTag = DevTag>
struct ExprMVNode

Defined 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).

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
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

std::vector< SOArrayPolicy > layouts

Defined in src/lib/ncarray/expression/mvnode.hh:100


std::vector< DType > dtypes

Defined in src/lib/ncarray/expression/mvnode.hh:101


std::vector< void * > data

Defined in src/lib/ncarray/expression/mvnode.hh:102


std::vector< Instruction > instrs

Defined in src/lib/ncarray/expression/mvnode.hh:103


std::vector< Scalar > scalars

Defined in src/lib/ncarray/expression/mvnode.hh:104


bool soarray { true }

Defined in src/lib/ncarray/expression/mvnode.hh:105


Metadata final_shape

Defined in src/lib/ncarray/expression/mvnode.hh:107


ssize_t final_size { 0 }

Defined in src/lib/ncarray/expression/mvnode.hh:108


DType expr_dtype

Defined in src/lib/ncarray/expression/mvnode.hh:109

The DType for the final evaluated expression.


DType work_dtype

Defined in src/lib/ncarray/expression/mvnode.hh:110

The DType for intermediate sub-expression evaluations.


bool has_expr_dtype { false }

Defined in src/lib/ncarray/expression/mvnode.hh:111

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() = default

Defined in src/lib/ncarray/expression/mvnode.hh:116

Default constructor provided as the converting one below exists.


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) const

Defined in src/lib/ncarray/expression/mvnode.hh:130


const inline

template<typename DestT> inline DestT apply_op(DestT res, DestT leaf, OpCode op) const

Defined in src/lib/ncarray/expression/mvnode.hh:173


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() const

Defined in src/lib/ncarray/expression/mvnode.hh:282


const inline

inline ssize_t size() const

Defined in src/lib/ncarray/expression/mvnode.hh:285


const inline

inline ssize_t ndim() const

Defined in src/lib/ncarray/expression/mvnode.hh:288


const inline

inline DType dtype() const

Defined in src/lib/ncarray/expression/mvnode.hh:291


inline

inline auto operator-()

Defined in src/lib/ncarray/expression/mvnode.hh:295


inline

inline auto operator++()

Defined in src/lib/ncarray/expression/mvnode.hh:302


inline

inline auto operator--()

Defined in src/lib/ncarray/expression/mvnode.hh:309


inline

inline auto operator!()

Defined in src/lib/ncarray/expression/mvnode.hh:316


inline

template<AnyExpressionOrScalar RightNode> inline auto operator+(const RightNode & right)

Defined in src/lib/ncarray/expression/mvnode.hh:326


inline

template<AnyExpressionOrScalar RightNode> inline auto operator-(const RightNode & right)

Defined in src/lib/ncarray/expression/mvnode.hh:336


inline

template<AnyExpressionOrScalar RightNode> inline auto operator*(const RightNode & right)

Defined in src/lib/ncarray/expression/mvnode.hh:346


inline

template<AnyExpressionOrScalar RightNode> inline auto operator/(const RightNode & right)

Defined in src/lib/ncarray/expression/mvnode.hh:356


inline

template<AnyExpressionOrScalar RightNode> inline auto operator%(const RightNode & right)

Defined in src/lib/ncarray/expression/mvnode.hh:366


inline

template<AnyExpressionOrScalar RightNode> inline auto operator==(const RightNode & right)

Defined in src/lib/ncarray/expression/mvnode.hh:378


inline

template<AnyExpressionOrScalar RightNode> inline auto operator!=(const RightNode & right)

Defined in src/lib/ncarray/expression/mvnode.hh:388


inline

template<AnyExpressionOrScalar RightNode> inline auto operator<(const RightNode & right)

Defined in src/lib/ncarray/expression/mvnode.hh:398


inline

template<AnyExpressionOrScalar RightNode> inline auto operator<=(const RightNode & right)

Defined in src/lib/ncarray/expression/mvnode.hh:408


inline

template<AnyExpressionOrScalar RightNode> inline auto operator>(const RightNode & right)

Defined in src/lib/ncarray/expression/mvnode.hh:418


inline

template<AnyExpressionOrScalar RightNode> inline auto operator>=(const RightNode & right)

Defined in src/lib/ncarray/expression/mvnode.hh:428


inline

template<AnyExpressionOrScalar RightNode> inline auto operator&&(const RightNode & right)

Defined in src/lib/ncarray/expression/mvnode.hh:440


inline

template<AnyExpressionOrScalar RightNode> inline auto operator||(const RightNode & right)

Defined in src/lib/ncarray/expression/mvnode.hh:450

Return Name Description
DType node_dtype const inline

const inline

template<class Node> inline DType node_dtype(const Node & node) const

Defined in src/lib/ncarray/expression/mvnode.hh:461