1#ifndef STAN_MATH_OPENCL_PRIM_CHOLESKY_DECOMPOSE_HPP
2#define STAN_MATH_OPENCL_PRIM_CHOLESKY_DECOMPOSE_HPP
9#include <CL/opencl.hpp>
28 if (res.
rows() == 0) {
33 check_cl(
"cholesky_decompose (OpenCL)",
"A", res,
"not NaN") = !isnan(res);
38 res.template zeros_strict_tri<matrix_cl_view::Upper>();
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.
auto check_cl(const char *function, const char *var_name, T &&y, const char *must_be)
Constructs a check on opencl matrix or expression.
auto diagonal(T &&a)
Diagonal of a kernel generator expression.
plain_type_t< T > copy_cl(const T &src)
Copies the source matrix to the destination matrix.
void cholesky_decompose(matrix_cl< T > &A)
Performs an in-place computation of the lower-triangular Cholesky factor (i.e., matrix square root) o...
matrix_cl< double > cholesky_decompose(const matrix_cl< double > &A)
Returns the lower-triangular Cholesky factor (i.e., matrix square root) of the specified square,...
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...