1#ifndef STAN_MATH_FWD_FUN_TCROSSPROD_HPP
2#define STAN_MATH_FWD_FUN_TCROSSPROD_HPP
13template <
typename EigMat, require_eigen_vt<is_fvar, EigMat>* =
nullptr>
14inline Eigen::Matrix<value_type_t<EigMat>, EigMat::RowsAtCompileTime,
15 EigMat::RowsAtCompileTime>
20 const auto& m_ref =
to_ref(m);
21 return m_ref * m_ref.transpose();
Eigen::Matrix< value_type_t< EigMat >, EigMat::RowsAtCompileTime, EigMat::RowsAtCompileTime > tcrossprod(const EigMat &m)
ref_type_t< T && > to_ref(T &&a)
This evaluates expensive Eigen expressions.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...