Ginkgo
Generated from pipelines/1589998975 branch based on develop. Ginkgo version 1.10.0
A numerical linear algebra library targeting many-core architectures
|
This class is used for function parameters in the place of raw pointers. More...
#include <ginkgo/core/base/utils_helper.hpp>
Public Member Functions | |
ptr_param (T *ptr) | |
Initializes the ptr_param from a raw pointer. | |
template<typename U , std::enable_if_t< std::is_base_of< T, U >::value > * = nullptr> | |
ptr_param (const std::shared_ptr< U > &ptr) | |
Initializes the ptr_param from a shared_ptr. | |
template<typename U , typename Deleter , std::enable_if_t< std::is_base_of< T, U >::value > * = nullptr> | |
ptr_param (const std::unique_ptr< U, Deleter > &ptr) | |
Initializes the ptr_param from a unique_ptr. | |
template<typename U , std::enable_if_t< std::is_base_of< T, U >::value > * = nullptr> | |
ptr_param (const ptr_param< U > &ptr) | |
Initializes the ptr_param from a ptr_param of a derived type. | |
ptr_param (const ptr_param &)=default | |
ptr_param (ptr_param &&)=default | |
T & | operator* () const |
T * | operator-> () const |
T * | get () const |
operator bool () const | |
ptr_param & | operator= (const ptr_param &)=delete |
ptr_param & | operator= (ptr_param &&)=delete |
This class is used for function parameters in the place of raw pointers.
Pointer parameters should be used for everything that does not involve transfer of ownership. It can be converted to from raw pointers, shared pointers and unique pointers of the specified type or any derived type. This allows functions to be called without having to use gko::lend or calling .get() for every pointer argument. It probably has no use outside of function parameters, as it is immutable.
T | the pointed-to type |
|
inline |
Referenced by gko::LinOp::apply(), gko::as(), gko::Executor::copy_from(), gko::matrix::Diagonal< ValueType >::inverse_apply(), gko::PolymorphicObject::move_from(), gko::ptr_param< T >::ptr_param(), and gko::matrix::Diagonal< ValueType >::rapply().
|
inlineexplicit |
|
inline |
|
inline |