21 ATH_MSG_INFO(
"CUDA device(s) not available. Not setting up "
23 return StatusCode::SUCCESS;
28 std::make_unique< StreamPoolSvcImpl >(
m_nStreams.value(), *
this );
34 return StatusCode::SUCCESS;
46 return StatusCode::SUCCESS;
65 return m_impl->getAvailableStream();
74 m_impl->yieldStream( stream );
static const Info & instance()
Singleton accessor function.
Helper class for handling CUDA streams.
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.