Automatic Differentiation
 
Loading...
Searching...
No Matches
max_size.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_FUN_MAX_SIZE_HPP
2#define STAN_MATH_PRIM_FUN_MAX_SIZE_HPP
3
5#include <cstdint>
6#include <algorithm>
7
8namespace stan {
9namespace math {
10
19template <typename T1, typename... Ts>
20inline int64_t max_size(const T1& x1, const Ts&... xs) {
21 return std::max({stan::math::size(x1), stan::math::size(xs)...});
22}
23
24} // namespace math
25} // namespace stan
26#endif
int64_t size(const T &m)
Returns the size (number of the elements) of a matrix_cl or var_value<matrix_cl<T>>.
Definition size.hpp:19
int64_t max_size(const T1 &x1, const Ts &... xs)
Calculate the size of the largest input.
Definition max_size.hpp:20
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...