1 //===----- CGCUDARuntime.h - Interface to CUDA Runtimes ---------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This provides an abstract class for CUDA code generation. Concrete
11 // subclasses of this implement code generation for specific CUDA
14 //===----------------------------------------------------------------------===//
16 #ifndef CLANG_CODEGEN_CUDARUNTIME_H
17 #define CLANG_CODEGEN_CUDARUNTIME_H
21 class CUDAKernelCallExpr;
25 class CodeGenFunction;
27 class FunctionArgList;
28 class ReturnValueSlot;
36 CGCUDARuntime(CodeGenModule &CGM) : CGM(CGM) {}
37 virtual ~CGCUDARuntime();
39 virtual RValue EmitCUDAKernelCallExpr(CodeGenFunction &CGF,
40 const CUDAKernelCallExpr *E,
41 ReturnValueSlot ReturnValue);
43 virtual void EmitDeviceStubBody(CodeGenFunction &CGF,
44 FunctionArgList &Args) = 0;
48 /// Creates an instance of a CUDA runtime class.
49 CGCUDARuntime *CreateNVCUDARuntime(CodeGenModule &CGM);