1#ifndef STAN_MATH_PRIM_META_LAZY_SELECT_EVALUATOR_HPP
2#define STAN_MATH_PRIM_META_LAZY_SELECT_EVALUATOR_HPP
45template <
typename TernaryOp,
typename Arg1,
typename Arg2,
typename Arg3>
47 : Eigen::internal::evaluator_base<
48 Eigen::CwiseTernaryOp<TernaryOp, Arg1, Arg2, Arg3>> {
49 using XprType = Eigen::CwiseTernaryOp<TernaryOp, Arg1, Arg2, Arg3>;
54 =
static_cast<int>(Eigen::internal::evaluator<Arg1>::CoeffReadCost)
55 +
static_cast<int>(Eigen::internal::evaluator<Arg2>::CoeffReadCost)
56 +
static_cast<int>(Eigen::internal::evaluator<Arg3>::CoeffReadCost)
57 +
static_cast<int>(Eigen::internal::functor_traits<TernaryOp>::Cost),
59 Arg1Flags = Eigen::internal::evaluator<Arg1>::Flags,
60 Arg2Flags = Eigen::internal::evaluator<Arg2>::Flags,
61 Arg3Flags = Eigen::internal::evaluator<Arg3>::Flags,
63 = (
static_cast<int>(
Arg1Flags) & Eigen::RowMajorBit)
64 == (
static_cast<int>(
Arg2Flags) & Eigen::RowMajorBit)
65 && (
static_cast<int>(
Arg1Flags) & Eigen::RowMajorBit)
66 == (
static_cast<int>(
Arg3Flags) & Eigen::RowMajorBit),
69 & (Eigen::HereditaryBits
75 Eigen::internal::plain_enum_min(
92 coeff(Eigen::Index index)
const {
100 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
explicit Data(
const XprType& xpr)
auto col(T_x &&x, size_t j)
Return the specified column of the specified kernel generator expression using start-at-1 indexing.
auto row(T_x &&x, size_t j)
Return the specified row of the specified kernel generator expression using start-at-1 indexing.
(Expert) Numerical traits for algorithmic differentiation variables.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Eigen::internal::evaluator< Arg1 > arg1Impl
Eigen::internal::evaluator< Arg3 > arg3Impl
Eigen::internal::evaluator< Arg2 > arg2Impl
lazy_select_evaluator(const XprType &xpr)
CoeffReturnType coeff(Eigen::Index row, Eigen::Index col) const
CoeffReturnType coeff(Eigen::Index index) const
typename Arg3::Scalar CondScalar
typename XprType::CoeffReturnType CoeffReturnType
Eigen::CwiseTernaryOp< TernaryOp, Arg1, Arg2, Arg3 > XprType
Evaluator for .select() expressions that evaluates only the branch chosen by the condition,...