This class is a utility which efficiently implements the diagonal matrix (a linear operator which scales a vector row wise).
More...
|
| std::unique_ptr< LinOp > | transpose () const override |
| | Returns a LinOp representing the transpose of the Transposable object.
|
| std::unique_ptr< LinOp > | conj_transpose () const override |
| | Returns a LinOp representing the conjugate transpose of the Transposable object.
|
|
void | convert_to (Diagonal< next_precision< ValueType > > *result) const override |
|
void | move_to (Diagonal< next_precision< ValueType > > *result) override |
|
void | convert_to (Csr< ValueType, int32 > *result) const override |
|
void | move_to (Csr< ValueType, int32 > *result) override |
|
void | convert_to (Csr< ValueType, int64 > *result) const override |
|
void | move_to (Csr< ValueType, int64 > *result) override |
| std::unique_ptr< absolute_type > | compute_absolute () const override |
| | Gets the AbsoluteLinOp.
|
| void | compute_absolute_inplace () override |
| | Compute absolute inplace on each element.
|
| value_type * | get_values () noexcept |
| | Returns a pointer to the array of values of the matrix.
|
| const value_type * | get_const_values () const noexcept |
| | Returns a pointer to the array of values of the matrix.
|
| void | rapply (ptr_param< const LinOp > b, ptr_param< LinOp > x) const |
| | Applies the diagonal matrix from the right side to a matrix b, which means scales the columns of b with the according diagonal entries.
|
| void | inverse_apply (ptr_param< const LinOp > b, ptr_param< LinOp > x) const |
| | Applies the inverse of the diagonal matrix to a matrix b, which means scales the columns of b with the inverse of the according diagonal entries.
|
|
void | read (const mat_data &data) override |
|
void | read (const mat_data32 &data) override |
|
void | read (const device_mat_data &data) override |
|
void | read (const device_mat_data32 &data) override |
|
void | read (device_mat_data &&data) override |
|
void | read (device_mat_data32 &&data) override |
|
void | write (mat_data &data) const override |
|
void | write (mat_data32 &data) const override |
|
const Diagonal< default_precision > * | apply (ptr_param< const LinOp > b, ptr_param< LinOp > x) const |
|
void | convert_to (result_type *result) const override |
|
void | move_to (result_type *result) override |
| virtual void | write (matrix_data< default_precision, int32 > &data) const=0 |
| | Writes a matrix to a matrix_data structure.
|
| virtual void | write (matrix_data< default_precision, int64 > &data) const=0 |
| | Writes a matrix to a matrix_data structure.
|
| virtual void | read (const matrix_data< default_precision, int32 > &data)=0 |
| | Reads a matrix from a matrix_data structure.
|
| virtual void | read (const matrix_data< default_precision, int64 > &data)=0 |
| | Reads a matrix from a matrix_data structure.
|
| std::unique_ptr< LinOp > | compute_absolute_linop () const override |
| | Gets the absolute LinOp.
|
|
| static std::unique_ptr< Diagonal > | create (std::shared_ptr< const Executor > exec, size_type size=0) |
| | Creates an Diagonal matrix of the specified size.
|
| static std::unique_ptr< Diagonal > | create (std::shared_ptr< const Executor > exec, const size_type size, array< value_type > values) |
| | Creates a Diagonal matrix from an already allocated (and initialized) array.
|
| template<typename InputValueType> |
| static std::unique_ptr< Diagonal > | create (std::shared_ptr< const Executor > exec, const size_type size, std::initializer_list< InputValueType > values) |
| | create(std::shared_ptr<constExecutor>, const size_type, array<value_type>)
|
| static std::unique_ptr< const Diagonal > | create_const (std::shared_ptr< const Executor > exec, size_type size, gko::detail::const_array_view< ValueType > &&values) |
| | Creates a constant (immutable) Diagonal matrix from a constant array.
|
template<typename ValueType = default_precision>
class gko::matrix::Diagonal< ValueType >
This class is a utility which efficiently implements the diagonal matrix (a linear operator which scales a vector row wise).
Objects of the Diagonal class always represent a square matrix, and require one array to store their values.
- Template Parameters
-
| ValueType | precision of matrix elements |
| IndexType | precision of matrix indexes of a CSR matrix the diagonal is applied or converted to. |
template<typename ValueType = default_precision>
template<typename InputValueType>
create(std::shared_ptr<constExecutor>, const size_type, array<value_type>)
create(std::shared_ptr<constExecutor>, const size_type, array<value_type>)