1#ifndef STAN_MATH_OPENCL_REV_TO_MATRIX_HPP
2#define STAN_MATH_OPENCL_REV_TO_MATRIX_HPP
25template <
typename T_x,
26 require_all_kernel_expressions_and_none_scalar_t<T_x>* =
nullptr>
40 reshaped += res.adj();
44 x.adj() = std::move(x_adj_cpy);
const cl::Buffer & buffer() const
void add_read_event(cl::Event new_event) const
Add an event to the read event stack.
const tbb::concurrent_vector< cl::Event > & read_events() const
Get the events from the event stacks.
void add_write_event(cl::Event new_event) const
Add an event to the write event stack.
const tbb::concurrent_vector< cl::Event > & write_events() const
Get the events from the event stacks.
Represents an arithmetic matrix on the OpenCL device.
T_x to_matrix(T_x &&x)
Returns input matrix.
static constexpr double e()
Return the base of the natural logarithm.
var_value< plain_type_t< T > > make_callback_var(T &&value, F &&functor)
Creates a new var initialized with a callback_vari with a given value and reverse-pass callback funct...
T value_of(const fvar< T > &v)
Return the value of the specified variable.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...