1 #ifndef STAN_MATH_OPENCL_ERR_CHECK_DIAGONAL_ZEROS_HPP 2 #define STAN_MATH_OPENCL_ERR_CHECK_DIAGONAL_ZEROS_HPP 30 int zero_on_diagonal_flag = 0;
35 zero_on_diagonal_flag = from_matrix_cl<int>(zeros_flag);
37 if (zero_on_diagonal_flag) {
38 domain_error(
function, name,
"has zeros on the diagonal.",
"");
40 }
catch (
const cl::Error&
e) {
void check_diagonal_zeros(const char *function, const char *name, const matrix_cl &y)
Check if the matrix_cl has zeros on the diagonal.
The API to access the methods and values in opencl_context_base.
The matrix_cl class - allocates memory space on the OpenCL device, functions for transfering matrices...
Represents a matrix on the OpenCL device.
cl::Context & context()
Returns the reference to the OpenCL context.
void 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.
double e()
Return the base of the natural logarithm.
matrix_cl to_matrix_cl(const Eigen::Matrix< double, R, C > &src)
Copies the source Eigen matrix to the destination matrix that is stored on the OpenCL device...
const kernel_cl< in_buffer, out_buffer, int, int > check_diagonal_zeros("is_zero_on_diagonal", {indexing_helpers, is_zero_on_diagonal_kernel_code})
See the docs for check_diagonal_zeros() .
void check_opencl_error(const char *function, const cl::Error &e)
Throws the domain error with specifying the OpenCL error that occured.
cl::CommandQueue & queue()
Returns the reference to the active OpenCL command queue for the device.