5#ifndef ATHCUDASERVICES_STREAMPOOLSVC_H
6#define ATHCUDASERVICES_STREAMPOOLSVC_H
15#include "Gaudi/Property.h"
35 using extends::extends;
44 virtual StatusCode
finalize()
override;
59 virtual bool isEmpty()
const override;
86 Gaudi::Property< unsigned int >
m_nStreams{
this,
"NStreams", 2,
87 "The number of CUDA streams to use" };
95 std::unique_ptr< StreamPoolSvcImpl >
m_impl;
Helper class for handling CUDA streams.
Service managing a fixed number of CUDA streams for an application.
virtual StatusCode initialize() override
Initialise the service.
virtual StreamHolder getAvailableStream() override
Get a stream from the pool.
virtual void yieldStream(StreamHolder &stream) override
Put a given stream back into the pool.
virtual bool isEmpty() const override
Check whether any streams are available for the job.
Gaudi::Property< unsigned int > m_nStreams
The number of streams to use.
virtual StatusCode finalize() override
Finalise the service.
std::unique_ptr< StreamPoolSvcImpl > m_impl
The object implementing the interaction with CUDA.