EnableAbstractPolymorphicObject< AbstractObject, PolymorphicBase > Class Template Reference

EnableAbstractPolymorphicObject&lt; AbstractObject, PolymorphicBase &gt; Class Template Reference#

Reference API: gko::EnableAbstractPolymorphicObject< AbstractObject, PolymorphicBase > Class Template Reference
Reference API
gko::EnableAbstractPolymorphicObject< AbstractObject, PolymorphicBase > Class Template Reference

#include <ginkgo/core/base/polymorphic_object.hpp>

Inherits gko::PolymorphicObject.

Inherited by gko::AbstractFactory< LinOp, std::shared_ptr< const LinOp > >, gko::AbstractFactory< BatchLinOp, std::shared_ptr< const BatchLinOp > >, gko::EnablePolymorphicObject< ByInteraction, gko::stop::Criterion >, gko::EnablePolymorphicObject< StencilMatrix< ValueType >, LinOp >, gko::EnablePolymorphicObject< BlockOperator, LinOp >, gko::EnablePolymorphicObject< Combination< default_precision >, LinOp >, gko::EnablePolymorphicObject< Composition< default_precision >, LinOp >, gko::EnablePolymorphicObject< ConcreteFactory, PolymorphicBase >, gko::EnablePolymorphicObject< ConcreteLinOp, LinOp >, gko::EnablePolymorphicObject< Perturbation< default_precision >, LinOp >, gko::EnablePolymorphicObject< ConcreteBatchLinOp, BatchLinOp >, gko::EnablePolymorphicObject< MultiVector< default_precision > >, gko::EnablePolymorphicObject< Csr< default_precision, int32 >, BatchLinOp >, gko::EnablePolymorphicObject< Dense< default_precision >, BatchLinOp >, gko::EnablePolymorphicObject< Ell< default_precision, int32 >, BatchLinOp >, gko::EnablePolymorphicObject< Identity< default_precision >, BatchLinOp >, gko::EnablePolymorphicObject< Jacobi< default_precision, int32 >, BatchLinOp >, gko::EnablePolymorphicObject< Bicgstab< default_precision >, BatchLinOp >, gko::EnablePolymorphicObject< Cg< default_precision >, BatchLinOp >, gko::EnablePolymorphicObject< ConcreteSolver, BatchLinOp >, gko::EnablePolymorphicObject< Matrix< default_precision, int32, int64 >, LinOp >, gko::EnablePolymorphicObject< Partition< int32, int64 > >, gko::EnablePolymorphicObject< Vector< double >, LinOp >, gko::EnablePolymorphicObject< Schwarz< default_precision, int32, int64 >, LinOp >, gko::EnablePolymorphicObject< Cholesky< ValueType, IndexType >, LinOpFactory >, gko::EnablePolymorphicObject< Factorization< ValueType, IndexType >, LinOp >, gko::EnablePolymorphicObject< Lu< ValueType, IndexType >, LinOpFactory >, gko::EnablePolymorphicObject< Amd< int32 >, LinOpFactory >, gko::EnablePolymorphicObject< Mc64< default_precision, int32 >, LinOpFactory >, gko::EnablePolymorphicObject< Rcm< int32 >, LinOpFactory >, gko::EnablePolymorphicObject< ScaledReordered< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Direct< ValueType, IndexType >, LinOp >, gko::EnablePolymorphicObject< Composition< gko::default_precision >, LinOp >, gko::EnablePolymorphicObject< Coo< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Csr< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Dense< default_precision >, LinOp >, gko::EnablePolymorphicObject< Diagonal< default_precision >, LinOp >, gko::EnablePolymorphicObject< Ell< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Fbcsr< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Fft, LinOp >, gko::EnablePolymorphicObject< Fft2, LinOp >, gko::EnablePolymorphicObject< Fft3, LinOp >, gko::EnablePolymorphicObject< Hybrid< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Identity< default_precision >, LinOp >, gko::EnablePolymorphicObject< IdentityFactory< default_precision >, LinOpFactory >, gko::EnablePolymorphicObject< Permutation< int32 >, LinOp >, gko::EnablePolymorphicObject< RowGatherer< int32 >, LinOp >, gko::EnablePolymorphicObject< ScaledPermutation< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Sellp< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< SparsityCsr< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< FixedCoarsening< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Pgm< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< GaussSeidel< default_precision, int32 >, LinOpFactory >, gko::EnablePolymorphicObject< Ic< solver::LowerTrs<>, int32 >, LinOp >, gko::EnablePolymorphicObject< Ilu< solver::LowerTrs<>, solver::UpperTrs<>, false, int32 >, LinOp >, gko::EnablePolymorphicObject< Isai< IsaiType, ValueType, IndexType >, LinOp >, gko::EnablePolymorphicObject< Jacobi< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Sor< default_precision, int32 >, LinOpFactory >, gko::EnablePolymorphicObject< Rcm< default_precision, int32 >, ReorderingBase< int32 > >, gko::EnablePolymorphicObject< Bicg< default_precision >, LinOp >, gko::EnablePolymorphicObject< Bicgstab< default_precision >, LinOp >, gko::EnablePolymorphicObject< CbGmres< default_precision >, LinOp >, gko::EnablePolymorphicObject< Cg< default_precision >, LinOp >, gko::EnablePolymorphicObject< Cgs< default_precision >, LinOp >, gko::EnablePolymorphicObject< Fcg< default_precision >, LinOp >, gko::EnablePolymorphicObject< Gcr< default_precision >, LinOp >, gko::EnablePolymorphicObject< Gmres< default_precision >, LinOp >, gko::EnablePolymorphicObject< Idr< default_precision >, LinOp >, gko::EnablePolymorphicObject< Ir< default_precision >, LinOp >, gko::EnablePolymorphicObject< LowerTrs< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< Minres< default_precision >, LinOp >, gko::EnablePolymorphicObject< Multigrid, LinOp >, gko::EnablePolymorphicObject< UpperTrs< default_precision, int32 >, LinOp >, gko::EnablePolymorphicObject< ResidualNormBase< default_precision >, Criterion >, gko::EnablePolymorphicObject< Combined, Criterion >, gko::EnablePolymorphicObject< Iteration, Criterion >, gko::EnablePolymorphicObject< ResidualNormBase< ValueType >, Criterion >, gko::EnablePolymorphicObject< Time, Criterion >, gko::EnablePolymorphicObject< Dense< value_type >, LinOp >, gko::EnablePolymorphicObject< Dense< ValueType >, LinOp >, gko::reorder::ReorderingBase< int32 >, gko::EnablePolymorphicObject< ConcreteObject, PolymorphicBase >, and gko::reorder::ReorderingBase< IndexType >.

