CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends
cms::cuda::StreamCache Class Reference

#include <StreamCache.h>

Classes

class  Deleter
 

Public Types

using BareStream = SharedStreamPtr::element_type
 

Public Member Functions

SharedStreamPtr get ()
 
 StreamCache ()
 

Private Member Functions

void clear ()
 

Private Attributes

std::vector< edm::ReusableObjectHolder< BareStream, Deleter > > cache_
 

Friends

class ::CUDAService
 

Detailed Description

Definition at line 15 of file StreamCache.h.

Member Typedef Documentation

◆ BareStream

using cms::cuda::StreamCache::BareStream = SharedStreamPtr::element_type

Definition at line 17 of file StreamCache.h.

Constructor & Destructor Documentation

◆ StreamCache()

cms::cuda::StreamCache::StreamCache ( )

Definition at line 18 of file StreamCache.cc.

18 : cache_(deviceCount()) {}

Member Function Documentation

◆ clear()

void cms::cuda::StreamCache::clear ( void  )
private

Definition at line 29 of file StreamCache.cc.

29  {
30  // Reset the contents of the caches, but leave an
31  // edm::ReusableObjectHolder alive for each device. This is needed
32  // mostly for the unit tests, where the function-static
33  // StreamCache lives through multiple tests (and go through
34  // multiple shutdowns of the framework).
35  cache_.clear();
36  cache_.resize(deviceCount());
37  }

References cache_, and cms::cuda::deviceCount().

Referenced by CUDAService::CUDAService(), and CUDAService::~CUDAService().

◆ get()

SharedStreamPtr cms::cuda::StreamCache::get ( )

Friends And Related Function Documentation

◆ ::CUDAService

friend class ::CUDAService
friend

Definition at line 27 of file StreamCache.h.

Member Data Documentation

◆ cache_

std::vector<edm::ReusableObjectHolder<BareStream, Deleter> > cms::cuda::StreamCache::cache_
private

Definition at line 41 of file StreamCache.h.

Referenced by clear(), and get().

cms::cuda::stream
uint32_t const T *__restrict__ const uint32_t *__restrict__ int32_t int Histo::index_type cudaStream_t stream
Definition: HistoContainer.h:51
cms::cuda::currentDevice
int currentDevice()
Definition: currentDevice.h:10
cms::cuda::StreamCache::cache_
std::vector< edm::ReusableObjectHolder< BareStream, Deleter > > cache_
Definition: StreamCache.h:41
cms::cuda::deviceCount
int deviceCount()
Definition: deviceCount.h:10
cudaCheck
#define cudaCheck(ARG,...)
Definition: cudaCheck.h:69