Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ check_matching_sizes()

template<typename T_y1 , typename T_y2 >
void stan::math::check_matching_sizes ( const char *  function,
const char *  name1,
const T_y1 &  y1,
const char *  name2,
const T_y2 &  y2 
)
inline

Check if two structures at the same size.

This function only checks the runtime sizes for variables that implement a size() method.

Template Parameters
T_y1Type of the first variable
T_y2Type of the second variable
Parameters
functionFunction name (for error messages)
name1First variable name (for error messages)
y1First variable
name2Second variable name (for error messages)
y2Second variable
Exceptions
<code>std::invalid_argument</code>if the sizes do not match

Definition at line 24 of file check_matching_sizes.hpp.