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

◆ matrix_cl() [11/13]

template<typename T >
template<typename Vec , require_std_vector_t< Vec > * = nullptr, require_vt_same< Vec, T > * = nullptr>
stan::math::matrix_cl< T >::matrix_cl ( Vec &&  A,
const int &  R,
const int &  C,
matrix_cl_view  partial_view = matrix_cl_view::Entire 
)
inlineexplicit

Construct from std::vector with given rows and columns.

If a lvalue is passed to this constructor, it might be directly used by the device. The caller must make sure that it 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).

Parameters
AStandard vector
RNumber of rows the matrix should have.
CNumber of columns the matrix should have.
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 396 of file matrix_cl.hpp.