Ginkgo Generated from branch based on master. Ginkgo version 1.8.0
A numerical linear algebra library targeting many-core architectures
Loading...
Searching...
No Matches
gko::EnableAbstractPolymorphicObject< AbstractObject, PolymorphicBase > Class Template Reference

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

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

Inherits gko::PolymorphicObject.

Collaboration diagram for gko::EnableAbstractPolymorphicObject< AbstractObject, PolymorphicBase >:
[legend]

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
 Creates a new "default" object of the same dynamic type as this object.
 
std::unique_ptr< PolymorphicObjectcreate_default () const
 Creates a new "default" object of the same dynamic type as this object.
 
std::unique_ptr< PolymorphicObjectclone (std::shared_ptr< const Executor > exec) const
 Creates a clone of the object.
 
std::unique_ptr< PolymorphicObjectclone () const
 Creates a clone of the object.
 
PolymorphicObjectcopy_from (const PolymorphicObject *other)
 Copies another object into this object.
 
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)
 Moves another object into this object.
 
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)
 Copies another object into this object.
 
PolymorphicObjectcopy_from (const std::shared_ptr< const PolymorphicObject > &other)
 Copies another object into this object.
 
PolymorphicObjectmove_from (ptr_param< PolymorphicObject > other)
 Moves another object into this object.
 
PolymorphicObjectclear ()
 Transforms the object into its default state.
 
std::shared_ptr< const Executorget_executor () const noexcept
 Returns the Executor of the object.
 
- Public Member Functions inherited from gko::log::EnableLogging< PolymorphicObject >
void add_logger (std::shared_ptr< const Logger > logger) override
 Adds a new logger to the list of subscribed loggers.
 
void remove_logger (const Logger *logger) override
 Removes a logger from the list of subscribed loggers.
 
void remove_logger (ptr_param< const Logger > logger)
 
const std::vector< std::shared_ptr< const Logger > > & get_loggers () const override
 Returns the vector containing all loggers registered at this object.
 
void clear_loggers () override
 Remove all loggers registered at this object.
 
- Public Member Functions inherited from gko::log::Loggable
void remove_logger (ptr_param< const Logger > logger)
 

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: