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 <algorithm>
6
7namespace stan {
8namespace math {
9
18template <typename T1, typename... Ts>
19inline size_t max_size(const T1& x1, const Ts&... xs) {
20 return std::max({stan::math::size(x1), stan::math::size(xs)...});
21}
22
23} // namespace math
24} // namespace stan
25#endif
size_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:18
size_t max_size(const T1 &x1, const Ts &... xs)
Calculate the size of the largest input.
Definition max_size.hpp:19
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition fvar.hpp:9