Public Member Functions

std::unique_ptr< AbstractObject > create_default (std::shared_ptr< const Executor > exec) const
 
std::unique_ptr< AbstractObject > create_default () const
 
std::unique_ptr< AbstractObject > clone (std::shared_ptr< const Executor > exec) const
 
std::unique_ptr< AbstractObject > clone () const
 
AbstractObject * copy_from (const PolymorphicObject *other)
 
template<typename Derived >
std::enable_if_t< std::is_base_of< PolymorphicObject, std::decay_t< Derived > >::value, AbstractObject > * copy_from (std::unique_ptr< Derived > &&other)
 
template<typename Derived >
std::enable_if_t< std::is_base_of< PolymorphicObject, std::decay_t< Derived > >::value, AbstractObject > * copy_from (const std::unique_ptr< Derived > &other)
 
AbstractObject * copy_from (const std::shared_ptr< const PolymorphicObject > &other)
 
AbstractObject * move_from (ptr_param< PolymorphicObject > other)
 
AbstractObject * clear ()
 
- Public Member Functions inherited from gko::PolymorphicObject
PolymorphicObjectoperator= (const PolymorphicObject &)
 
std::unique_ptr< PolymorphicObjectcreate_default (std::shared_ptr< const Executor > exec) const
 
std::unique_ptr< PolymorphicObjectcreate_default () const
 
std::unique_ptr< PolymorphicObjectclone (std::shared_ptr< const Executor > exec) const
 
std::unique_ptr< PolymorphicObjectclone () const
 
PolymorphicObjectcopy_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)
 
PolymorphicObjectcopy_from (const std::shared_ptr< const PolymorphicObject > &other)
 
PolymorphicObjectmove_from (ptr_param< PolymorphicObject > other)
 
PolymorphicObjectclear ()
 
std::shared_ptr< const Executorget_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)
 

Additional Inherited Members

- Protected Member Functions inherited from gko::PolymorphicObject
 PolymorphicObject (std::shared_ptr< const Executor > exec)
 
 PolymorphicObject (const PolymorphicObject &other)
 
virtual std::unique_ptr< PolymorphicObjectcreate_default_impl (std::shared_ptr< const Executor > exec) const =0
 
virtual PolymorphicObjectcopy_from_impl (const PolymorphicObject *other)=0
 
virtual PolymorphicObjectcopy_from_impl (std::unique_ptr< PolymorphicObject > other)=0
 
virtual PolymorphicObjectmove_from_impl (PolymorphicObject *other)=0
 
virtual PolymorphicObjectmove_from_impl (std::unique_ptr< PolymorphicObject > other)=0
 
virtual PolymorphicObjectclear_impl ()=0
 
- Protected Member Functions inherited from gko::log::EnableLogging< PolymorphicObject >
void log (Params &&... params) const
 
- Protected Attributes inherited from gko::log::EnableLogging< PolymorphicObject >
std::vector< std::shared_ptr< const Logger > > loggers_
 

Detailed Description

template<typename AbstractObject, typename PolymorphicBase = PolymorphicObject>
class gko::EnableAbstractPolymorphicObject< AbstractObject, PolymorphicBase >

This mixin inherits from (a subclass of) PolymorphicObject and provides a base implementation of a new abstract object.

It uses method hiding to update the parameter and return types from PolymorphicObject toAbstractObject` wherever it makes sense. As opposed to EnablePolymorphicObject, it does not implement PolymorphicObject's virtual methods.

Template Parameters
AbstractObjectthe abstract class which is being implemented [CRTP parameter]
PolymorphicBaseparent of AbstractObject in the polymorphic hierarchy, has to be a subclass of polymorphic object
See also
EnablePolymorphicObject for creating a concrete subclass of PolymorphicObject.

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