CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
cms::alpakatools::QueueCache< Queue > Class Template Reference

#include <QueueCache.h>

Public Member Functions

std::shared_ptr< Queue > get (Device const &dev)
 
 QueueCache ()
 

Private Types

using Device = alpaka::Dev< Queue >
 
using Platform = alpaka::Pltf< Device >
 

Private Member Functions

void clear ()
 

Private Attributes

std::vector< edm::ReusableObjectHolder< Queue > > cache_
 

Detailed Description

template<typename Queue>
class cms::alpakatools::QueueCache< Queue >

Definition at line 17 of file QueueCache.h.

Member Typedef Documentation

◆ Device

template<typename Queue >
using cms::alpakatools::QueueCache< Queue >::Device = alpaka::Dev<Queue>
private

Definition at line 31 of file QueueCache.h.

◆ Platform

template<typename Queue >
using cms::alpakatools::QueueCache< Queue >::Platform = alpaka::Pltf<Device>
private

Definition at line 32 of file QueueCache.h.

Constructor & Destructor Documentation

◆ QueueCache()

template<typename Queue >
cms::alpakatools::QueueCache< Queue >::QueueCache ( )
inline

Definition at line 37 of file QueueCache.h.

37 : cache_(alpaka::getDevCount<Platform>()) {}
std::vector< edm::ReusableObjectHolder< Queue > > cache_
Definition: QueueCache.h:58

Member Function Documentation

◆ clear()

template<typename Queue >
void cms::alpakatools::QueueCache< Queue >::clear ( void  )
inlineprivate

Definition at line 48 of file QueueCache.h.

References cms::alpakatools::QueueCache< Queue >::cache_.

48  {
49  // Reset the contents of the caches, but leave an
50  // edm::ReusableObjectHolder alive for each device. This is needed
51  // mostly for the unit tests, where the function-static
52  // QueueCache lives through multiple tests (and go through
53  // multiple shutdowns of the framework).
54  cache_.clear();
55  cache_.resize(alpaka::getDevCount<Platform>());
56  }
std::vector< edm::ReusableObjectHolder< Queue > > cache_
Definition: QueueCache.h:58

◆ get()

template<typename Queue >
std::shared_ptr<Queue> cms::alpakatools::QueueCache< Queue >::get ( Device const &  dev)
inline

Member Data Documentation

◆ cache_

template<typename Queue >
std::vector<edm::ReusableObjectHolder<Queue> > cms::alpakatools::QueueCache< Queue >::cache_
private