Stan Math Library  2.20.0
reverse mode automatic differentiation
check_matching_sizes.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_ARR_ERR_CHECK_MATCHING_SIZES_HPP
2 #define STAN_MATH_PRIM_ARR_ERR_CHECK_MATCHING_SIZES_HPP
3 
7 
8 namespace stan {
9 namespace math {
10 
24 template <typename T_y1, typename T_y2>
25 inline void check_matching_sizes(const char* function, const char* name1,
26  const T_y1& y1, const char* name2,
27  const T_y2& y2) {
28  check_size_match(function, "size of ", name1, y1.size(), "size of ", name2,
29  y2.size());
30 }
31 
32 } // namespace math
33 } // namespace stan
34 #endif
void check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
Check if the provided sizes match.
void check_matching_sizes(const char *function, const char *name1, const T_y1 &y1, const char *name2, const T_y2 &y2)
Check if two structures at the same size.

     [ Stan Home Page ] © 2011–2018, Stan Development Team.