1#ifndef STAN_MATH_OPENCL_PRIM_TO_MATRIX_HPP
2#define STAN_MATH_OPENCL_PRIM_TO_MATRIX_HPP
19template <
typename T_x,
20 require_nonscalar_prim_or_rev_kernel_expression_t<T_x>* =
nullptr>
22 return std::forward<T_x>(x);
38template <
typename T_x,
68template <
typename T_x,
70inline auto to_matrix(
const T_x& x,
int m,
int n,
bool col_major)
const cl::Buffer & buffer() const
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.
require_t< is_nonscalar_prim_or_rev_kernel_expression< std::decay_t< T > > > require_nonscalar_prim_or_rev_kernel_expression_t
Require type satisfies is_nonscalar_prim_or_rev_kernel_expression.
auto transpose(Arg &&a)
Transposes a kernel generator expression.
require_all_t< is_kernel_expression_and_not_scalar< Types >... > require_all_kernel_expressions_and_none_scalar_t
Enables a template if all given types are non-scalar types that are a valid kernel generator expressi...
T_x to_matrix(T_x &&x)
Returns input matrix.
typename return_type< Ts... >::type return_type_t
Convenience type for the return type of the specified template parameters.
static constexpr double e()
Return the base of the natural logarithm.
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 ...