Automatic Differentiation
 
Loading...
Searching...
No Matches
matrix_cl_conversion.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_OPENCL_KERNEL_GENERATOR_MATRIX_CL_CONVERSION
2#define STAN_MATH_OPENCL_KERNEL_GENERATOR_MATRIX_CL_CONVERSION
3#ifdef STAN_OPENCL
4
7
8namespace stan {
9namespace math {
10
14template <typename T>
15template <typename Expr,
16 require_all_kernel_expressions_and_none_scalar_t<Expr>*,
17 require_not_matrix_cl_t<Expr>*>
18matrix_cl<T>::matrix_cl(const Expr& expresion) : rows_(0), cols_(0) {
19 results(*this) = expressions(expresion);
20}
21
22template <typename T>
23template <typename Expr,
26matrix_cl<T>& matrix_cl<T>::operator=(const Expr& expresion) {
27 results(*this) = expressions(expresion);
28 return *this;
29}
31} // namespace math
32} // namespace stan
33
34#endif
35#endif
matrix_cl< T > & operator=(matrix_cl< T > &&a)
Move assignment operator.
Represents an arithmetic matrix on the OpenCL device.
Definition matrix_cl.hpp:47
require_not_t< is_matrix_cl< std::decay_t< T > > > require_not_matrix_cl_t
Require type does not satisfy is_matrix_cl.
results_cl< T_results... > results(T_results &&... results)
Deduces types for constructing results_cl object.
expressions_cl< T_expressions... > expressions(T_expressions &&... expressions)
Deduces types for constructing expressions_cl object.
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...
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition fvar.hpp:9