Stan Math Library  2.15.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 
6 
7 namespace stan {
8  namespace math {
9 
27  template <typename T_y1, typename T_y2>
28  inline void check_matching_sizes(const char* function,
29  const char* name1,
30  const T_y1& y1,
31  const char* name2,
32  const T_y2& y2) {
33  check_size_match(function,
34  "size of ", name1, y1.size(),
35  "size of ", name2, y2.size());
36  }
37 
38  }
39 }
40 #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–2016, Stan Development Team.