blob: 79890e89d62e8cc37a467841b085ac57ce8f768e [file] [log] [blame]
Peter Collingbourne6c0aa5f2011-10-06 18:29:37 +00001//===----- CGCUDARuntime.h - Interface to CUDA Runtimes ---------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This provides an abstract class for CUDA code generation. Concrete
11// subclasses of this implement code generation for specific CUDA
12// runtime libraries.
13//
14//===----------------------------------------------------------------------===//
15
16#ifndef CLANG_CODEGEN_CUDARUNTIME_H
17#define CLANG_CODEGEN_CUDARUNTIME_H
18
19namespace clang {
20
21class CUDAKernelCallExpr;
22
23namespace CodeGen {
24
25class CodeGenFunction;
26class CodeGenModule;
27class ReturnValueSlot;
28class RValue;
29
30class CGCUDARuntime {
31protected:
32 CodeGenModule &CGM;
33
34public:
35 CGCUDARuntime(CodeGenModule &CGM) : CGM(CGM) {}
36 virtual ~CGCUDARuntime();
37
38 virtual RValue EmitCUDAKernelCallExpr(CodeGenFunction &CGF,
39 const CUDAKernelCallExpr *E,
40 ReturnValueSlot ReturnValue);
41
42};
43
44/// Creates an instance of a CUDA runtime class.
45CGCUDARuntime *CreateNVCUDARuntime(CodeGenModule &CGM);
46
47}
48}
49
50#endif