1#ifndef STAN_MATH_OPENCL_ERR_CHECK_SYMMETRIC_HPP
2#define STAN_MATH_OPENCL_ERR_CHECK_SYMMETRIC_HPP
26template <
typename T,
typename = require_arithmetic_t<T>>
34 int symmetric_flag = 1;
40 symmetric_flag = from_matrix_cl<int>(symm_flag);
41 if (!symmetric_flag) {
44 }
catch (
const cl::Error&
e) {
Represents an arithmetic matrix on the OpenCL device.
void check_symmetric(const char *function, const char *name, const matrix_cl< T > &y)
Check if the matrix_cl is symmetric.
void check_opencl_error(const char *function, const cl::Error &e)
Throws the domain error with specifying the OpenCL error that occurred.
const kernel_cl< in_buffer, out_buffer, int, int, const double > check_symmetric("is_symmetric", {indexing_helpers, is_symmetric_kernel_code})
See the docs for check_symmetric() .
matrix_cl< scalar_type_t< T > > to_matrix_cl(T &&src)
Copies the source Eigen matrix, std::vector or scalar to the destination matrix that is stored on the...
void check_square(const char *function, const char *name, const T_y &y)
Check if the specified matrix is square.
static constexpr double e()
Return the base of the natural logarithm.
void throw_domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
const double CONSTRAINT_TOLERANCE
The tolerance for checking arithmetic bounds in rank and in simplexes.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...