ATLAS Offline Software
IKernelTask.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 ATHCUDAINTERFACES_IKERNELTASK_H
6 #define ATHCUDAINTERFACES_IKERNELTASK_H
7 
8 namespace AthCUDA {
9 
10  // Forward declaration(s).
11  class StreamHolder;
12 
22  class IKernelTask {
23 
24  public:
26  virtual ~IKernelTask() = default;
27 
33  Asynchronous = 1
34  };
35 
44  virtual int execute( StreamHolder& stream ) = 0;
45 
58  virtual int finished( int code, KernelExecMode mode ) = 0;
59 
60  }; // class IKernelTask
61 
62 } // namespace AthCUDA
63 
64 #endif // ATHCUDAINTERFACES_IKERNELTASK_H
AthCUDA::IKernelTask::Synchronous
@ Synchronous
The kernel was executed synchronously on the CPU.
Definition: IKernelTask.h:31
AthCUDA::IKernelTask::KernelExecMode
KernelExecMode
Possible modes in which the kernel was executed.
Definition: IKernelTask.h:29
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
AthCUDA::IKernelTask::execute
virtual int execute(StreamHolder &stream)=0
Execute the kernel using a specific stream.
AthCUDA
Definition: Info.h:14
Preparation.mode
mode
Definition: Preparation.py:95
AthCUDA::IKernelTask::Asynchronous
@ Asynchronous
The kernel was executed asynchronously on a CUDA device.
Definition: IKernelTask.h:33
AthCUDA::IKernelTask::finished
virtual int finished(int code, KernelExecMode mode)=0
Function called when an asynchronous execution finishes.
pmontree.code
code
Definition: pmontree.py:443
AthCUDA::IKernelTask::~IKernelTask
virtual ~IKernelTask()=default
Virtual destructor, to make vtable happy.
AthCUDA::StreamHolder
Helper class for handling CUDA streams.
Definition: StreamHolder.h:24
AthCUDA::IKernelTask
Abstract interface for setting up / running a CUDA task.
Definition: IKernelTask.h:22