1 #ifndef STAN_MATH_OPENCL_CHOLESKY_DECOMPOSE_HPP 2 #define STAN_MATH_OPENCL_CHOLESKY_DECOMPOSE_HPP 55 }
catch (
const cl::Error&
e) {
66 A_11.sub_block(A, 0, 0, 0, 0, block, block);
72 A.
sub_block(A_11, 0, 0, 0, 0, block, block);
74 const int block_subset = A.
rows() -
block;
76 A_21.
sub_block(A, block, 0, 0, 0, block_subset, block);
80 = opencl::multiply<TriangularViewCL::Entire, TriangularViewCL::Upper>(
81 A_21,
transpose(tri_inverse<TriangularViewCL::Lower>(A_11)));
82 A.
sub_block(L_21, 0, 0, block, 0, block_subset, block);
83 matrix_cl A_22(block_subset, block_subset);
84 A_22.
sub_block(A, block, block, 0, 0, block_subset, block_subset);
89 A.
sub_block(L_22, 0, 0, block, block, block_subset, block_subset);
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...
opencl_context_base::tuning_struct & tuning_opts()
Returns the thread block size for the Cholesky Decompositions L_11.
void cholesky_decompose(matrix_cl &A)
Performs an in-place of the the lower-triangular Cholesky factor (i.e., matrix square root) of the sp...
void sub_block(const matrix_cl &A, size_t A_i, size_t A_j, size_t this_i, size_t this_j, size_t nrows, size_t ncols)
Write the contents of A into this starting at the top left of this
Represents a matrix on the OpenCL device.
const kernel_cl< in_out_buffer, int > cholesky_decompose("cholesky_decompose", {indexing_helpers, cholesky_decompose_kernel_code})
See the docs for cholesky_decompose() .
checking OpenCL error numbers
int cholesky_min_L11_size
Initialization for OpenCL:
matrix_cl transpose(const matrix_cl &src)
Takes the transpose of the matrix on the OpenCL device.
double e()
Return the base of the natural logarithm.
fvar< T > floor(const fvar< T > &x)
matrix_cl multiply_transpose(const matrix_cl &A)
Computes the product of a square OpenCL matrix with its transpose.
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > block(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m, size_t i, size_t j, size_t nrows, size_t ncols)
Return a nrows x ncols submatrix starting at (i-1, j-1).
void check_opencl_error(const char *function, const cl::Error &e)
Throws the domain error with specifying the OpenCL error that occured.