1#ifndef STAN_MATH_PRIM_FUN_DIMS_HPP
2#define STAN_MATH_PRIM_FUN_DIMS_HPP
19template <
typename T, require_stan_scalar_t<T>* =
nullptr>
20inline void dims(
const T& x, std::vector<int>& result) {}
29template <
typename T, require_matrix_t<T>* =
nullptr>
30inline void dims(
const T& x, std::vector<int>& result) {
31 result.push_back(x.rows());
32 result.push_back(x.cols());
44template <
typename T,
typename Alloc>
45inline void dims(
const std::vector<T, Alloc>& x, std::vector<int>& result) {
46 result.push_back(x.size());
58inline std::vector<int>
dims(
const T& x) {
59 std::vector<int> result;
void dims(const T_x &x, std::vector< int > &result)
matrix_cl overload of the dims helper function in prim/fun/dims.hpp.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...