autoppl
v0.8
A C++ template library for probabilistic programming
|
Go to the documentation of this file.
8 template <
class LHSExprType
14 using lhs_t = LHSExprType;
15 using rhs_t = RHSExprType;
17 static_assert(util::is_var_expr_v<lhs_t>);
18 static_assert(util::is_var_expr_v<rhs_t>);
29 : lhs_{lhs}, rhs_{rhs}
46 auto get()
const {
return rhs_.get(); }
53 constexpr
size_t size()
const {
return rhs_.size(); }
54 constexpr
size_t rows()
const {
return rhs_.rows(); }
55 constexpr
size_t cols()
const {
return rhs_.cols(); }
57 template <
class PtrPackType>
58 auto ad(
const PtrPackType& pack)
const
60 return (lhs_.ad(pack), rhs_.ad(pack));
63 template <
class PtrPackType>
64 void bind(
const PtrPackType& pack)
66 if constexpr (lhs_t::has_param) {
69 if constexpr (rhs_t::has_param) {
75 lhs_.activate_refcnt();
76 rhs_.activate_refcnt();
void activate_refcnt() const
Definition: glue.hpp:74
auto eval()
Definition: glue.hpp:48
void traverse(Func &&f)
Definition: glue.hpp:33
Definition: var_expr_traits.hpp:28
typename util::shape_traits< rhs_t >::shape_t shape_t
Definition: glue.hpp:22
static constexpr bool has_param
Definition: glue.hpp:23
typename VarExprType::value_t value_t
Definition: var_expr_traits.hpp:29
auto ad(const PtrPackType &pack) const
Definition: glue.hpp:58
ad::util::shape_traits< T > shape_traits
Definition: shape_traits.hpp:23
constexpr size_t cols() const
Definition: glue.hpp:55
auto get() const
Definition: glue.hpp:46
constexpr size_t rows() const
Definition: glue.hpp:54
GlueNode(const lhs_t &lhs, const rhs_t &rhs)
Definition: glue.hpp:27
Definition: bounded.hpp:11
Definition: var_expr_traits.hpp:20
void bind(const PtrPackType &pack)
Definition: glue.hpp:64
typename util::var_expr_traits< rhs_t >::value_t value_t
Definition: glue.hpp:21
void traverse(Func &&f) const
Definition: glue.hpp:40
constexpr size_t size() const
Definition: glue.hpp:53