Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ matrix_cl() [8/13]

template<typename T >
template<typename Mat , require_eigen_t< Mat > * = nullptr, require_vt_same< Mat, T > * = nullptr>
stan::math::matrix_cl< T >::matrix_cl ( Mat &&  A,
matrix_cl_view  partial_view = matrix_cl_view::Entire 
)
inlineexplicit

Constructor for the matrix_cl that creates a copy of the Eigen matrix or Eigen expression on the OpenCL device.

Regardless of partial_view, whole matrix is stored.

If a lvalue matrix or a map is passed to this constructor, it might be directly used by the device. The caller must make sure that the matrix (map data) does not go out of scope as long as this matrix_cl is in use (std::move-ing it or using raw buffer() also counts as in use).

Template Parameters
Mattype of Eigen Matrix or expression
Parameters
Athe Eigen Matrix or expression
partial_viewwhich part of the matrix is used
Exceptions
<code>std::system_error</code>if the memory on the device could not be allocated

Definition at line 321 of file matrix_cl.hpp.