ATLAS Offline Software
Loading...
Searching...
No Matches
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
8namespace AthCUDA {
9
10 // Forward declaration(s).
11 class StreamHolder;
12
23
24 public:
26 virtual ~IKernelTask() = default;
27
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
Abstract interface for setting up / running a CUDA task.
Definition IKernelTask.h:22
KernelExecMode
Possible modes in which the kernel was executed.
Definition IKernelTask.h:29
@ Synchronous
The kernel was executed synchronously on the CPU.
Definition IKernelTask.h:31
@ Asynchronous
The kernel was executed asynchronously on a CUDA device.
Definition IKernelTask.h:33
virtual int finished(int code, KernelExecMode mode)=0
Function called when an asynchronous execution finishes.
virtual int execute(StreamHolder &stream)=0
Execute the kernel using a specific stream.
virtual ~IKernelTask()=default
Virtual destructor, to make vtable happy.
Helper class for handling CUDA streams.
Definition Info.h:14