1#ifndef STAN_MATH_OPENCL_REF_TYPE_FOR_OPENCL_HPP
2#define STAN_MATH_OPENCL_REF_TYPE_FOR_OPENCL_HPP
24template <
typename T,
typename =
void>
26 using T_val = std::remove_reference_t<T>;
28 std::is_same<typename Eigen::internal::traits<T_val>::XprKind,
29 Eigen::MatrixXpr>::value,
30 Eigen::Matrix<value_type_t<T>, T_val::RowsAtCompileTime,
31 T_val::ColsAtCompileTime>,
32 Eigen::Array<value_type_t<T>, T_val::RowsAtCompileTime,
33 T_val::ColsAtCompileTime>>;
36 = std::conditional_t<std::is_rvalue_reference<T>::value,
T_val,
const T&>;
37 using T_val_derived = std::decay_t<decltype(std::declval<T_val>().derived())>;
41 using type = std::conditional_t<
42 Eigen::internal::traits<Eigen::Ref<std::decay_t<T_plain_col_major>>>::
43 template match<T_val_derived>::MatchAtCompileTime
44 && (Eigen::internal::evaluator<T_val_derived>::Flags
45 & Eigen::LinearAccessBit)
46 && (Eigen::internal::evaluator<T_val_derived>::Flags
47 & Eigen::PacketAccessBit),
53 using type = std::conditional_t<std::is_rvalue_reference<T>::value,
54 std::remove_reference_t<T>,
const T&>;
Equivalent to Eigen::Matrix, except that the data is stored in (hopefully pinned) memory,...
require_t< is_arena_matrix< std::decay_t< T > > > require_arena_matrix_t
Require type satisfies is_arena_matrix.
require_not_t< is_eigen< std::decay_t< T > > > require_not_eigen_t
Require type does not satisfy is_eigen.
typename ref_type_for_opencl< T >::type ref_type_for_opencl_t
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
typename ref_type_for_opencl< typename std::decay_t< T >::Base >::type type
std::conditional_t< std::is_rvalue_reference< T >::value, std::remove_reference_t< T >, const T & > type
std::remove_reference_t< T > T_val
std::conditional_t< std::is_same< typename Eigen::internal::traits< T_val >::XprKind, Eigen::MatrixXpr >::value, Eigen::Matrix< value_type_t< T >, T_val::RowsAtCompileTime, T_val::ColsAtCompileTime >, Eigen::Array< value_type_t< T >, T_val::RowsAtCompileTime, T_val::ColsAtCompileTime > > T_plain_col_major
std::decay_t< decltype(std::declval< T_val >().derived())> T_val_derived
std::conditional_t< Eigen::internal::traits< Eigen::Ref< std::decay_t< T_plain_col_major > > >::template match< T_val_derived >::MatchAtCompileTime &&(Eigen::internal::evaluator< T_val_derived >::Flags &Eigen::LinearAccessBit) &&(Eigen::internal::evaluator< T_val_derived >::Flags &Eigen::PacketAccessBit), T_optionally_ref, T_pinned > type
std::conditional_t< std::is_rvalue_reference< T >::value, T_val, const T & > T_optionally_ref
Determines appropriate type for assigning expression of given type to, so that the resulting type has...