PolymorphicObject Class Reference#
|
Reference API
|
#include <ginkgo/core/base/polymorphic_object.hpp>
Public Member Functions | |
| PolymorphicObject & | operator= (const PolymorphicObject &) |
| std::unique_ptr< PolymorphicObject > | create_default (std::shared_ptr< const Executor > exec) const |
| std::unique_ptr< PolymorphicObject > | create_default () const |
| std::unique_ptr< PolymorphicObject > | clone (std::shared_ptr< const Executor > exec) const |
| std::unique_ptr< PolymorphicObject > | clone () const |
| PolymorphicObject * | copy_from (const PolymorphicObject *other) |
| template<typename Derived , typename Deleter > | |
| std::enable_if_t< std::is_base_of< PolymorphicObject, std::decay_t< Derived > >::value, PolymorphicObject > * | copy_from (std::unique_ptr< Derived, Deleter > &&other) |
| template<typename Derived , typename Deleter > | |
| std::enable_if_t< std::is_base_of< PolymorphicObject, std::decay_t< Derived > >::value, PolymorphicObject > * | copy_from (const std::unique_ptr< Derived, Deleter > &other) |
| PolymorphicObject * | copy_from (const std::shared_ptr< const PolymorphicObject > &other) |
| PolymorphicObject * | move_from (ptr_param< PolymorphicObject > other) |
| PolymorphicObject * | clear () |
| std::shared_ptr< const Executor > | get_executor () const noexcept |
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) |
Protected Member Functions | |
| PolymorphicObject (std::shared_ptr< const Executor > exec) | |
| PolymorphicObject (const PolymorphicObject &other) | |
| virtual std::unique_ptr< PolymorphicObject > | create_default_impl (std::shared_ptr< const Executor > exec) const =0 |
| virtual PolymorphicObject * | copy_from_impl (const PolymorphicObject *other)=0 |
| virtual PolymorphicObject * | copy_from_impl (std::unique_ptr< PolymorphicObject > other)=0 |
| virtual PolymorphicObject * | move_from_impl (PolymorphicObject *other)=0 |
| virtual PolymorphicObject * | move_from_impl (std::unique_ptr< PolymorphicObject > other)=0 |
| virtual PolymorphicObject * | clear_impl ()=0 |
Protected Member Functions inherited from gko::log::EnableLogging< PolymorphicObject > | |
| void | log (Params &&... params) const |
Additional Inherited Members | |
Protected Attributes inherited from gko::log::EnableLogging< PolymorphicObject > | |
| std::vector< std::shared_ptr< const Logger > > | loggers_ |
Detailed Description
A PolymorphicObject is the abstract base for all "heavy" objects in Ginkgo that behave polymorphically.
It defines the basic utilities (copying moving, cloning, clearing the objects) for all such objects. It takes into account that these objects are dynamically allocated, managed by smart pointers, and used polymorphically. Additionally, it assumes their data can be allocated on different executors, and that they can be copied between those executors.
- Note
- Most of the public methods of this class should not be overridden directly, and are thus not virtual. Instead, there are equivalent protected methods (ending in <method_name>_impl) that should be overridden instead. This allows polymorphic objects to implement default behavior around virtual methods (parameter checking, type casting).
- See also
- EnablePolymorphicObject if you wish to implement a concrete polymorphic object and have sensible defaults generated automatically. EnableAbstractPolymorphicObject if you wish to implement a new abstract polymorphic object, and have the return types of the methods updated to your type (instead of having them return PolymorphicObject).
Constructor & Destructor Documentation
◆ PolymorphicObject()
|
inlineexplicitprotected |
Creates a new polymorphic object on the requested executor.
- Parameters
-
exec executor where the object will be created
Member Function Documentation
◆ clear()
|
inline |
Transforms the object into its default state.
Equivalent to this->copy_from(this->create_default()).
- See also
- clear_impl() when implementing this method
- Returns
- this
References clear_impl().
◆ clear_impl()
|
protectedpure virtual |
Implementers of PolymorphicObject should implement this function instead of clear().
- Returns
- this
Implemented in gko::EnablePolymorphicObject< ConcreteObject, PolymorphicBase >, gko::EnablePolymorphicObject< Amd< int32 >, LinOpFactory >, gko::EnablePolymorphicObject< Bicg< default_precision >, LinOp >, gko::EnablePolymorphicObject< Bicgstab< default_precision >, BatchLinOp >, gko::EnablePolymorphicObject< Bicgstab< default_precision >, LinOp >, gko::EnablePolymorphicObject< BlockOperator, LinOp >, gko::EnablePolymorphicObject< ByInteraction, gko::stop::Criterion >, gko::EnablePolymorphicObject< CbGmres< default_precision >, LinOp >, gko::EnablePolymorphicObject< Cg< default_precision >, BatchLinOp >, gko::EnablePolymorphicObject< Cg< default_precision >, LinOp >, gko::EnablePolymorphicObject< Cgs< default_precision >, LinOp >, gko::EnablePolymorphicObject< Cholesky< ValueType, IndexType >, LinOpFactory >, gko::EnablePolymorphicObject< Combination< default_precision >, LinOp >, gko::EnablePolymorphicObject< Combined, Criterion >, gko::EnablePolymorphicObject< Composition< default_precision >, LinOp >, gko::EnablePolymorphicObject< Composition< gko::default_precision >, LinOp >, gko::EnablePolymorphicObject< ConcreteBatchLinOp, BatchLinOp >, gko::EnablePolymorphicObject< ConcreteFactory, PolymorphicBase >, gko::EnablePolymorphicObject< ConcreteLinOp, LinOp >, gko::EnablePolymorphicObject< ConcreteSolver, BatchLinOp >, gko::EnablePolymorphicObject< Coo< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Csr< default_precision, int32 >, BatchLinOp >, gko::EnablePolymorphicObject< Csr< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Dense< default_precision >, BatchLinOp >, gko::EnablePolymorphicObject< Dense< default_precision >, LinOp >, gko::EnablePolymorphicObject< Dense< value_type >, LinOp >, gko::EnablePolymorphicObject< Dense< ValueType >, LinOp >, gko::EnablePolymorphicObject< Diagonal< default_precision >, LinOp >, gko::EnablePolymorphicObject< Direct< ValueType, IndexType >, LinOp >, gko::EnablePolymorphicObject< Ell< default_precision, int32 >, BatchLinOp >, gko::EnablePolymorphicObject< Ell< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Factorization< ValueType, IndexType >, LinOp >, gko::EnablePolymorphicObject< Fbcsr< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Fcg< default_precision >, LinOp >, gko::EnablePolymorphicObject< Fft, LinOp >, gko::EnablePolymorphicObject< Fft2, LinOp >, gko::EnablePolymorphicObject< Fft3, LinOp >, gko::EnablePolymorphicObject< FixedCoarsening< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< GaussSeidel< default_precision, int32 >, LinOpFactory >, gko::EnablePolymorphicObject< Gcr< default_precision >, LinOp >, gko::EnablePolymorphicObject< Gmres< default_precision >, LinOp >, gko::EnablePolymorphicObject< Hybrid< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Ic< solver::LowerTrs<>, int32 >, LinOp >, gko::EnablePolymorphicObject< Identity< default_precision >, BatchLinOp >, gko::EnablePolymorphicObject< Identity< default_precision >, LinOp >, gko::EnablePolymorphicObject< IdentityFactory< default_precision >, LinOpFactory >, gko::EnablePolymorphicObject< Idr< default_precision >, LinOp >, gko::EnablePolymorphicObject< Ilu< solver::LowerTrs<>, solver::UpperTrs<>, false, int32 >, LinOp >, gko::EnablePolymorphicObject< Ir< default_precision >, LinOp >, gko::EnablePolymorphicObject< Isai< IsaiType, ValueType, IndexType >, LinOp >, gko::EnablePolymorphicObject< Iteration, Criterion >, gko::EnablePolymorphicObject< Jacobi< default_precision, int32 >, BatchLinOp >, gko::EnablePolymorphicObject< Jacobi< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< LowerTrs< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Lu< ValueType, IndexType >, LinOpFactory >, gko::EnablePolymorphicObject< Matrix< default_precision, int32, int64 >, LinOp >, gko::EnablePolymorphicObject< Mc64< default_precision, int32 >, LinOpFactory >, gko::EnablePolymorphicObject< Minres< default_precision >, LinOp >, gko::EnablePolymorphicObject< Multigrid, LinOp >, gko::EnablePolymorphicObject< MultiVector< default_precision > >, gko::EnablePolymorphicObject< Partition< int32, int64 > >, gko::EnablePolymorphicObject< Permutation< int32 >, LinOp >, gko::EnablePolymorphicObject< Perturbation< default_precision >, LinOp >, gko::EnablePolymorphicObject< Pgm< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Rcm< default_precision, int32 >, ReorderingBase< int32 > >, gko::EnablePolymorphicObject< Rcm< int32 >, LinOpFactory >, gko::EnablePolymorphicObject< ResidualNormBase< default_precision >, Criterion >, gko::EnablePolymorphicObject< ResidualNormBase< ValueType >, Criterion >, gko::EnablePolymorphicObject< RowGatherer< int32 >, LinOp >, gko::EnablePolymorphicObject< ScaledPermutation< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< ScaledReordered< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Schwarz< default_precision, int32, int64 >, LinOp >, gko::EnablePolymorphicObject< Sellp< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Sor< default_precision, int32 >, LinOpFactory >, gko::EnablePolymorphicObject< SparsityCsr< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< StencilMatrix< ValueType >, LinOp >, gko::EnablePolymorphicObject< Time, Criterion >, gko::EnablePolymorphicObject< UpperTrs< default_precision, int32 >, LinOp >, and gko::EnablePolymorphicObject< Vector< double >, LinOp >.
Referenced by clear().
◆ clone() [1/2]
|
inline |
◆ clone() [2/2]
|
inline |
Creates a clone of the object.
This is the polymorphic equivalent of the executor copy constructor decltype(*this)(exec, this).
- Parameters
-
exec the executor where the clone will be created
- Returns
- A clone of the LinOp.
References create_default().
◆ copy_from() [1/4]
|
inline |
Copies another object into this object.
This is the polymorphic equivalent of the copy assignment operator.
- Parameters
-
other the object to copy
- Returns
- this
References copy_from_impl().
Referenced by copy_from(), and copy_from().
◆ copy_from() [2/4]
|
inline |
Copies another object into this object.
This is the polymorphic equivalent of the copy assignment operator.
- Parameters
-
other the object to copy
- Returns
- this
References copy_from().
◆ copy_from() [3/4]
|
inline |
Copies another object into this object.
This is the polymorphic equivalent of the copy assignment operator.
- Parameters
-
other the object to copy
- Returns
- this
- Template Parameters
-
Derived the actual pointee type of the parameter, it needs to be derived from PolymorphicObject. Deleter the deleter of the unique_ptr parameter
References copy_from().
◆ copy_from() [4/4]
|
inline |
Moves another object into this object.
This is the polymorphic equivalent of the move assignment operator.
- Parameters
-
other the object to move from
- Returns
- this
- Template Parameters
-
Derived the actual pointee type of the parameter, it needs to be derived from PolymorphicObject. Deleter the deleter of the unique_ptr parameter
References copy_from_impl().
◆ copy_from_impl() [1/2]
|
protectedpure virtual |
Implementers of PolymorphicObject should implement this function instead of copy_from(const PolymorphicObject *).
- Parameters
-
other the object to copy
- Returns
- this
Implemented in gko::EnablePolymorphicObject< ConcreteObject, PolymorphicBase >, gko::EnablePolymorphicObject< Amd< int32 >, LinOpFactory >, gko::EnablePolymorphicObject< Bicg< default_precision >, LinOp >, gko::EnablePolymorphicObject< Bicgstab< default_precision >, BatchLinOp >, gko::EnablePolymorphicObject< Bicgstab< default_precision >, LinOp >, gko::EnablePolymorphicObject< BlockOperator, LinOp >, gko::EnablePolymorphicObject< ByInteraction, gko::stop::Criterion >, gko::EnablePolymorphicObject< CbGmres< default_precision >, LinOp >, gko::EnablePolymorphicObject< Cg< default_precision >, BatchLinOp >, gko::EnablePolymorphicObject< Cg< default_precision >, LinOp >, gko::EnablePolymorphicObject< Cgs< default_precision >, LinOp >, gko::EnablePolymorphicObject< Cholesky< ValueType, IndexType >, LinOpFactory >, gko::EnablePolymorphicObject< Combination< default_precision >, LinOp >, gko::EnablePolymorphicObject< Combined, Criterion >, gko::EnablePolymorphicObject< Composition< default_precision >, LinOp >, gko::EnablePolymorphicObject< Composition< gko::default_precision >, LinOp >, gko::EnablePolymorphicObject< ConcreteBatchLinOp, BatchLinOp >, gko::EnablePolymorphicObject< ConcreteFactory, PolymorphicBase >, gko::EnablePolymorphicObject< ConcreteLinOp, LinOp >, gko::EnablePolymorphicObject< ConcreteSolver, BatchLinOp >, gko::EnablePolymorphicObject< Coo< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Csr< default_precision, int32 >, BatchLinOp >, gko::EnablePolymorphicObject< Csr< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Dense< default_precision >, BatchLinOp >, gko::EnablePolymorphicObject< Dense< default_precision >, LinOp >, gko::EnablePolymorphicObject< Dense< value_type >, LinOp >, gko::EnablePolymorphicObject< Dense< ValueType >, LinOp >, gko::EnablePolymorphicObject< Diagonal< default_precision >, LinOp >, gko::EnablePolymorphicObject< Direct< ValueType, IndexType >, LinOp >, gko::EnablePolymorphicObject< Ell< default_precision, int32 >, BatchLinOp >, gko::EnablePolymorphicObject< Ell< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Factorization< ValueType, IndexType >, LinOp >, gko::EnablePolymorphicObject< Fbcsr< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Fcg< default_precision >, LinOp >, gko::EnablePolymorphicObject< Fft, LinOp >, gko::EnablePolymorphicObject< Fft2, LinOp >, gko::EnablePolymorphicObject< Fft3, LinOp >, gko::EnablePolymorphicObject< FixedCoarsening< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< GaussSeidel< default_precision, int32 >, LinOpFactory >, gko::EnablePolymorphicObject< Gcr< default_precision >, LinOp >, gko::EnablePolymorphicObject< Gmres< default_precision >, LinOp >, gko::EnablePolymorphicObject< Hybrid< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Ic< solver::LowerTrs<>, int32 >, LinOp >, gko::EnablePolymorphicObject< Identity< default_precision >, BatchLinOp >, gko::EnablePolymorphicObject< Identity< default_precision >, LinOp >, gko::EnablePolymorphicObject< IdentityFactory< default_precision >, LinOpFactory >, gko::EnablePolymorphicObject< Idr< default_precision >, LinOp >, gko::EnablePolymorphicObject< Ilu< solver::LowerTrs<>, solver::UpperTrs<>, false, int32 >, LinOp >, gko::EnablePolymorphicObject< Ir< default_precision >, LinOp >, gko::EnablePolymorphicObject< Isai< IsaiType, ValueType, IndexType >, LinOp >, gko::EnablePolymorphicObject< Iteration, Criterion >, gko::EnablePolymorphicObject< Jacobi< default_precision, int32 >, BatchLinOp >, gko::EnablePolymorphicObject< Jacobi< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< LowerTrs< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Lu< ValueType, IndexType >, LinOpFactory >, gko::EnablePolymorphicObject< Matrix< default_precision, int32, int64 >, LinOp >, gko::EnablePolymorphicObject< Mc64< default_precision, int32 >, LinOpFactory >, gko::EnablePolymorphicObject< Minres< default_precision >, LinOp >, gko::EnablePolymorphicObject< Multigrid, LinOp >, gko::EnablePolymorphicObject< MultiVector< default_precision > >, gko::EnablePolymorphicObject< Partition< int32, int64 > >, gko::EnablePolymorphicObject< Permutation< int32 >, LinOp >, gko::EnablePolymorphicObject< Perturbation< default_precision >, LinOp >, gko::EnablePolymorphicObject< Pgm< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Rcm< default_precision, int32 >, ReorderingBase< int32 > >, gko::EnablePolymorphicObject< Rcm< int32 >, LinOpFactory >, gko::EnablePolymorphicObject< ResidualNormBase< default_precision >, Criterion >, gko::EnablePolymorphicObject< ResidualNormBase< ValueType >, Criterion >, gko::EnablePolymorphicObject< RowGatherer< int32 >, LinOp >, gko::EnablePolymorphicObject< ScaledPermutation< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< ScaledReordered< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Schwarz< default_precision, int32, int64 >, LinOp >, gko::EnablePolymorphicObject< Sellp< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Sor< default_precision, int32 >, LinOpFactory >, gko::EnablePolymorphicObject< SparsityCsr< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< StencilMatrix< ValueType >, LinOp >, gko::EnablePolymorphicObject< Time, Criterion >, gko::EnablePolymorphicObject< UpperTrs< default_precision, int32 >, LinOp >, and gko::EnablePolymorphicObject< Vector< double >, LinOp >.
Referenced by copy_from(), and copy_from().
◆ copy_from_impl() [2/2]
|
protectedpure virtual |
Implementers of PolymorphicObject should implement this function instead of copy_from(std::unique_ptr<PolymorphicObject>).
- Parameters
-
other the object to move from
- Returns
- this
Implemented in gko::EnablePolymorphicObject< ConcreteObject, PolymorphicBase >, gko::EnablePolymorphicObject< Amd< int32 >, LinOpFactory >, gko::EnablePolymorphicObject< Bicg< default_precision >, LinOp >, gko::EnablePolymorphicObject< Bicgstab< default_precision >, BatchLinOp >, gko::EnablePolymorphicObject< Bicgstab< default_precision >, LinOp >, gko::EnablePolymorphicObject< BlockOperator, LinOp >, gko::EnablePolymorphicObject< ByInteraction, gko::stop::Criterion >, gko::EnablePolymorphicObject< CbGmres< default_precision >, LinOp >, gko::EnablePolymorphicObject< Cg< default_precision >, BatchLinOp >, gko::EnablePolymorphicObject< Cg< default_precision >, LinOp >, gko::EnablePolymorphicObject< Cgs< default_precision >, LinOp >, gko::EnablePolymorphicObject< Cholesky< ValueType, IndexType >, LinOpFactory >, gko::EnablePolymorphicObject< Combination< default_precision >, LinOp >, gko::EnablePolymorphicObject< Combined, Criterion >, gko::EnablePolymorphicObject< Composition< default_precision >, LinOp >, gko::EnablePolymorphicObject< Composition< gko::default_precision >, LinOp >, gko::EnablePolymorphicObject< ConcreteBatchLinOp, BatchLinOp >, gko::EnablePolymorphicObject< ConcreteFactory, PolymorphicBase >, gko::EnablePolymorphicObject< ConcreteLinOp, LinOp >, gko::EnablePolymorphicObject< ConcreteSolver, BatchLinOp >, gko::EnablePolymorphicObject< Coo< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Csr< default_precision, int32 >, BatchLinOp >, gko::EnablePolymorphicObject< Csr< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Dense< default_precision >, BatchLinOp >, gko::EnablePolymorphicObject< Dense< default_precision >, LinOp >, gko::EnablePolymorphicObject< Dense< value_type >, LinOp >, gko::EnablePolymorphicObject< Dense< ValueType >, LinOp >, gko::EnablePolymorphicObject< Diagonal< default_precision >, LinOp >, gko::EnablePolymorphicObject< Direct< ValueType, IndexType >, LinOp >, gko::EnablePolymorphicObject< Ell< default_precision, int32 >, BatchLinOp >, gko::EnablePolymorphicObject< Ell< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Factorization< ValueType, IndexType >, LinOp >, gko::EnablePolymorphicObject< Fbcsr< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Fcg< default_precision >, LinOp >, gko::EnablePolymorphicObject< Fft, LinOp >, gko::EnablePolymorphicObject< Fft2, LinOp >, gko::EnablePolymorphicObject< Fft3, LinOp >, gko::EnablePolymorphicObject< FixedCoarsening< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< GaussSeidel< default_precision, int32 >, LinOpFactory >, gko::EnablePolymorphicObject< Gcr< default_precision >, LinOp >, gko::EnablePolymorphicObject< Gmres< default_precision >, LinOp >, gko::EnablePolymorphicObject< Hybrid< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Ic< solver::LowerTrs<>, int32 >, LinOp >, gko::EnablePolymorphicObject< Identity< default_precision >, BatchLinOp >, gko::EnablePolymorphicObject< Identity< default_precision >, LinOp >, gko::EnablePolymorphicObject< IdentityFactory< default_precision >, LinOpFactory >, gko::EnablePolymorphicObject< Idr< default_precision >, LinOp >, gko::EnablePolymorphicObject< Ilu< solver::LowerTrs<>, solver::UpperTrs<>, false, int32 >, LinOp >, gko::EnablePolymorphicObject< Ir< default_precision >, LinOp >, gko::EnablePolymorphicObject< Isai< IsaiType, ValueType, IndexType >, LinOp >, gko::EnablePolymorphicObject< Iteration, Criterion >, gko::EnablePolymorphicObject< Jacobi< default_precision, int32 >, BatchLinOp >, gko::EnablePolymorphicObject< Jacobi< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< LowerTrs< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Lu< ValueType, IndexType >, LinOpFactory >, gko::EnablePolymorphicObject< Matrix< default_precision, int32, int64 >, LinOp >, gko::EnablePolymorphicObject< Mc64< default_precision, int32 >, LinOpFactory >, gko::EnablePolymorphicObject< Minres< default_precision >, LinOp >, gko::EnablePolymorphicObject< Multigrid, LinOp >, gko::EnablePolymorphicObject< MultiVector< default_precision > >, gko::EnablePolymorphicObject< Partition< int32, int64 > >, gko::EnablePolymorphicObject< Permutation< int32 >, LinOp >, gko::EnablePolymorphicObject< Perturbation< default_precision >, LinOp >, gko::EnablePolymorphicObject< Pgm< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Rcm< default_precision, int32 >, ReorderingBase< int32 > >, gko::EnablePolymorphicObject< Rcm< int32 >, LinOpFactory >, gko::EnablePolymorphicObject< ResidualNormBase< default_precision >, Criterion >, gko::EnablePolymorphicObject< ResidualNormBase< ValueType >, Criterion >, gko::EnablePolymorphicObject< RowGatherer< int32 >, LinOp >, gko::EnablePolymorphicObject< ScaledPermutation< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< ScaledReordered< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Schwarz< default_precision, int32, int64 >, LinOp >, gko::EnablePolymorphicObject< Sellp< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Sor< default_precision, int32 >, LinOpFactory >, gko::EnablePolymorphicObject< SparsityCsr< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< StencilMatrix< ValueType >, LinOp >, gko::EnablePolymorphicObject< Time, Criterion >, gko::EnablePolymorphicObject< UpperTrs< default_precision, int32 >, LinOp >, and gko::EnablePolymorphicObject< Vector< double >, LinOp >.
◆ create_default() [1/2]
|
inline |
Creates a new "default" object of the same dynamic type as this object.
This is a shorthand for create_default(std::shared_ptr<const Executor>) that uses the executor of this object to construct the new object.
- Returns
- a polymorphic object of the same type as this
References create_default().
Referenced by clone(), and create_default().
◆ create_default() [2/2]
|
inline |
Creates a new "default" object of the same dynamic type as this object.
This is the polymorphic equivalent of the executor default constructor decltype(*this)(exec);.
- Parameters
-
exec the executor where the object will be created
- Returns
- a polymorphic object of the same type as this
References create_default_impl().
◆ create_default_impl()
|
protectedpure virtual |
Implementers of PolymorphicObject should override this function instead of create_default().
- Parameters
-
exec the executor where the object will be created
- Returns
- a polymorphic object of the same type as this
Implemented in gko::EnablePolymorphicObject< ConcreteObject, PolymorphicBase >, gko::EnablePolymorphicObject< Amd< int32 >, LinOpFactory >, gko::EnablePolymorphicObject< Bicg< default_precision >, LinOp >, gko::EnablePolymorphicObject< Bicgstab< default_precision >, BatchLinOp >, gko::EnablePolymorphicObject< Bicgstab< default_precision >, LinOp >, gko::EnablePolymorphicObject< BlockOperator, LinOp >, gko::EnablePolymorphicObject< ByInteraction, gko::stop::Criterion >, gko::EnablePolymorphicObject< CbGmres< default_precision >, LinOp >, gko::EnablePolymorphicObject< Cg< default_precision >, BatchLinOp >, gko::EnablePolymorphicObject< Cg< default_precision >, LinOp >, gko::EnablePolymorphicObject< Cgs< default_precision >, LinOp >, gko::EnablePolymorphicObject< Cholesky< ValueType, IndexType >, LinOpFactory >, gko::EnablePolymorphicObject< Combination< default_precision >, LinOp >, gko::EnablePolymorphicObject< Combined, Criterion >, gko::EnablePolymorphicObject< Composition< default_precision >, LinOp >, gko::EnablePolymorphicObject< Composition< gko::default_precision >, LinOp >, gko::EnablePolymorphicObject< ConcreteBatchLinOp, BatchLinOp >, gko::EnablePolymorphicObject< ConcreteFactory, PolymorphicBase >, gko::EnablePolymorphicObject< ConcreteLinOp, LinOp >, gko::EnablePolymorphicObject< ConcreteSolver, BatchLinOp >, gko::EnablePolymorphicObject< Coo< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Csr< default_precision, int32 >, BatchLinOp >, gko::EnablePolymorphicObject< Csr< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Dense< default_precision >, BatchLinOp >, gko::EnablePolymorphicObject< Dense< default_precision >, LinOp >, gko::EnablePolymorphicObject< Dense< value_type >, LinOp >, gko::EnablePolymorphicObject< Dense< ValueType >, LinOp >, gko::EnablePolymorphicObject< Diagonal< default_precision >, LinOp >, gko::EnablePolymorphicObject< Direct< ValueType, IndexType >, LinOp >, gko::EnablePolymorphicObject< Ell< default_precision, int32 >, BatchLinOp >, gko::EnablePolymorphicObject< Ell< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Factorization< ValueType, IndexType >, LinOp >, gko::EnablePolymorphicObject< Fbcsr< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Fcg< default_precision >, LinOp >, gko::EnablePolymorphicObject< Fft, LinOp >, gko::EnablePolymorphicObject< Fft2, LinOp >, gko::EnablePolymorphicObject< Fft3, LinOp >, gko::EnablePolymorphicObject< FixedCoarsening< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< GaussSeidel< default_precision, int32 >, LinOpFactory >, gko::EnablePolymorphicObject< Gcr< default_precision >, LinOp >, gko::EnablePolymorphicObject< Gmres< default_precision >, LinOp >, gko::EnablePolymorphicObject< Hybrid< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Ic< solver::LowerTrs<>, int32 >, LinOp >, gko::EnablePolymorphicObject< Identity< default_precision >, BatchLinOp >, gko::EnablePolymorphicObject< Identity< default_precision >, LinOp >, gko::EnablePolymorphicObject< IdentityFactory< default_precision >, LinOpFactory >, gko::EnablePolymorphicObject< Idr< default_precision >, LinOp >, gko::EnablePolymorphicObject< Ilu< solver::LowerTrs<>, solver::UpperTrs<>, false, int32 >, LinOp >, gko::EnablePolymorphicObject< Ir< default_precision >, LinOp >, gko::EnablePolymorphicObject< Isai< IsaiType, ValueType, IndexType >, LinOp >, gko::EnablePolymorphicObject< Iteration, Criterion >, gko::EnablePolymorphicObject< Jacobi< default_precision, int32 >, BatchLinOp >, gko::EnablePolymorphicObject< Jacobi< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< LowerTrs< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Lu< ValueType, IndexType >, LinOpFactory >, gko::EnablePolymorphicObject< Matrix< default_precision, int32, int64 >, LinOp >, gko::EnablePolymorphicObject< Mc64< default_precision, int32 >, LinOpFactory >, gko::EnablePolymorphicObject< Minres< default_precision >, LinOp >, gko::EnablePolymorphicObject< Multigrid, LinOp >, gko::EnablePolymorphicObject< MultiVector< default_precision > >, gko::EnablePolymorphicObject< Partition< int32, int64 > >, gko::EnablePolymorphicObject< Permutation< int32 >, LinOp >, gko::EnablePolymorphicObject< Perturbation< default_precision >, LinOp >, gko::EnablePolymorphicObject< Pgm< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Rcm< default_precision, int32 >, ReorderingBase< int32 > >, gko::EnablePolymorphicObject< Rcm< int32 >, LinOpFactory >, gko::EnablePolymorphicObject< ResidualNormBase< default_precision >, Criterion >, gko::EnablePolymorphicObject< ResidualNormBase< ValueType >, Criterion >, gko::EnablePolymorphicObject< RowGatherer< int32 >, LinOp >, gko::EnablePolymorphicObject< ScaledPermutation< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< ScaledReordered< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Schwarz< default_precision, int32, int64 >, LinOp >, gko::EnablePolymorphicObject< Sellp< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Sor< default_precision, int32 >, LinOpFactory >, gko::EnablePolymorphicObject< SparsityCsr< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< StencilMatrix< ValueType >, LinOp >, gko::EnablePolymorphicObject< Time, Criterion >, gko::EnablePolymorphicObject< UpperTrs< default_precision, int32 >, LinOp >, and gko::EnablePolymorphicObject< Vector< double >, LinOp >.
Referenced by create_default().
◆ get_executor()
|
inlinenoexcept |
Returns the Executor of the object.
- Returns
- Executor of the object
Referenced by gko::LinOp::apply(), gko::LinOp::apply(), gko::LinOp::apply(), gko::LinOp::apply(), gko::EnablePolymorphicObject< ConcreteObject, PolymorphicBase >::clear_impl(), gko::preconditioner::Jacobi< ValueType, IndexType >::compute_storage_scheme(), gko::preconditioner::Ic< LSolverType, IndexType >::conj_transpose(), gko::preconditioner::Ilu< LSolverType, USolverType, ReverseApply, IndexType >::conj_transpose(), gko::matrix::Dense< ValueType >::create_const_view_of_impl(), gko::matrix::Dense< ValueType >::create_view_of_impl(), gko::matrix::Dense< ValueType >::create_with_same_config(), gko::matrix::Csr< ValueType, IndexType >::inv_scale(), gko::preconditioner::Jacobi< ValueType, IndexType >::Jacobi(), gko::preconditioner::Ic< LSolverType, IndexType >::operator=(), gko::preconditioner::Ilu< LSolverType, USolverType, ReverseApply, IndexType >::operator=(), gko::preconditioner::Ic< LSolverType, IndexType >::operator=(), gko::preconditioner::Ilu< LSolverType, USolverType, ReverseApply, IndexType >::operator=(), gko::matrix::Csr< ValueType, IndexType >::scale(), gko::preconditioner::Ic< LSolverType, IndexType >::set_cache_to(), gko::preconditioner::Ilu< LSolverType, USolverType, ReverseApply, IndexType >::set_cache_to(), gko::experimental::reorder::ScaledReordered< ValueType, IndexType >::set_cache_to(), gko::preconditioner::Ic< LSolverType, IndexType >::transpose(), and gko::preconditioner::Ilu< LSolverType, USolverType, ReverseApply, IndexType >::transpose().
◆ move_from()
|
inline |
Moves another object into this object.
This is the polymorphic equivalent of the move assignment operator.
- Parameters
-
other the object to move from
- Returns
- this
References gko::ptr_param< T >::get(), and move_from_impl().
◆ move_from_impl() [1/2]
|
protectedpure virtual |
Implementers of PolymorphicObject should implement this function instead of move_from(PolymorphicObject *).
- Parameters
-
other the object to move from
- Returns
- this
Implemented in gko::EnablePolymorphicObject< ConcreteObject, PolymorphicBase >, gko::EnablePolymorphicObject< Amd< int32 >, LinOpFactory >, gko::EnablePolymorphicObject< Bicg< default_precision >, LinOp >, gko::EnablePolymorphicObject< Bicgstab< default_precision >, BatchLinOp >, gko::EnablePolymorphicObject< Bicgstab< default_precision >, LinOp >, gko::EnablePolymorphicObject< BlockOperator, LinOp >, gko::EnablePolymorphicObject< ByInteraction, gko::stop::Criterion >, gko::EnablePolymorphicObject< CbGmres< default_precision >, LinOp >, gko::EnablePolymorphicObject< Cg< default_precision >, BatchLinOp >, gko::EnablePolymorphicObject< Cg< default_precision >, LinOp >, gko::EnablePolymorphicObject< Cgs< default_precision >, LinOp >, gko::EnablePolymorphicObject< Cholesky< ValueType, IndexType >, LinOpFactory >, gko::EnablePolymorphicObject< Combination< default_precision >, LinOp >, gko::EnablePolymorphicObject< Combined, Criterion >, gko::EnablePolymorphicObject< Composition< default_precision >, LinOp >, gko::EnablePolymorphicObject< Composition< gko::default_precision >, LinOp >, gko::EnablePolymorphicObject< ConcreteBatchLinOp, BatchLinOp >, gko::EnablePolymorphicObject< ConcreteFactory, PolymorphicBase >, gko::EnablePolymorphicObject< ConcreteLinOp, LinOp >, gko::EnablePolymorphicObject< ConcreteSolver, BatchLinOp >, gko::EnablePolymorphicObject< Coo< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Csr< default_precision, int32 >, BatchLinOp >, gko::EnablePolymorphicObject< Csr< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Dense< default_precision >, BatchLinOp >, gko::EnablePolymorphicObject< Dense< default_precision >, LinOp >, gko::EnablePolymorphicObject< Dense< value_type >, LinOp >, gko::EnablePolymorphicObject< Dense< ValueType >, LinOp >, gko::EnablePolymorphicObject< Diagonal< default_precision >, LinOp >, gko::EnablePolymorphicObject< Direct< ValueType, IndexType >, LinOp >, gko::EnablePolymorphicObject< Ell< default_precision, int32 >, BatchLinOp >, gko::EnablePolymorphicObject< Ell< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Factorization< ValueType, IndexType >, LinOp >, gko::EnablePolymorphicObject< Fbcsr< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Fcg< default_precision >, LinOp >, gko::EnablePolymorphicObject< Fft, LinOp >, gko::EnablePolymorphicObject< Fft2, LinOp >, gko::EnablePolymorphicObject< Fft3, LinOp >, gko::EnablePolymorphicObject< FixedCoarsening< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< GaussSeidel< default_precision, int32 >, LinOpFactory >, gko::EnablePolymorphicObject< Gcr< default_precision >, LinOp >, gko::EnablePolymorphicObject< Gmres< default_precision >, LinOp >, gko::EnablePolymorphicObject< Hybrid< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Ic< solver::LowerTrs<>, int32 >, LinOp >, gko::EnablePolymorphicObject< Identity< default_precision >, BatchLinOp >, gko::EnablePolymorphicObject< Identity< default_precision >, LinOp >, gko::EnablePolymorphicObject< IdentityFactory< default_precision >, LinOpFactory >, gko::EnablePolymorphicObject< Idr< default_precision >, LinOp >, gko::EnablePolymorphicObject< Ilu< solver::LowerTrs<>, solver::UpperTrs<>, false, int32 >, LinOp >, gko::EnablePolymorphicObject< Ir< default_precision >, LinOp >, gko::EnablePolymorphicObject< Isai< IsaiType, ValueType, IndexType >, LinOp >, gko::EnablePolymorphicObject< Iteration, Criterion >, gko::EnablePolymorphicObject< Jacobi< default_precision, int32 >, BatchLinOp >, gko::EnablePolymorphicObject< Jacobi< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< LowerTrs< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Lu< ValueType, IndexType >, LinOpFactory >, gko::EnablePolymorphicObject< Matrix< default_precision, int32, int64 >, LinOp >, gko::EnablePolymorphicObject< Mc64< default_precision, int32 >, LinOpFactory >, gko::EnablePolymorphicObject< Minres< default_precision >, LinOp >, gko::EnablePolymorphicObject< Multigrid, LinOp >, gko::EnablePolymorphicObject< MultiVector< default_precision > >, gko::EnablePolymorphicObject< Partition< int32, int64 > >, gko::EnablePolymorphicObject< Permutation< int32 >, LinOp >, gko::EnablePolymorphicObject< Perturbation< default_precision >, LinOp >, gko::EnablePolymorphicObject< Pgm< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Rcm< default_precision, int32 >, ReorderingBase< int32 > >, gko::EnablePolymorphicObject< Rcm< int32 >, LinOpFactory >, gko::EnablePolymorphicObject< ResidualNormBase< default_precision >, Criterion >, gko::EnablePolymorphicObject< ResidualNormBase< ValueType >, Criterion >, gko::EnablePolymorphicObject< RowGatherer< int32 >, LinOp >, gko::EnablePolymorphicObject< ScaledPermutation< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< ScaledReordered< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Schwarz< default_precision, int32, int64 >, LinOp >, gko::EnablePolymorphicObject< Sellp< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Sor< default_precision, int32 >, LinOpFactory >, gko::EnablePolymorphicObject< SparsityCsr< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< StencilMatrix< ValueType >, LinOp >, gko::EnablePolymorphicObject< Time, Criterion >, gko::EnablePolymorphicObject< UpperTrs< default_precision, int32 >, LinOp >, and gko::EnablePolymorphicObject< Vector< double >, LinOp >.
Referenced by move_from().
◆ move_from_impl() [2/2]
|
protectedpure virtual |
Implementers of PolymorphicObject should implement this function instead of move_from(std::unique_ptr<PolymorphicObject>).
- Parameters
-
other the object to move from
- Returns
- this
Implemented in gko::EnablePolymorphicObject< ConcreteObject, PolymorphicBase >, gko::EnablePolymorphicObject< Amd< int32 >, LinOpFactory >, gko::EnablePolymorphicObject< Bicg< default_precision >, LinOp >, gko::EnablePolymorphicObject< Bicgstab< default_precision >, BatchLinOp >, gko::EnablePolymorphicObject< Bicgstab< default_precision >, LinOp >, gko::EnablePolymorphicObject< BlockOperator, LinOp >, gko::EnablePolymorphicObject< ByInteraction, gko::stop::Criterion >, gko::EnablePolymorphicObject< CbGmres< default_precision >, LinOp >, gko::EnablePolymorphicObject< Cg< default_precision >, BatchLinOp >, gko::EnablePolymorphicObject< Cg< default_precision >, LinOp >, gko::EnablePolymorphicObject< Cgs< default_precision >, LinOp >, gko::EnablePolymorphicObject< Cholesky< ValueType, IndexType >, LinOpFactory >, gko::EnablePolymorphicObject< Combination< default_precision >, LinOp >, gko::EnablePolymorphicObject< Combined, Criterion >, gko::EnablePolymorphicObject< Composition< default_precision >, LinOp >, gko::EnablePolymorphicObject< Composition< gko::default_precision >, LinOp >, gko::EnablePolymorphicObject< ConcreteBatchLinOp, BatchLinOp >, gko::EnablePolymorphicObject< ConcreteFactory, PolymorphicBase >, gko::EnablePolymorphicObject< ConcreteLinOp, LinOp >, gko::EnablePolymorphicObject< ConcreteSolver, BatchLinOp >, gko::EnablePolymorphicObject< Coo< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Csr< default_precision, int32 >, BatchLinOp >, gko::EnablePolymorphicObject< Csr< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Dense< default_precision >, BatchLinOp >, gko::EnablePolymorphicObject< Dense< default_precision >, LinOp >, gko::EnablePolymorphicObject< Dense< value_type >, LinOp >, gko::EnablePolymorphicObject< Dense< ValueType >, LinOp >, gko::EnablePolymorphicObject< Diagonal< default_precision >, LinOp >, gko::EnablePolymorphicObject< Direct< ValueType, IndexType >, LinOp >, gko::EnablePolymorphicObject< Ell< default_precision, int32 >, BatchLinOp >, gko::EnablePolymorphicObject< Ell< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Factorization< ValueType, IndexType >, LinOp >, gko::EnablePolymorphicObject< Fbcsr< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Fcg< default_precision >, LinOp >, gko::EnablePolymorphicObject< Fft, LinOp >, gko::EnablePolymorphicObject< Fft2, LinOp >, gko::EnablePolymorphicObject< Fft3, LinOp >, gko::EnablePolymorphicObject< FixedCoarsening< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< GaussSeidel< default_precision, int32 >, LinOpFactory >, gko::EnablePolymorphicObject< Gcr< default_precision >, LinOp >, gko::EnablePolymorphicObject< Gmres< default_precision >, LinOp >, gko::EnablePolymorphicObject< Hybrid< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Ic< solver::LowerTrs<>, int32 >, LinOp >, gko::EnablePolymorphicObject< Identity< default_precision >, BatchLinOp >, gko::EnablePolymorphicObject< Identity< default_precision >, LinOp >, gko::EnablePolymorphicObject< IdentityFactory< default_precision >, LinOpFactory >, gko::EnablePolymorphicObject< Idr< default_precision >, LinOp >, gko::EnablePolymorphicObject< Ilu< solver::LowerTrs<>, solver::UpperTrs<>, false, int32 >, LinOp >, gko::EnablePolymorphicObject< Ir< default_precision >, LinOp >, gko::EnablePolymorphicObject< Isai< IsaiType, ValueType, IndexType >, LinOp >, gko::EnablePolymorphicObject< Iteration, Criterion >, gko::EnablePolymorphicObject< Jacobi< default_precision, int32 >, BatchLinOp >, gko::EnablePolymorphicObject< Jacobi< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< LowerTrs< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Lu< ValueType, IndexType >, LinOpFactory >, gko::EnablePolymorphicObject< Matrix< default_precision, int32, int64 >, LinOp >, gko::EnablePolymorphicObject< Mc64< default_precision, int32 >, LinOpFactory >, gko::EnablePolymorphicObject< Minres< default_precision >, LinOp >, gko::EnablePolymorphicObject< Multigrid, LinOp >, gko::EnablePolymorphicObject< MultiVector< default_precision > >, gko::EnablePolymorphicObject< Partition< int32, int64 > >, gko::EnablePolymorphicObject< Permutation< int32 >, LinOp >, gko::EnablePolymorphicObject< Perturbation< default_precision >, LinOp >, gko::EnablePolymorphicObject< Pgm< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Rcm< default_precision, int32 >, ReorderingBase< int32 > >, gko::EnablePolymorphicObject< Rcm< int32 >, LinOpFactory >, gko::EnablePolymorphicObject< ResidualNormBase< default_precision >, Criterion >, gko::EnablePolymorphicObject< ResidualNormBase< ValueType >, Criterion >, gko::EnablePolymorphicObject< RowGatherer< int32 >, LinOp >, gko::EnablePolymorphicObject< ScaledPermutation< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< ScaledReordered< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Schwarz< default_precision, int32, int64 >, LinOp >, gko::EnablePolymorphicObject< Sellp< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Sor< default_precision, int32 >, LinOpFactory >, gko::EnablePolymorphicObject< SparsityCsr< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< StencilMatrix< ValueType >, LinOp >, gko::EnablePolymorphicObject< Time, Criterion >, gko::EnablePolymorphicObject< UpperTrs< default_precision, int32 >, LinOp >, and gko::EnablePolymorphicObject< Vector< double >, LinOp >.
The documentation for this class was generated from the following file:
- ginkgo/core/base/polymorphic_object.hpp
Generated by
Public Member Functions inherited from