mxnet
Classes | Namespaces | Functions | Variables
expression.h File Reference

definitions of abstract expressions and expressions template More...

#include "./base.h"
Include dependency graph for expression.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mshadow::expr::ExpEngine< SV, RV, DType >
 the engine that dispatches simple operations More...
 
struct  mshadow::expr::Exp< SubType, DType, exp_type >
 defines how expression exp can be evaluated and stored into dst More...
 
struct  mshadow::expr::ScalarExp< DType >
 scalar expression More...
 
struct  mshadow::expr::TypecastExp< DstDType, SrcDType, EType, etype >
 typecast expression, cast the type of elements More...
 
struct  mshadow::expr::TransposeExp< EType, DType >
 represent a transpose expression of a container More...
 
class  mshadow::expr::RValueExp< Container, DType >
 base class of all rvalues More...
 
struct  mshadow::expr::DotExp< TA, TB, ltrans, rtrans, DType >
 matrix multiplication expression dot(lhs[.T], rhs[.T]) More...
 
struct  mshadow::expr::TernaryMapExp< OP, TA, TB, TC, DType, etype >
 ternary map expression More...
 
struct  mshadow::expr::BinaryMapExp< OP, TA, TB, DType, etype >
 binary map expression lhs [op] rhs More...
 
struct  mshadow::expr::UnaryMapExp< OP, TA, DType, etype >
 unary map expression op(src) More...
 

Namespaces

 mshadow
 overloaded + operator between half_t and bf16_t
 
 mshadow::expr
 namespace for abstract expressions and expressions template, have no dependency on tensor.h, These data structure takes no charge in computations, they are only used to define operations and represent expression in a symbolic way
 
 mshadow::expr::type
 type of expressions
 

Functions

template<typename DType >
ScalarExp< DType > mshadow::expr::scalar (DType s)
 create an scalar expression More...
 
template<typename DstDType , typename SrcDType , typename EType , int etype>
TypecastExp< DstDType, SrcDType, EType,(etype|type::kMapper)> mshadow::expr::tcast (const Exp< EType, SrcDType, etype > &exp)
 create an scalar expression More...
 
template<typename TA , typename TB , typename DType >
DotExp< TA, TB, false, false, DType > mshadow::expr::dot (const RValueExp< TA, DType > &lhs, const RValueExp< TB, DType > &rhs)
 dot operator def More...
 
template<typename TA , typename TB , typename DType >
DotExp< TA, TB, true, false, DType > mshadow::expr::dot (const TransposeExp< TA, DType > &lhs, const RValueExp< TB, DType > &rhs)
 dot operator def More...
 
template<typename TA , typename TB , typename DType >
DotExp< TA, TB, false, true, DType > mshadow::expr::dot (const RValueExp< TA, DType > &lhs, const TransposeExp< TB, DType > &rhs)
 dot operator def More...
 
template<typename TA , typename TB , typename DType >
DotExp< TA, TB, true, true, DType > mshadow::expr::dot (const TransposeExp< TA, DType > &lhs, const TransposeExp< TB, DType > &rhs)
 dot operator def More...
 
template<bool transpose_left, bool transpose_right, typename TA , typename TB , typename DType >
DotExp< TA, TB, transpose_left, transpose_right, DType > mshadow::expr::batch_dot (const RValueExp< TA, DType > &lhs, const RValueExp< TB, DType > &rhs)
 batch_dot operator def More...
 
template<typename OP , typename TA , typename TB , typename TC , typename DType , int ta, int tb, int tc>
TernaryMapExp< OP, TA, TB, TC, DType,(ta|tb|tc|type::kMapper)> mshadow::expr::MakeExp (const Exp< TA, DType, ta > &item1, const Exp< TB, DType, tb > &item2, const Exp< TC, DType, tc > &item3)
 make expression More...
 
template<typename OP , typename TA , typename TB , typename TC , typename DType , int ta, int tb, int tc>
TernaryMapExp< OP, TA, TB, TC, DType,(ta|tb|tc|type::kMapper)> mshadow::expr::F (const Exp< TA, DType, ta > &item1, const Exp< TB, DType, tb > &item2, const Exp< TC, DType, tc > &item3)
 short hand for MakeExp, usage F<op>(item1,item2,item3). create a ternary operation expression More...
 
template<typename OP , typename TA , typename TB , typename DType , int ta, int tb>
BinaryMapExp< OP, TA, TB, DType,(ta|tb|type::kMapper)> mshadow::expr::MakeExp (const Exp< TA, DType, ta > &lhs, const Exp< TB, DType, tb > &rhs)
 make expression More...
 
template<typename OP , typename TA , typename TB , typename DType , int ta, int tb>
BinaryMapExp< OP, TA, TB, DType,(ta|tb|type::kMapper)> mshadow::expr::F (const Exp< TA, DType, ta > &lhs, const Exp< TB, DType, tb > &rhs)
 short hand for MakeExp, usage F<op>(lhs, rhs). create a binary operation expression More...
 
template<typename TA , typename TB , typename DType , int ta, int tb>
BinaryMapExp< op::plus, TA, TB, DType,(ta|tb|type::kMapper)> mshadow::expr::operator+ (const Exp< TA, DType, ta > &lhs, const Exp< TB, DType, tb > &rhs)
 operator overload More...
 
template<typename TA , typename TB , typename DType , int ta, int tb>
BinaryMapExp< op::minus, TA, TB, DType,(ta|tb|type::kMapper)> mshadow::expr::operator- (const Exp< TA, DType, ta > &lhs, const Exp< TB, DType, tb > &rhs)
 operator overload More...
 
template<typename TA , typename TB , typename DType , int ta, int tb>
BinaryMapExp< op::mul, TA, TB, DType,(ta|tb|type::kMapper)> mshadow::expr::operator* (const Exp< TA, DType, ta > &lhs, const Exp< TB, DType, tb > &rhs)
 operator overload More...
 
template<typename TA , typename TB , typename DType , int ta, int tb>
BinaryMapExp< op::div, TA, TB, DType,(ta|tb|type::kMapper)> mshadow::expr::operator/ (const Exp< TA, DType, ta > &lhs, const Exp< TB, DType, tb > &rhs)
 operator overload More...
 
template<typename OP , typename TA , typename DType , int ta>
UnaryMapExp< OP, TA, DType,(ta|type::kMapper)> mshadow::expr::MakeExp (const Exp< TA, DType, ta > &src)
 make expression More...
 
template<typename OP , typename TA , typename DType , int ta>
UnaryMapExp< OP, TA, DType,(ta|type::kMapper)> mshadow::expr::F (const Exp< TA, DType, ta > &src)
 short hand for MakeExp, usage F<op>(src), create a unary operation expression More...
 

Variables

const int mshadow::expr::type::kRValue = 0
 this expression directly correspnds to a data class, can be used to assign data More...
 
const int mshadow::expr::type::kMapper = 1
 expression contains element-wise tensor operations, map a expression to same shape More...
 
const int mshadow::expr::type::kChainer = 3
 expression that can be chained with other expressiones Usually it have function Eval(i,j) defined, which pulls the result (i, j) from input expression and output the result at certain position. More...
 
const int mshadow::expr::type::kComplex = 7
 othercase: e.g dot product More...
 

Detailed Description

definitions of abstract expressions and expressions template

Copyright (c) 2014 by Contributors

Author
Tianqi Chen, Bing Xu