1#ifndef STAN_MATH_OPENCL_PRIM_DIVIDE_COLUMNS_HPP
2#define STAN_MATH_OPENCL_PRIM_DIVIDE_COLUMNS_HPP
10#include <CL/opencl.hpp>
29template <
typename T1,
typename T2,
typename = require_all_arithmetic_t<T1, T2>>
31 if (A.
size() == 0 || B.
size() == 0) {
39 }
catch (
const cl::Error&
e) {
55template <
typename T1,
typename T2,
typename = require_all_arithmetic_t<T1, T2>>
Represents an arithmetic matrix on the OpenCL device.
void check_opencl_error(const char *function, const cl::Error &e)
Throws the domain error with specifying the OpenCL error that occurred.
elt_divide_< as_operation_cl_t< T_a >, as_operation_cl_t< T_b > > elt_divide(T_a &&a, T_b &&b)
const kernel_cl< out_buffer, in_buffer, int > divide_columns_vec("divide_columns_vec", {indexing_helpers, divide_columns_kernel_code})
See the docs for divide_columns_vec() .
void divide_columns(matrix_cl< T1 > &A, const matrix_cl< T2 > &B)
Divides each column of a matrix by a vector.
static constexpr double e()
Return the base of the natural logarithm.
void check_vector(const char *function, const char *name, const Mat &x)
Check the input is either a row vector or column vector or a matrix with a single row or column.
void check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
Check if the provided sizes match.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...