Skip to content

ExprMVNode

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

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

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


std::vector< DType > dtypes

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


std::vector< void * > data

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


std::vector< Instruction > instrs

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


std::vector< Scalar > scalars

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


bool soarray { true }

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


Metadata final_shape

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


ssize_t final_size { 0 }

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


DType expr_dtype

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

The DType for the final evaluated expression.


DType work_dtype

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

The DType for intermediate sub-expression evaluations.


bool has_expr_dtype { false }

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

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

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

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


const inline

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

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


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

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


const inline

inline ssize_t size() const

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


const inline

inline ssize_t ndim() const

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


const inline

inline DType dtype() const

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


inline

inline auto operator-()

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


inline

inline auto operator++()

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


inline

inline auto operator--()

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


inline

inline auto operator!()

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


inline

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

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


inline

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

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


inline

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

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


inline

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

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


inline

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

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


inline

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

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


inline

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

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


inline

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

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


inline

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

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


inline

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

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


inline

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

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


inline

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

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


inline

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

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

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