![]() |
Ginkgo Generated from branch based on main. Ginkgo version 1.11.0
A numerical linear algebra library targeting many-core architectures
|
An RAII wrapper for a custom CUDA stream. More...
#include <ginkgo/core/base/stream.hpp>
Public Member Functions | |
| cuda_stream () | |
| Creates an empty stream wrapper, representing the default stream. | |
| cuda_stream (int device_id) | |
| Creates a new custom CUDA stream on the given device. | |
| ~cuda_stream () | |
| Destroys the custom CUDA stream, if it isn't empty. | |
| cuda_stream (const cuda_stream &)=delete | |
| cuda_stream (cuda_stream &&) | |
| Move-constructs from an existing stream, which will be emptied. | |
| cuda_stream & | operator= (const cuda_stream &)=delete |
| cuda_stream & | operator= (cuda_stream &&)=delete |
| Move-assigns from an existing stream, which will be emptied. | |
| CUstream_st * | get () const |
| Returns the native CUDA stream handle. | |
An RAII wrapper for a custom CUDA stream.
The stream will be created on construction and destroyed when the lifetime of the wrapper ends.
| gko::cuda_stream::cuda_stream | ( | ) |
Creates an empty stream wrapper, representing the default stream.
Referenced by cuda_stream(), operator=(), and ~cuda_stream().
| gko::cuda_stream::cuda_stream | ( | int | device_id | ) |
Creates a new custom CUDA stream on the given device.
| device_id | the device ID to create the stream on. |
| gko::cuda_stream::~cuda_stream | ( | ) |
Destroys the custom CUDA stream, if it isn't empty.
References cuda_stream().
| gko::cuda_stream::cuda_stream | ( | cuda_stream && | ) |
Move-constructs from an existing stream, which will be emptied.
References cuda_stream().
| CUstream_st * gko::cuda_stream::get | ( | ) | const |
Returns the native CUDA stream handle.
In an empty cuda_stream, this will return nullptr.
|
delete |
Move-assigns from an existing stream, which will be emptied.
References cuda_stream().