Ginkgo  Generated from pipelines/3133041809 branch based on develop. Ginkgo version 2.0.0
A numerical linear algebra library targeting many-core architectures
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
gko::matrix::Dense< ValueType > Class Template Reference

Dense is a matrix format which explicitly stores all values of the matrix. More...

#include <ginkgo/core/matrix/dense.hpp>

Inheritance diagram for gko::matrix::Dense< ValueType >:
[legend]
Collaboration diagram for gko::matrix::Dense< ValueType >:
[legend]

Public Types

using value_type = ValueType
 
using index_type = int64
 
using transposed_type = Dense
 
using mat_data64 = matrix_data< value_type, int64 >
 
using mat_data32 = matrix_data< value_type, int32 >
 
using mat_data = mat_data64
 
using device_mat_data64 = device_matrix_data< value_type, int64 >
 
using device_mat_data32 = device_matrix_data< value_type, int32 >
 
using device_mat_data = device_mat_data64
 
using device_view = view::dense< value_type >
 
using const_device_view = view::dense< const value_type >
 
using row_major_range = gko::range< gko::accessor::row_major< ValueType, 2 > >
 
- Public Types inherited from gko::EnableCloneable< Dense< ValueType > >
using result_type = Dense< ValueType >
 
- Public Types inherited from gko::ConvertibleTo< Dense< ValueType > >
using result_type = Dense< ValueType >
 
- Public Types inherited from gko::ConvertibleTo< MultiVector< ValueType > >
using result_type = MultiVector< ValueType >
 
- Public Types inherited from gko::ConvertibleTo< Dense< next_precision< ValueType > > >
using result_type = Dense< next_precision< ValueType > >
 
- Public Types inherited from gko::ConvertibleTo< Coo< ValueType, int32 > >
using result_type = Coo< ValueType, int32 >
 
- Public Types inherited from gko::ConvertibleTo< Coo< ValueType, int64 > >
using result_type = Coo< ValueType, int64 >
 
- Public Types inherited from gko::ConvertibleTo< Csr< ValueType, int32 > >
using result_type = Csr< ValueType, int32 >
 
- Public Types inherited from gko::ConvertibleTo< Csr< ValueType, int64 > >
using result_type = Csr< ValueType, int64 >
 
- Public Types inherited from gko::ConvertibleTo< Ell< ValueType, int32 > >
using result_type = Ell< ValueType, int32 >
 
- Public Types inherited from gko::ConvertibleTo< Ell< ValueType, int64 > >
using result_type = Ell< ValueType, int64 >
 
- Public Types inherited from gko::ConvertibleTo< Fbcsr< ValueType, int32 > >
using result_type = Fbcsr< ValueType, int32 >
 
- Public Types inherited from gko::ConvertibleTo< Fbcsr< ValueType, int64 > >
using result_type = Fbcsr< ValueType, int64 >
 
- Public Types inherited from gko::ConvertibleTo< Hybrid< ValueType, int32 > >
using result_type = Hybrid< ValueType, int32 >
 
- Public Types inherited from gko::ConvertibleTo< Hybrid< ValueType, int64 > >
using result_type = Hybrid< ValueType, int64 >
 
- Public Types inherited from gko::ConvertibleTo< Sellp< ValueType, int32 > >
using result_type = Sellp< ValueType, int32 >
 
- Public Types inherited from gko::ConvertibleTo< Sellp< ValueType, int64 > >
using result_type = Sellp< ValueType, int64 >
 
- Public Types inherited from gko::ConvertibleTo< SparsityCsr< ValueType, int32 > >
using result_type = SparsityCsr< ValueType, int32 >
 
- Public Types inherited from gko::ConvertibleTo< SparsityCsr< ValueType, int64 > >
using result_type = SparsityCsr< ValueType, int64 >
 
- Public Types inherited from gko::DiagonalExtractable< ValueType >
using value_type = ValueType
 
- Public Types inherited from gko::ReadableFromMatrixData< ValueType, int32 >
using value_type = ValueType
 
using index_type = int32
 
- Public Types inherited from gko::ReadableFromMatrixData< ValueType, int64 >
using value_type = ValueType
 
using index_type = int64
 
- Public Types inherited from gko::WritableToMatrixData< ValueType, int32 >
using value_type = ValueType
 
using index_type = int32
 
- Public Types inherited from gko::WritableToMatrixData< ValueType, int64 >
using value_type = ValueType
 
using index_type = int64
 

Public Member Functions

void convert_to (MultiVector< ValueType > *result) const override
 
