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::Platform< 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 18 of file QueueCache.h.

Member Typedef Documentation

◆ Device

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

Definition at line 32 of file QueueCache.h.

◆ Platform

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

Definition at line 33 of file QueueCache.h.

Constructor & Destructor Documentation

◆ QueueCache()

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

Definition at line 38 of file QueueCache.h.

38 : cache_(devices<Platform>().size()) {}
std::vector< edm::ReusableObjectHolder< Queue > > cache_
Definition: QueueCache.h:59

Member Function Documentation

◆ clear()

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

Definition at line 49 of file QueueCache.h.

References cms::alpakatools::QueueCache< Queue >::cache_, and cms::alpakatools::size.

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

◆ 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