ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthCUDA
AthCUDAServices
src
KernelRunnerSvcImpl.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_KERNELRUNNERSVCIMPL_H
6
#define ATHCUDASERVICES_KERNELRUNNERSVCIMPL_H
7
8
// AthCUDA include(s).
9
#include "
AthCUDAInterfaces/IKernelTask.h
"
10
#include "
AthCUDAInterfaces/StreamHolder.h
"
11
12
// System include(s).
13
#include <memory>
14
15
namespace
AthCUDA
{
16
17
// Forward declaration(s).
18
class
IStreamPoolSvc
;
19
class
KernelRunnerSvc
;
20
22
class
KernelRunnerSvcImplCallback
{
23
24
public
:
26
KernelRunnerSvcImplCallback
(
KernelRunnerSvc
& svc );
27
29
KernelRunnerSvcImplCallback
&
operator()
();
30
31
private
:
33
KernelRunnerSvc
*
m_svc
;
34
35
};
// class KernelRunnerSvcImplCallback
36
38
class
KernelRunnerSvcImpl
{
39
40
public
:
42
KernelRunnerSvcImpl
(
IStreamPoolSvc
& streamPool,
43
KernelRunnerSvc
& svc );
44
46
void
execute
( std::unique_ptr< IKernelTask > task );
47
49
StreamHolder
getAvailableStream
();
50
51
private
:
53
IStreamPoolSvc
*
m_streamPool
;
54
56
KernelRunnerSvcImplCallback
m_callback
;
57
58
};
// class KernelRunnerSvcImpl
59
60
}
// namespace AthCUDA
61
62
#endif
// ATHCUDASERVICES_KERNELRUNNERSVCIMPL_H
IKernelTask.h
StreamHolder.h
AthCUDA::IStreamPoolSvc
Interface for a CUDA stream pool service.
Definition
IStreamPoolSvc.h:24
AthCUDA::KernelRunnerSvcImplCallback
Class used for calling AthCUDA::KernelRunnerSvc::setTaskFinished.
Definition
KernelRunnerSvcImpl.h:22
AthCUDA::KernelRunnerSvcImplCallback::operator()
KernelRunnerSvcImplCallback & operator()()
Call setTaskFinished() on the service object.
Definition
KernelRunnerSvcImpl.cxx:23
AthCUDA::KernelRunnerSvcImplCallback::m_svc
KernelRunnerSvc * m_svc
Pointer to the main service.
Definition
KernelRunnerSvcImpl.h:33
AthCUDA::KernelRunnerSvcImplCallback::KernelRunnerSvcImplCallback
KernelRunnerSvcImplCallback(KernelRunnerSvc &svc)
Constructor with the service object to operate on.
Definition
KernelRunnerSvcImpl.cxx:18
AthCUDA::KernelRunnerSvcImpl::m_streamPool
IStreamPoolSvc * m_streamPool
The stream pool service in use.
Definition
KernelRunnerSvcImpl.h:53
AthCUDA::KernelRunnerSvcImpl::getAvailableStream
StreamHolder getAvailableStream()
Get an available CUDA stream from the pool.
Definition
KernelRunnerSvcImpl.cxx:36
AthCUDA::KernelRunnerSvcImpl::execute
void execute(std::unique_ptr< IKernelTask > task)
Implementation of AthCUDA::IKernelRunnerSvc::execute.
AthCUDA::KernelRunnerSvcImpl::m_callback
KernelRunnerSvcImplCallback m_callback
Helper object to call setTaskFinished() with.
Definition
KernelRunnerSvcImpl.h:56
AthCUDA::KernelRunnerSvcImpl::KernelRunnerSvcImpl
KernelRunnerSvcImpl(IStreamPoolSvc &streamPool, KernelRunnerSvc &svc)
Constructor with all necessary parameters.
Definition
KernelRunnerSvcImpl.cxx:30
AthCUDA::KernelRunnerSvc
Service used for executing AthCUDA::IKernelTask tasks.
Definition
KernelRunnerSvc.h:33
AthCUDA::StreamHolder
Helper class for handling CUDA streams.
Definition
StreamHolder.h:24
AthCUDA
Definition
Info.h:14
Generated on
for ATLAS Offline Software by
1.17.0