template<typename T>
class stan::math::matrix_cl< T >
Represents an arithmetic matrix on the OpenCL device.
- Template Parameters
-
| T | an arithmetic type for the type stored in the OpenCL buffer. |
Definition at line 47 of file matrix_cl.hpp.
|
| template<matrix_cl_view matrix_view = matrix_cl_view::Entire> |
| void | zeros_strict_tri () |
| | Stores zeros in the strict's triangular part (excluding the diagonal) of a matrix on the OpenCL device.
|
| |
| int | rows () const |
| |
| int | cols () const |
| |
| int | size () const |
| |
| const matrix_cl_view & | view () const |
| |
| void | view (const matrix_cl_view &view) |
| |
| void | clear_write_events () const |
| | Clear the write events from the event stacks.
|
| |
| void | clear_read_events () const |
| | Clear the read events from the event stacks.
|
| |
| void | clear_read_write_events () const |
| | Clear the write events from the event stacks.
|
| |
| const tbb::concurrent_vector< cl::Event > & | write_events () const |
| | Get the events from the event stacks.
|
| |
| const tbb::concurrent_vector< cl::Event > & | read_events () const |
| | Get the events from the event stacks.
|
| |
| const tbb::concurrent_vector< cl::Event > | read_write_events () const |
| | Get the events from the event stacks.
|
| |
| void | add_read_event (cl::Event new_event) const |
| | Add an event to the read event stack.
|
| |
| void | add_write_event (cl::Event new_event) const |
| | Add an event to the write event stack.
|
| |
| void | add_read_write_event (cl::Event new_event) const |
| | Add an event to the read/write event stack.
|
| |
| void | wait_for_write_events () const |
| | Waits for the write events and clears the read event stack.
|
| |
| void | wait_for_read_events () const |
| | Waits for the read events and clears the read event stack.
|
| |
| void | wait_for_read_write_events () const |
| | Waits for read and write events to finish and clears the read, write, and read/write event stacks.
|
| |
| const cl::Buffer & | buffer () const |
| |
| cl::Buffer & | buffer () |
| |
| | matrix_cl () |
| |
| | matrix_cl (const cl::Buffer &A, const int R, const int C, matrix_cl_view partial_view=matrix_cl_view::Entire) |
| | Construct a matrix_cl<T> from an existing cl::Buffer object.
|
| |
| | matrix_cl (const matrix_cl< T > &A) |
| | Copy constructor.
|
| |
| | matrix_cl (matrix_cl< T > &&A) |
| | Move constructor.
|
| |
| | matrix_cl (const arena_matrix_cl< T > &A) |
| | Constructor from arena_matrix_cl.
|
| |
| template<typename Vec , require_std_vector_vt< is_eigen, Vec > * = nullptr, require_st_same< Vec, T > * = nullptr> |
| | matrix_cl (Vec &&A) |
| | Constructor for the matrix_cl that creates a copy of a std::vector of Eigen matrices on the OpenCL device.
|
| |
| | matrix_cl (const int rows, const int cols, matrix_cl_view partial_view=matrix_cl_view::Entire) |
| | Constructor for the matrix_cl that only allocates the buffer on the OpenCL device.
|
| |
| template<typename Mat , require_eigen_t< Mat > * = nullptr, require_vt_same< Mat, T > * = nullptr> |
| | matrix_cl (Mat &&A, matrix_cl_view partial_view=matrix_cl_view::Entire) |
| | Constructor for the matrix_cl that creates a copy of the Eigen matrix or Eigen expression on the OpenCL device.
|
| |
| template<typename Scal , typename = require_same_t<T, std::remove_reference_t<Scal>>> |
| | matrix_cl (Scal &&A, matrix_cl_view partial_view=matrix_cl_view::Diagonal) |
| | Constructor for the matrix_cl that creates a copy of a scalar on the OpenCL device.
|
| |
| template<typename Vec , require_std_vector_t< Vec > * = nullptr, require_vt_same< Vec, T > * = nullptr> |
| | matrix_cl (Vec &&A, matrix_cl_view partial_view=matrix_cl_view::Entire) |
| | Construct a matrix_cl of size Nx1 from std::vector.
|
| |
| template<typename Vec , require_std_vector_t< Vec > * = nullptr, require_vt_same< Vec, T > * = nullptr> |
| | matrix_cl (Vec &&A, const int &R, const int &C, matrix_cl_view partial_view=matrix_cl_view::Entire) |
| | Construct from std::vector with given rows and columns.
|
| |
| template<typename U , require_same_t< T, U > * = nullptr> |
| | matrix_cl (const U *A, const int &R, const int &C, matrix_cl_view partial_view=matrix_cl_view::Entire) |
| | Construct from array with given rows and columns.
|
| |
| template<typename Expr , require_all_kernel_expressions_and_none_scalar_t< Expr > * = nullptr, require_not_matrix_cl_t< Expr > * = nullptr> |
| | matrix_cl (const Expr &expression) |
| | Construct from a kernel generator expression.
|
| |
| matrix_cl< T > & | operator= (matrix_cl< T > &&a) |
| | Move assignment operator.
|
| |
| matrix_cl< T > & | operator= (const matrix_cl< T > &a) |
| | Copy assignment operator.
|
| |
| template<typename Expr , require_all_kernel_expressions_and_none_scalar_t< Expr > * = nullptr, require_not_matrix_cl_t< Expr > * = nullptr> |
| matrix_cl< T > & | operator= (const Expr &expression) |
| | Assignment of a kernel generator expression evaluates the expression into this.
|
| |
| matrix_cl< T > & | operator= (const arena_matrix_cl< T > &other) |
| | Assignment of arena_matrix_cl<T>.
|
| |
| const matrix_cl< T > & | eval () const & |
| | Evaluates this.
|
| |
| matrix_cl< T > | eval () && |
| |
| | ~matrix_cl () |
| | Destructor waits for write events to prevent any kernels from writing memory that has already been reused.
|
| |
| void | setZero () |
| | Set the values of a matrix_cl to zero.
|
| |