ATLAS Offline Software
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).
6 #include "KernelRunnerSvcImpl.h"
7 #include "KernelRunnerSvc.h"
8 
9 // AthCUDA include(s).
11 
12 // System include(s).
13 #include <cassert>
14 
15 namespace AthCUDA {
16 
19  : m_svc( &svc ) {
20 
21  }
22 
24 
25  assert( m_svc != nullptr );
27  return *this;
28  }
29 
32  : m_streamPool( &streamPool ), m_callback( svc ) {
33 
34  }
35 
37 
38  assert( m_streamPool != nullptr );
40  }
41 
42 } // namespace AthCUDA
AthCUDA::IStreamPoolSvc
Interface for a CUDA stream pool service.
Definition: IStreamPoolSvc.h:24
AthCUDA::KernelRunnerSvcImpl::m_streamPool
IStreamPoolSvc * m_streamPool
The stream pool service in use.
Definition: KernelRunnerSvcImpl.h:53
KernelRunnerSvc.h
AthCUDA::KernelRunnerSvc
Service used for executing AthCUDA::IKernelTask tasks.
Definition: KernelRunnerSvc.h:33
AthCUDA::KernelRunnerSvc::setTaskFinished
void setTaskFinished()
Definition: KernelRunnerSvc.cxx:115
AthCUDA::KernelRunnerSvcImpl::getAvailableStream
StreamHolder getAvailableStream()
Get an available CUDA stream from the pool.
Definition: KernelRunnerSvcImpl.cxx:36
KernelRunnerSvcImpl.h
AthCUDA
Definition: Info.h:14
AthCUDA::KernelRunnerSvcImpl::KernelRunnerSvcImpl
KernelRunnerSvcImpl(IStreamPoolSvc &streamPool, KernelRunnerSvc &svc)
Constructor with all necessary parameters.
Definition: KernelRunnerSvcImpl.cxx:30
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
AthCUDA::KernelRunnerSvcImplCallback::KernelRunnerSvcImplCallback
KernelRunnerSvcImplCallback(KernelRunnerSvc &svc)
Constructor with the service object to operate on.
Definition: KernelRunnerSvcImpl.cxx:18
IStreamPoolSvc.h
AthCUDA::IStreamPoolSvc::getAvailableStream
virtual StreamHolder getAvailableStream()=0
Get a stream from the pool.
AthCUDA::KernelRunnerSvcImplCallback::m_svc
KernelRunnerSvc * m_svc
Pointer to the main service.
Definition: KernelRunnerSvcImpl.h:33
AthCUDA::StreamHolder
Helper class for handling CUDA streams.
Definition: StreamHolder.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