ATLAS Offline Software
Loading...
Searching...
No Matches
KernelRunnerSvcImpl.cxx
Go to the documentation of this file.
1//
2// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3//
4
5// Local include(s).
7#include "KernelRunnerSvc.h"
8
9// AthCUDA include(s).
11
12// System include(s).
13#include <cassert>
14
15namespace AthCUDA {
16
22
24
25 assert( m_svc != nullptr );
26 m_svc->setTaskFinished();
27 return *this;
28 }
29
31 KernelRunnerSvc& svc )
32 : m_streamPool( &streamPool ), m_callback( svc ) {
33
34 }
35
37
38 assert( m_streamPool != nullptr );
39 return m_streamPool->getAvailableStream();
40 }
41
42} // namespace AthCUDA
Interface for a CUDA stream pool service.
KernelRunnerSvcImplCallback & operator()()
Call setTaskFinished() on the service object.
KernelRunnerSvc * m_svc
Pointer to the main service.
KernelRunnerSvcImplCallback(KernelRunnerSvc &svc)
Constructor with the service object to operate on.
IStreamPoolSvc * m_streamPool
The stream pool service in use.
StreamHolder getAvailableStream()
Get an available CUDA stream from the pool.
KernelRunnerSvcImplCallback m_callback
Helper object to call setTaskFinished() with.
KernelRunnerSvcImpl(IStreamPoolSvc &streamPool, KernelRunnerSvc &svc)
Constructor with all necessary parameters.
Service used for executing AthCUDA::IKernelTask tasks.
Helper class for handling CUDA streams.
Definition Info.h:14