![]() |
Ginkgo
Generated from tags/v1.0.0^0 branch based on master. Ginkgo version 1.0.0
A numerical linear algebra library targeting many-core architectures
|
A temporary_clone is a special smart pointer-like object that is designed to hold an object temporarily copied to another executor. More...
#include <ginkgo/core/base/utils.hpp>
Public Types | |
using | value_type = T |
using | pointer = T * |
Public Member Functions | |
temporary_clone (std::shared_ptr< const Executor > exec, pointer ptr) | |
Creates a temporary_clone. More... | |
T * | get () const |
Returns the object held by temporary_clone. More... | |
T * | operator-> () const |
Calls a method on the underlying object. More... | |
A temporary_clone is a special smart pointer-like object that is designed to hold an object temporarily copied to another executor.
After the temporary_clone goes out of scope, the stored object will be copied back to its original location. This class is optimized to avoid copies if the object is already on the correct executor, in which case it will just hold a reference to that object, without performing the copy.
T | the type of object held in the temporary_clone |
|
inlineexplicit |
Creates a temporary_clone.
exec | the executor where the clone will be created |
ptr | a pointer to the object of which the clone will be created |
References gko::clone().
|
inline |
Returns the object held by temporary_clone.
|
inline |
Calls a method on the underlying object.