TECA
The Toolkit for Extreme Climate Analysis
teca_cuda_util::cuda_stream_vector Class Reference

A collection of CUDA streams. More...

#include <teca_cuda_util.h>

Public Member Functions

 cuda_stream_vector (const cuda_stream_vector &)=delete
 prevent copies, OK to enable these if needed More...
 
void operator= (const cuda_stream_vector &)=delete
 
int resize (size_t n)
 resize the collection. creates and destroys streams as needed More...
 
size_t size () const
 get the number of available cuda streams More...
 
cudaStream_t & operator[] (size_t i)
 get the ith cuda stream More...
 
const cudaStream_t & operator[] (size_t i) const
 get the ith cuda stream More...
 

Detailed Description

A collection of CUDA streams.

This container always has as its first element the cudaStreamPerThread stream. If more than one stream is desired one can call ::resize to add new streams to the collection. For simplicity copying the container is disabled, but this feature could be added if needed.

Constructor & Destructor Documentation

◆ cuda_stream_vector()

teca_cuda_util::cuda_stream_vector::cuda_stream_vector ( const cuda_stream_vector )
delete

prevent copies, OK to enable these if needed

Member Function Documentation

◆ operator[]() [1/2]

cudaStream_t& teca_cuda_util::cuda_stream_vector::operator[] ( size_t  i)
inline

get the ith cuda stream

◆ operator[]() [2/2]

const cudaStream_t& teca_cuda_util::cuda_stream_vector::operator[] ( size_t  i) const
inline

get the ith cuda stream

◆ resize()

int teca_cuda_util::cuda_stream_vector::resize ( size_t  n)

resize the collection. creates and destroys streams as needed

◆ size()

size_t teca_cuda_util::cuda_stream_vector::size ( ) const
inline

get the number of available cuda streams


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