Ginkgo
Generated from pipelines/1330831941 branch based on master. Ginkgo version 1.8.0
A numerical linear algebra library targeting many-core architectures
|
This mixin inherits from (a subclass of) PolymorphicObject and provides a base implementation of a new concrete polymorphic object. More...
#include <ginkgo/core/base/polymorphic_object.hpp>
Inherits gko::EnableAbstractPolymorphicObject< ConcreteObject, PolymorphicBase >.
Additional Inherited Members | |
Public Member Functions inherited from gko::EnableAbstractPolymorphicObject< ConcreteObject, PolymorphicBase > | |
std::unique_ptr< ConcreteObject > | create_default (std::shared_ptr< const Executor > exec) const |
std::unique_ptr< ConcreteObject > | create_default () const |
std::unique_ptr< ConcreteObject > | clone (std::shared_ptr< const Executor > exec) const |
std::unique_ptr< ConcreteObject > | clone () const |
ConcreteObject * | copy_from (const PolymorphicObject *other) |
std::enable_if_t< std::is_base_of< PolymorphicObject, std::decay_t< Derived > >::value, ConcreteObject > * | copy_from (std::unique_ptr< Derived > &&other) |
std::enable_if_t< std::is_base_of< PolymorphicObject, std::decay_t< Derived > >::value, ConcreteObject > * | copy_from (const std::unique_ptr< Derived > &other) |
ConcreteObject * | copy_from (const std::shared_ptr< const PolymorphicObject > &other) |
ConcreteObject * | move_from (ptr_param< PolymorphicObject > other) |
ConcreteObject * | clear () |
This mixin inherits from (a subclass of) PolymorphicObject and provides a base implementation of a new concrete polymorphic object.
The mixin changes parameter and return types of appropriate public methods of PolymorphicObject in the same way EnableAbstractPolymorphicObject does. In addition, it also provides default implementations of PolymorphicObject's virtual methods by using the executor default constructor and the assignment operator of ConcreteObject. Consequently, the following is a minimal example of PolymorphicObject:
In a way, this mixin can be viewed as an extension of default constructor/destructor/assignment operators.
ConcreteObject | the concrete type which is being implemented [CRTP parameter] |
PolymorphicBase | parent of ConcreteObject in the polymorphic hierarchy, has to be a subclass of polymorphic object |