autoppl
v0.8
A C++ template library for probabilistic programming
|
#include <binary.hpp>
Public Types | |
using | value_t = std::common_type_t< typename util::var_expr_traits< lhs_t >::value_t, typename util::var_expr_traits< rhs_t >::value_t > |
using | shape_t = ad::util::max_shape_t< typename util::shape_traits< lhs_t >::shape_t, typename util::shape_traits< rhs_t >::shape_t > |
Public Member Functions | |
BinaryNode (const lhs_t &lhs, const rhs_t &rhs) | |
template<class Func > | |
void | traverse (Func &&) const |
auto | get () const |
auto | eval () |
size_t | size () const |
size_t | rows () const |
size_t | cols () const |
template<class PtrPackType > | |
auto | ad (const PtrPackType &pack) const |
template<class PtrPackType > | |
void | bind (const PtrPackType &pack) |
void | activate_refcnt () const |
Public Member Functions inherited from ppl::util::BaseCRTP< BinaryNode< BinaryOp, LHSVarExprType, RHSVarExprType > > | |
BinaryNode< BinaryOp, LHSVarExprType, RHSVarExprType > & | self () |
const BinaryNode< BinaryOp, LHSVarExprType, RHSVarExprType > & | self () const |
Static Public Attributes | |
static constexpr bool | has_param |
BinaryNode is a generic object representing some binary operation between two variable expressions. For example, +,-,*,/ are four common binary operations.
If both variable expressions are of fixed size, then it may choose to perform some optimization, in which case, the size, i.e. number of elements, has to be equal.
BinaryOp | binary operation policy containing a static member function "fmap(T x, U y)" that evaluates the corresponding binary operation on the parameters. |
LHSVarExprType | lhs variable expression type |
RHSVarExprType | rhs variable expression type |
using ppl::expr::var::BinaryNode< BinaryOp, LHSVarExprType, RHSVarExprType >::shape_t = ad::util::max_shape_t< typename util::shape_traits<lhs_t>::shape_t, typename util::shape_traits<rhs_t>::shape_t > |
using ppl::expr::var::BinaryNode< BinaryOp, LHSVarExprType, RHSVarExprType >::value_t = std::common_type_t< typename util::var_expr_traits<lhs_t>::value_t, typename util::var_expr_traits<rhs_t>::value_t > |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
staticconstexpr |