Stan Math Library  2.20.0
reverse mode automatic differentiation
check_matching_dims.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_OPENCL_ERR_CHECK_MATCHING_DIMS_HPP
2 #define STAN_MATH_OPENCL_ERR_CHECK_MATCHING_DIMS_HPP
3 #ifdef STAN_OPENCL
6 
7 namespace stan {
8 namespace math {
21 inline void check_matching_dims(const char* function, const char* name1,
22  const matrix_cl& y1, const char* name2,
23  const matrix_cl& y2) {
24  check_size_match(function, "Rows of ", name1, y1.rows(), "rows of ", name2,
25  y2.rows());
26  check_size_match(function, "Columns of ", name1, y1.cols(), "columns of ",
27  name2, y2.cols());
28 }
29 
30 } // namespace math
31 } // namespace stan
32 #endif
33 #endif
The matrix_cl class - allocates memory space on the OpenCL device, functions for transfering matrices...
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_dims(const char *function, const char *name1, const matrix_cl &y1, const char *name2, const matrix_cl &y2)
Check if two matrix_cls have the same dimensions.
Represents a matrix on the OpenCL device.
Definition: matrix_cl.hpp:29

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