Automatic Differentiation
 
Loading...
Searching...
No Matches
size_zero.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_FUN_SIZE_ZERO_HPP
2#define STAN_MATH_PRIM_FUN_SIZE_ZERO_HPP
3
6#include <utility>
7
8namespace stan {
9namespace math {
10
18template <typename T>
19inline bool size_zero(const T& x) {
20 return !math::size(x);
21}
22
31template <typename T, typename... Ts>
32inline bool size_zero(const T& x, const Ts&... xs) {
33 return (size_zero(x) || size_zero(xs...));
34}
35} // namespace math
36} // namespace stan
37
38#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
bool size_zero(const T &x)
Returns 1 if input is of length 0, returns 0 otherwise.
Definition size_zero.hpp:19
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...