Automatic Differentiation
 
Loading...
Searching...
No Matches
check_triangular.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_OPENCL_ERR_CHECK_TRIANGULAR_HPP
2#define STAN_MATH_OPENCL_ERR_CHECK_TRIANGULAR_HPP
3#ifdef STAN_OPENCL
4
8namespace stan {
9namespace math {
10
22template <typename T, require_matrix_cl_t<T>* = nullptr>
23inline void check_triangular(const char* function, const char* name,
24 const T& A) {
25 if (A.view() != matrix_cl_view::Lower && A.view() != matrix_cl_view::Upper) {
26 invalid_argument("tri_inverse(OpenCL)", "A.view()",
27 static_cast<int>(A.view()), "is ",
28 ". Only triangular input matrices are supported!");
29 }
30}
31
32} // namespace math
33} // namespace stan
34
35#endif
36#endif
void check_triangular(const char *function, const char *name, const T &A)
Check if the matrix_cl is either upper triangular or lower triangular.
void invalid_argument(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw an invalid_argument exception with a consistently formatted message.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition fvar.hpp:9