一个 CUDA 流池。 更多...
#include <cuda_stream_pool.hpp>
公有成员函数 | |
cuda_stream_pool (std::size_t pool_size=default_size) | |
构造一个给定非零大小的新 cuda 流池对象。 更多... | |
cuda_stream_pool (cuda_stream_pool &&)=delete | |
cuda_stream_pool (cuda_stream_pool const &)=delete | |
cuda_stream_pool & | operator= (cuda_stream_pool &&)=delete |
cuda_stream_pool & | operator= (cuda_stream_pool const &)=delete |
rmm::cuda_stream_view | get_stream () const noexcept |
获取流池中某个流的 cuda_stream_view 。 更多... | |
rmm::cuda_stream_view | get_stream (std::size_t stream_id) const |
获取与 stream_id 关联的流的 cuda_stream_view 。stream_id 的等效值返回指向同一底层流的 stream_view。 更多... | |
std::size_t | get_pool_size () const noexcept |
获取流池中的流数量。 更多... | |
公有静态属性 | |
static constexpr std::size_t | default_size {16} |
默认流池大小。 | |
一个 CUDA 流池。
提供对 CUDA 流对象集合的有效访问。
连续调用可能会返回相同流的 cuda_stream_view
。例如,一种可能的实现是维护一个 cuda_stream
对象的循环缓冲区。
|
inlineexplicit |
|
inlinenoexcept |
获取流池中的流数量。
此函数相对于对同一函数的其他调用是线程安全的。
|
inlinenoexcept |
|
inline |
获取与 stream_id
关联的流的 cuda_stream_view
。stream_id
的等效值返回指向同一底层流的 stream_view。
此函数相对于对同一函数的其他调用是线程安全的。
stream_id | 所需流的唯一标识符 |