void move_to (MultiVector< ValueType > *result) override
 
void convert_to (Dense< next_precision< ValueType >> *result) const override
 
void move_to (Dense< next_precision< ValueType >> *result) override
 
void convert_to (Coo< ValueType, int32 > *result) const override
 
void move_to (Coo< ValueType, int32 > *result) override
 
void convert_to (Coo< ValueType, int64 > *result) const override
 
void move_to (Coo< ValueType, int64 > *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
 
void convert_to (Ell< ValueType, int32 > *result) const override
 
void move_to (Ell< ValueType, int32 > *result) override
 
void convert_to (Ell< ValueType, int64 > *result) const override
 
void move_to (Ell< ValueType, int64 > *result) override
 
void convert_to (Fbcsr< ValueType, int32 > *result) const override
 
void move_to (Fbcsr< ValueType, int32 > *result) override
 
void convert_to (Fbcsr< ValueType, int64 > *result) const override
 
void move_to (Fbcsr< ValueType, int64 > *result) override
 
void convert_to (Hybrid< ValueType, int32 > *result) const override
 
void move_to (Hybrid< ValueType, int32 > *result) override
 
void convert_to (Hybrid< ValueType, int64 > *result) const override
 
void move_to (Hybrid< ValueType, int64 > *result) override
 
void convert_to (Sellp< ValueType, int32 > *result) const override
 
void move_to (Sellp< ValueType, int32 > *result) override
 
void convert_to (Sellp< ValueType, int64 > *result) const override
 
void move_to (Sellp< ValueType, int64 > *result) override
 
void convert_to (SparsityCsr< ValueType, int32 > *result) const override
 
void move_to (SparsityCsr< ValueType, int32 > *result) override
 
void convert_to (SparsityCsr< ValueType, int64 > *result) const override
 
void move_to (SparsityCsr< ValueType, int64 > *result) override
 
void read (const mat_data32 &data) override
 
void read (const mat_data64 &data) override
 
void read (const device_mat_data32 &data) override
 
void read (const device_mat_data64 &data) override
 
void read (device_mat_data32 &&data) override
 
void read (device_mat_data64 &&data) override
 
void write (mat_data32 &data) const override
 
void write (mat_data64 &data) const override
 
void validate_data () const override
 Throws gko::InvalidData exception if we found the data inside the object does not fulfill certain property up to our knowledge.
 
void fill (ValueType value)
 
void extract_diagonal (ptr_param< Diagonal< ValueType >> output) const
 Writes the diagonal of this matrix into an existing diagonal matrix. More...
 
std::unique_ptr< Diagonal< ValueType > > extract_diagonal () const override
 Extracts the diagonal entries of the matrix into a vector. More...
 
std::unique_ptr< LinOp > transpose () const override
 Returns a LinOp representing the transpose of the Transposable object. More...
 
std::unique_ptr< LinOp > conj_transpose () const override
 Returns a LinOp representing the conjugate transpose of the Transposable object. More...
 
void transpose (ptr_param< Dense > output) const
 Writes the transposed matrix into the given output matrix. More...
 
void conj_transpose (ptr_param< Dense > output) const
 Writes the conjugate-transposed matrix into the given output matrix. More...
 
void add_scaled (ptr_param< const AbstractMultiVector > alpha, ptr_param< const Diagonal< value_type >> diag)
 Adds a scaled diagonal to this A = A + alpha * D. More...
 
void sub_scaled (ptr_param< const AbstractMultiVector > alpha, ptr_param< const Diagonal< value_type >> diag)
 Subtracts a scaled diagonal from this A = A - alpha * D. More...
 
std::unique_ptr< Dense > create_subview (span rows, span cols)
 
std::unique_ptr< const Dense > create_subview (span rows, span cols) const
 
std::unique_ptr< const Dense > create_const_subview (span rows, span cols) const
 
std::unique_ptr< const MultiVector< ValueType > > as_const_multivector_view () const
 
std::unique_ptr< MultiVector< ValueType > > as_multivector_view ()
 
device_view get_device_view ()
 
const_device_view get_const_device_view () const
 
ValueType * get_values () noexcept
 
const ValueType * get_const_values () const noexcept
 
ValueType & at (size_type row, size_type col)
 
ValueType at (size_type row, size_type col) const
 
size_type get_stride () const noexcept
 
size_type get_num_stored_elements () const noexcept
 
 Dense (const Dense &other)
 
 Dense (Dense &&other)
 
Dense & operator= (const Dense &other)
 
Dense & operator= (Dense &&other)
 
- Public Member Functions inherited from gko::LinOp
void apply (ptr_param< const AbstractMultiVector > b, ptr_param< AbstractMultiVector > x) const
 Applies a linear operator to a vector (or a sequence of vectors). More...
 
void apply (ptr_param< const AbstractMultiVector > alpha, ptr_param< const AbstractMultiVector > b, ptr_param< const AbstractMultiVector > beta, ptr_param< AbstractMultiVector > x) const
 Performs the operation x = alpha * op(b) + beta * x. More...
 
template<typename DenseIn , typename DenseOut , typename = std::enable_if_t<is_dense_ptr<DenseIn> && is_dense_ptr<DenseOut>>>
void apply (const DenseIn &b, DenseOut &&x) const
 
template<typename DenseAlpha , typename DenseIn , typename DenseBeta , typename DenseOut , typename = std::enable_if_t< is_dense_ptr<DenseAlpha> && is_dense_ptr<DenseIn> && is_dense_ptr<DenseBeta> && is_dense_ptr<DenseOut>>>
void apply (const DenseAlpha &alpha, const DenseIn &b, const DenseBeta &beta, DenseOut &&x) const
 
const dim< 2 > & get_size () const noexcept
 Returns the size of the operator. More...
 
virtual bool apply_uses_initial_guess () const
 Returns true if the linear operator uses the data given in x as an initial guess. More...
 
LinOp & operator= (const LinOp &)=default
 Copy-assigns a LinOp. More...
 
LinOp & operator= (LinOp &&other)
 Move-assigns a LinOp. More...
 
 LinOp (const LinOp &)=default
 Copy-constructs a LinOp. More...
 
 LinOp (LinOp &&other)
 Move-constructs a LinOp. More...
 
- Public Member Functions inherited from gko::PolymorphicObject
PolymorphicObject & operator= (const PolymorphicObject &)
 
std::shared_ptr< const Executor > get_executor () const noexcept
 Returns the Executor of the object. More...
 
- Public Member Functions inherited from gko::log::EnableLogging< PolymorphicObject >
void add_logger (std::shared_ptr< const Logger > logger) override
 
void remove_logger (const Logger *logger) override
 
void remove_logger (ptr_param< const Logger > logger)
 
const std::vector< std::shared_ptr< const Logger > > & get_loggers () const override
 
void clear_loggers () override
 
- Public Member Functions inherited from gko::log::Loggable
void remove_logger (ptr_param< const Logger > logger)
 
- Public Member Functions inherited from gko::EnableCloneable< Dense< ValueType > >
std::unique_ptr< Dense< ValueType > > clone (std::shared_ptr< const Executor > exec) const
 Creates a clone of the object. More...
 
std::unique_ptr< Dense< ValueType > > clone () const
 Creates a clone of the object. More...
 
void convert_to (result_type *result) const override
 Converts the implementer to an object of type result_type. More...
 
void move_to (result_type *result) override
 Converts the implementer to an object of type result_type by moving data from this object. More...
 
std::unique_ptr< Dense< ValueType > > create_default () const
 
std::unique_ptr< Dense< ValueType > > create_default (std::shared_ptr< const Executor > exec) const
 
- Public Member Functions inherited from gko::ConvertibleTo< Dense< ValueType > >
void convert_to (ptr_param< result_type > result) const
 
void move_to (ptr_param< result_type > result)
 
- Public Member Functions inherited from gko::Cloneable
std::unique_ptr< Cloneable > clone (std::shared_ptr< const Executor > exec) const
 
std::unique_ptr< Cloneable > clone () const
 
Cloneable * copy_from (ptr_param< const Cloneable > other)
 
Cloneable * move_from (ptr_param< Cloneable > other)
 
std::unique_ptr< Cloneable > create_default (std::shared_ptr< const Executor > exec) const
 
std::unique_ptr< Cloneable > create_default () const
 
- Public Member Functions inherited from gko::ConvertibleTo< MultiVector< ValueType > >
virtual void convert_to (result_type *result) const=0
 Converts the implementer to an object of type result_type. More...
 
void convert_to (ptr_param< result_type > result) const
 
virtual void move_to (result_type *result)=0
 Converts the implementer to an object of type result_type by moving data from this object. More...
 
void move_to (ptr_param< result_type > result)
 
- Public Member Functions inherited from gko::ConvertibleTo< Dense< next_precision< ValueType > > >
virtual void convert_to (result_type *result) const=0
 Converts the implementer to an object of type result_type. More...
 
void convert_to (ptr_param< result_type > result) const
 
virtual void move_to (result_type *result)=0
 Converts the implementer to an object of type result_type by moving data from this object. More...
 
void move_to (ptr_param< result_type > result)
 
- Public Member Functions inherited from gko::ConvertibleTo< Coo< ValueType, int32 > >
virtual void convert_to (result_type *result) const=0
 Converts the implementer to an object of type result_type. More...
 
void convert_to (ptr_param< result_type > result) const
 
virtual void move_to (result_type *result)=0
 Converts the implementer to an object of type result_type by moving data from this object. More...
 
void move_to (ptr_param< result_type > result)
 
- Public Member Functions inherited from gko::ConvertibleTo< Coo< ValueType, int64 > >
virtual void convert_to (result_type *result) const=0
 Converts the implementer to an object of type result_type. More...
 
void convert_to (ptr_param< result_type > result) const
 
virtual void move_to (result_type *result)=0
 Converts the implementer to an object of type result_type by moving data from this object. More...
 
void move_to (ptr_param< result_type > result)
 
- Public Member Functions inherited from gko::ConvertibleTo< Csr< ValueType, int32 > >
virtual void convert_to (result_type *result) const=0
 Converts the implementer to an object of type result_type. More...
 
void convert_to (ptr_param< result_type > result) const
 
virtual void move_to (result_type *result)=0
 Converts the implementer to an object of type result_type by moving data from this object. More...
 
void move_to (ptr_param< result_type > result)
 
- Public Member Functions inherited from gko::ConvertibleTo< Csr< ValueType, int64 > >
virtual void convert_to (result_type *result) const=0
 Converts the implementer to an object of type result_type. More...
 
void convert_to (ptr_param< result_type > result) const
 
virtual void move_to (result_type *result)=0
 Converts the implementer to an object of type result_type by moving data from this object. More...
 
void move_to (ptr_param< result_type > result)
 
- Public Member Functions inherited from gko::ConvertibleTo< Ell< ValueType, int32 > >
virtual void convert_to (result_type *result) const=0
 Converts the implementer to an object of type result_type. More...
 
void convert_to (ptr_param< result_type > result) const
 
virtual void move_to (result_type *result)=0
 Converts the implementer to an object of type result_type by moving data from this object. More...
 
void move_to (ptr_param< result_type > result)
 
- Public Member Functions inherited from gko::ConvertibleTo< Ell< ValueType, int64 > >
virtual void convert_to (result_type *result) const=0
 Converts the implementer to an object of type result_type. More...
 
void convert_to (ptr_param< result_type > result) const
 
virtual void move_to (result_type *result)=0
 Converts the implementer to an object of type result_type by moving data from this object. More...
 
void move_to (ptr_param< result_type > result)
 
- Public Member Functions inherited from gko::ConvertibleTo< Fbcsr< ValueType, int32 > >
virtual void convert_to (result_type *result) const=0
 Converts the implementer to an object of type result_type. More...
 
void convert_to (ptr_param< result_type > result) const
 
virtual void move_to (result_type *result)=0
 Converts the implementer to an object of type result_type by moving data from this object. More...
 
void move_to (ptr_param< result_type > result)
 
- Public Member Functions inherited from gko::ConvertibleTo< Fbcsr< ValueType, int64 > >
virtual void convert_to (result_type *result) const=0
 Converts the implementer to an object of type result_type. More...
 
void convert_to (ptr_param< result_type > result) const
 
virtual void move_to (result_type *result)=0
 Converts the implementer to an object of type result_type by moving data from this object. More...
 
void move_to (ptr_param< result_type > result)
 
- Public Member Functions inherited from gko::ConvertibleTo< Hybrid< ValueType, int32 > >
virtual void convert_to (result_type *result) const=0
 Converts the implementer to an object of type result_type. More...
 
void convert_to (ptr_param< result_type > result) const
 
virtual void move_to (result_type *result)=0
 Converts the implementer to an object of type result_type by moving data from this object. More...
 
void move_to (ptr_param< result_type > result)
 
- Public Member Functions inherited from gko::ConvertibleTo< Hybrid< ValueType, int64 > >
virtual void convert_to (result_type *result) const=0
 Converts the implementer to an object of type result_type. More...
 
void convert_to (ptr_param< result_type > result) const
 
virtual void move_to (result_type *result)=0
 Converts the implementer to an object of type result_type by moving data from this object. More...
 
void move_to (ptr_param< result_type > result)
 
- Public Member Functions inherited from gko::ConvertibleTo< Sellp< ValueType, int32 > >
virtual void convert_to (result_type *result) const=0
 Converts the implementer to an object of type result_type. More...
 
void convert_to (ptr_param< result_type > result) const
 
virtual void move_to (result_type *result)=0
 Converts the implementer to an object of type result_type by moving data from this object. More...
 
void move_to (ptr_param< result_type > result)
 
- Public Member Functions inherited from gko::ConvertibleTo< Sellp< ValueType, int64 > >
virtual void convert_to (result_type *result) const=0
 Converts the implementer to an object of type result_type. More...
 
void convert_to (ptr_param< result_type > result) const
 
virtual void move_to (result_type *result)=0
 Converts the implementer to an object of type result_type by moving data from this object. More...
 
void move_to (ptr_param< result_type > result)
 
- Public Member Functions inherited from gko::ConvertibleTo< SparsityCsr< ValueType, int32 > >
virtual void convert_to (result_type *result) const=0
 Converts the implementer to an object of type result_type. More...
 
void convert_to (ptr_param< result_type > result) const
 
virtual void move_to (result_type *result)=0
 Converts the implementer to an object of type result_type by moving data from this object. More...
 
void move_to (ptr_param< result_type > result)
 
- Public Member Functions inherited from gko::ConvertibleTo< SparsityCsr< ValueType, int64 > >
virtual void convert_to (result_type *result) const=0
 Converts the implementer to an object of type result_type. More...
 
void convert_to (ptr_param< result_type > result) const
 
virtual void move_to (result_type *result)=0
 Converts the implementer to an object of type result_type by moving data from this object. More...
 
void move_to (ptr_param< result_type > result)
 
- Public Member Functions inherited from gko::DiagonalExtractable< ValueType >
std::unique_ptr< LinOp > extract_diagonal_linop () const override
 Extracts the diagonal entries of the matrix into a vector. More...
 
- Public Member Functions inherited from gko::ReadableFromMatrixData< ValueType, int32 >
virtual void read (const matrix_data< ValueType, int32 > &data)=0
 Reads a matrix from a matrix_data structure. More...
 
void read (const matrix_assembly_data< ValueType, int32 > &data)
 Reads a matrix from a matrix_assembly_data structure. More...
 
virtual void read (const device_matrix_data< ValueType, int32 > &data)
 Reads a matrix from a device_matrix_data structure. More...
 
virtual void read (device_matrix_data< ValueType, int32 > &&data)
 Reads a matrix from a device_matrix_data structure. More...
 
- Public Member Functions inherited from gko::ReadableFromMatrixData< ValueType, int64 >
virtual void read (const matrix_data< ValueType, int64 > &data)=0
 Reads a matrix from a matrix_data structure. More...
 
void read (const matrix_assembly_data< ValueType, int64 > &data)
 Reads a matrix from a matrix_assembly_data structure. More...
 
virtual void read (const device_matrix_data< ValueType, int64 > &data)
 Reads a matrix from a device_matrix_data structure. More...
 
virtual void read (device_matrix_data< ValueType, int64 > &&data)
 Reads a matrix from a device_matrix_data structure. More...
 
- Public Member Functions inherited from gko::WritableToMatrixData< ValueType, int32 >
virtual void write (matrix_data< ValueType, int32 > &data) const=0
 Writes a matrix to a matrix_data structure. More...
 
virtual void write (device_matrix_data< ValueType, int32 > &data) const
 Writes a matrix to a device_matrix_data structure. More...
 
- Public Member Functions inherited from gko::WritableToMatrixData< ValueType, int64 >
virtual void write (matrix_data< ValueType, int64 > &data) const=0
 Writes a matrix to a matrix_data structure. More...
 
virtual void write (device_matrix_data< ValueType, int64 > &data) const
 Writes a matrix to a device_matrix_data structure. More...
 
- Public Member Functions inherited from gko::ScaledIdentityAddable
void add_scaled_identity (ptr_param< const AbstractMultiVector > a, ptr_param< const AbstractMultiVector > b)
 Scales this and adds another scalar times the identity to it. More...
 

Static Public Member Functions

static std::unique_ptr< Dense > create (std::shared_ptr< const Executor > exec, const dim< 2 > &size=dim< 2 >{}, size_type stride=0)
 
static std::unique_ptr< Dense > create (std::shared_ptr< const Executor > exec, const dim< 2 > &size, array< value_type > values, size_type stride)
 
static std::unique_ptr< const Dense > create_const (std::shared_ptr< const Executor > exec, const dim< 2 > &size, ::gko::detail::const_array_view< ValueType > &&values, size_type stride)
 

Friends

class EnableCloneable< Dense >
 
class Dense< to_complex< ValueType > >
 
class Dense< previous_precision< ValueType > >
 
class MultiVector< ValueType >
 
class Coo< ValueType, int32 >
 
class Coo< ValueType, int64 >
 
class Csr< ValueType, int32 >
 
class Csr< ValueType, int64 >
 
class Ell< ValueType, int32 >
 
class Ell< ValueType, int64 >
 
class Fbcsr< ValueType, int32 >
 
class Fbcsr< ValueType, int64 >
 
class Hybrid< ValueType, int32 >
 
class Hybrid< ValueType, int64 >
 
class Sellp< ValueType, int32 >
 
class Sellp< ValueType, int64 >
 
class SparsityCsr< ValueType, int32 >
 
class SparsityCsr< ValueType, int64 >
 

Detailed Description

template<typename ValueType = default_precision>
class gko::matrix::Dense< ValueType >

Dense is a matrix format which explicitly stores all values of the matrix.

The values are stored in row-major format (values belonging to the same row appear consecutive in the memory). Optionally, rows can be padded for better memory access.

Note
A dense matrix can be viewed as a multi-vector with no overhead. This allows to use multi-vector exclusive operations on dense matrices, e.g. permutations, row gather/scatter, etc.
Template Parameters
ValueTypeprecision of matrix elements

Member Function Documentation

◆ add_scaled()

template<typename ValueType = default_precision>
void gko::matrix::Dense< ValueType >::add_scaled ( ptr_param< const AbstractMultiVector >  alpha,
ptr_param< const Diagonal< value_type >>  diag 
)

Adds a scaled diagonal to this A = A + alpha * D.

Parameters
alphaA 1x1 scalar MultiVector
diagThe diagonal to add to this

◆ conj_transpose() [1/2]

template<typename ValueType = default_precision>
std::unique_ptr<LinOp> gko::matrix::Dense< ValueType >::conj_transpose ( ) const
overridevirtual

Returns a LinOp representing the conjugate transpose of the Transposable object.

Returns
a pointer to the new conjugate transposed object

Implements gko::Transposable.

◆ conj_transpose() [2/2]

template<typename ValueType = default_precision>
void gko::matrix::Dense< ValueType >::conj_transpose ( ptr_param< Dense< ValueType > >  output) const

Writes the conjugate-transposed matrix into the given output matrix.

Parameters
outputThe output matrix. It must have the dimensions gko::transpose(this->get_size())

◆ extract_diagonal() [1/2]

template<typename ValueType = default_precision>
std::unique_ptr<Diagonal<ValueType> > gko::matrix::Dense< ValueType >::extract_diagonal ( ) const
overridevirtual

Extracts the diagonal entries of the matrix into a vector.

Parameters
diagthe vector into which the diagonal will be written

Implements gko::DiagonalExtractable< ValueType >.

◆ extract_diagonal() [2/2]

template<typename ValueType = default_precision>
void gko::matrix::Dense< ValueType >::extract_diagonal ( ptr_param< Diagonal< ValueType >>  output) const

Writes the diagonal of this matrix into an existing diagonal matrix.

Parameters
outputThe output matrix. Its size must match the size of this matrix's diagonal.
See also
Dense::extract_diagonal()

◆ sub_scaled()

template<typename ValueType = default_precision>
void gko::matrix::Dense< ValueType >::sub_scaled ( ptr_param< const AbstractMultiVector >  alpha,
ptr_param< const Diagonal< value_type >>  diag 
)

Subtracts a scaled diagonal from this A = A - alpha * D.

Parameters
alphaA 1x1 scalar MultiVector
diagThe diagonal to add to this

◆ transpose() [1/2]

template<typename ValueType = default_precision>
std::unique_ptr<LinOp> gko::matrix::Dense< ValueType >::transpose ( ) const
overridevirtual

Returns a LinOp representing the transpose of the Transposable object.

Returns
a pointer to the new transposed object

Implements gko::Transposable.

◆ transpose() [2/2]

template<typename ValueType = default_precision>
void gko::matrix::Dense< ValueType >::transpose ( ptr_param< Dense< ValueType > >  output) const

Writes the transposed matrix into the given output matrix.

Parameters
outputThe output matrix. It must have the dimensions gko::transpose(this->get_size())

The documentation for this class was generated from the following files: