ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthCUDA
AthCUDAServices
src
StreamPoolSvc.h
Go to the documentation of this file.
1
// Dear emacs, this is -*- c++ -*-
2
//
3
// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
4
//
5
#ifndef ATHCUDASERVICES_STREAMPOOLSVC_H
6
#define ATHCUDASERVICES_STREAMPOOLSVC_H
7
8
// Local include(s).
9
#include "
StreamPoolSvcImpl.h
"
10
11
// AthCUDA include(s).
12
#include "
AthCUDAInterfaces/IStreamPoolSvc.h
"
13
14
// Framework include(s).
15
#include "Gaudi/Property.h"
16
#include "
AthenaBaseComps/AthService.h
"
17
18
// System include(s).
19
#include <memory>
20
21
namespace
AthCUDA
{
22
31
class
StreamPoolSvc
:
public
extends< AthService, IStreamPoolSvc > {
32
33
public
:
35
using
extends::extends;
36
39
41
virtual
StatusCode
initialize
()
override
;
42
44
virtual
StatusCode
finalize
()
override
;
45
47
50
59
virtual
bool
isEmpty
()
const override
;
60
68
virtual
StreamHolder
getAvailableStream
()
override
;
69
77
virtual
void
yieldStream
(
StreamHolder
& stream )
override
;
78
80
81
private
:
84
86
Gaudi::Property< unsigned int >
m_nStreams
{
this
,
"NStreams"
, 2,
87
"The number of CUDA streams to use"
};
88
90
93
95
std::unique_ptr< StreamPoolSvcImpl >
m_impl
;
96
98
99
};
// class StreamPoolSvc
100
101
}
// namespace AthCUDA
102
103
#endif
// ATHCUDASERVICES_STREAMPOOLSVC_H
AthService.h
IStreamPoolSvc.h
StreamPoolSvcImpl.h
AthCUDA::StreamHolder
Helper class for handling CUDA streams.
Definition
StreamHolder.h:24
AthCUDA::StreamPoolSvc
Service managing a fixed number of CUDA streams for an application.
Definition
StreamPoolSvc.h:31
AthCUDA::StreamPoolSvc::initialize
virtual StatusCode initialize() override
Initialise the service.
Definition
StreamPoolSvc.cxx:16
AthCUDA::StreamPoolSvc::getAvailableStream
virtual StreamHolder getAvailableStream() override
Get a stream from the pool.
Definition
StreamPoolSvc.cxx:54
AthCUDA::StreamPoolSvc::yieldStream
virtual void yieldStream(StreamHolder &stream) override
Put a given stream back into the pool.
Definition
StreamPoolSvc.cxx:68
AthCUDA::StreamPoolSvc::isEmpty
virtual bool isEmpty() const override
Check whether any streams are available for the job.
Definition
StreamPoolSvc.cxx:49
AthCUDA::StreamPoolSvc::m_nStreams
Gaudi::Property< unsigned int > m_nStreams
The number of streams to use.
Definition
StreamPoolSvc.h:86
AthCUDA::StreamPoolSvc::finalize
virtual StatusCode finalize() override
Finalise the service.
Definition
StreamPoolSvc.cxx:37
AthCUDA::StreamPoolSvc::m_impl
std::unique_ptr< StreamPoolSvcImpl > m_impl
The object implementing the interaction with CUDA.
Definition
StreamPoolSvc.h:95
AthCUDA
Definition
Info.h:14
Generated on
for ATLAS Offline Software by
1.17.0