1#ifndef STAN_MATH_OPENCL_PRIM_TRACE_HPP
2#define STAN_MATH_OPENCL_PRIM_TRACE_HPP
21 require_all_kernel_expressions_and_none_scalar_t<T>* =
nullptr>
auto diagonal(T &&a)
Diagonal of a kernel generator expression.
typename value_type< T >::type value_type_t
Helper function for accessing underlying type.
value_type_t< T > trace(const T &m)
Calculates trace (sum of diagonal) of given kernel generator expression.
auto sum(const std::vector< T > &m)
Return the sum of the entries of the specified standard vector.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...