|
Ginkgo
Generated from pipelines/1554403166 branch based on develop. Ginkgo version 1.9.0
A numerical linear algebra library targeting many-core architectures
|
5 #ifndef GKO_PUBLIC_CORE_MATRIX_IDENTITY_HPP_
6 #define GKO_PUBLIC_CORE_MATRIX_IDENTITY_HPP_
9 #include <ginkgo/core/base/lin_op.hpp>
34 template <
typename ValueType = default_precision>
42 using value_type = ValueType;
45 std::unique_ptr<LinOp>
transpose()
const override;
54 GKO_DEPRECATED(
"use the version taking a size_type instead of dim<2>")
55 static std::unique_ptr<Identity>
create(
56 std::shared_ptr<const Executor> exec,
dim<2> size);
63 static std::unique_ptr<Identity>
create(
64 std::shared_ptr<const Executor> exec,
size_type size = 0);
69 void apply_impl(
const LinOp* b,
LinOp* x)
const override;
72 LinOp* x)
const override;
88 template <
typename ValueType = default_precision>
94 using value_type = ValueType;
103 static std::unique_ptr<IdentityFactory>
create(
104 std::shared_ptr<const Executor> exec)
106 return std::unique_ptr<IdentityFactory>(
111 std::unique_ptr<LinOp> generate_impl(
112 std::shared_ptr<const LinOp> base)
const override;
124 #endif // GKO_PUBLIC_CORE_MATRIX_IDENTITY_HPP_
Definition: lin_op.hpp:117
Linear operators which support transposition should implement the Transposable interface.
Definition: lin_op.hpp:433
This factory is a utility which can be used to generate Identity operators.
Definition: identity.hpp:89
std::size_t size_type
Integral type used for allocation quantities.
Definition: types.hpp:86
static std::unique_ptr< IdentityFactory > create(std::shared_ptr< const Executor > exec)
Creates a new Identity factory.
Definition: identity.hpp:103
The Ginkgo namespace.
Definition: abstract_factory.hpp:20
std::unique_ptr< LinOp > conj_transpose() const override
Returns a LinOp representing the conjugate transpose of the Transposable object.
static std::unique_ptr< Identity > create(std::shared_ptr< const Executor > exec, dim< 2 > size)
Creates an Identity matrix of the specified size.
This class is a utility which efficiently implements the identity matrix (a linear operator which map...
Definition: identity.hpp:35
std::unique_ptr< LinOp > transpose() const override
Returns a LinOp representing the transpose of the Transposable object.
A LinOpFactory represents a higher order mapping which transforms one linear operator into another.
Definition: lin_op.hpp:384
The EnableLinOp mixin can be used to provide sensible default implementations of the majority of the ...
Definition: lin_op.hpp:877
This mixin inherits from (a subclass of) PolymorphicObject and provides a base implementation of a ne...
Definition: polymorphic_object.hpp:661