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::EnablePolymorphicAssignment< ConcreteType, ResultType > Class Template Reference

This mixin is used to enable a default PolymorphicObject::copy_from() implementation for objects that have implemented conversions between them. More...

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

Inherits gko::ConvertibleTo< ConcreteType >.

Collaboration diagram for gko::EnablePolymorphicAssignment< ConcreteType, ResultType >:
[legend]

Public Types

using result_type = ResultType
 
- Public Types inherited from gko::ConvertibleTo< ConcreteType >
using result_type
 

Public Member Functions

void convert_to (result_type *result) const override
 
void move_to (result_type *result) override
 
- Public Member Functions inherited from gko::ConvertibleTo< ConcreteType >
virtual void convert_to (result_type *result) const=0
 Converts the implementer to an object of type result_type.
 
void convert_to (ptr_param< result_type > result) const
 
virtual void move_to (result_type *result)=0
 Converts the implementer to an object of type result_type by moving data from this object.
 
void move_to (ptr_param< result_type > result)
 

Detailed Description

template<typename ConcreteType, typename ResultType = ConcreteType>
class gko::EnablePolymorphicAssignment< ConcreteType, ResultType >

This mixin is used to enable a default PolymorphicObject::copy_from() implementation for objects that have implemented conversions between them.

The requirement is that there is either a conversion constructor from ConcreteType in ResultType, or a conversion operator to ResultType in ConcreteType.

Template Parameters
ConcreteTypethe concrete type from which the copy_from is being enabled [CRTP parameter]
ResultTypethe type to which copy_from is being enabled

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