clang 20.0.0git
DeviceOffload.h
Go to the documentation of this file.
1//===----------- DeviceOffload.h - Device Offloading ------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file implements classes required for offloading to CUDA devices.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_CLANG_LIB_INTERPRETER_DEVICE_OFFLOAD_H
14#define LLVM_CLANG_LIB_INTERPRETER_DEVICE_OFFLOAD_H
15
16#include "IncrementalParser.h"
17#include "llvm/Support/FileSystem.h"
18#include "llvm/Support/VirtualFileSystem.h"
19
20namespace clang {
21
23public:
25 Interpreter &Interp, std::unique_ptr<CompilerInstance> Instance,
26 IncrementalParser &HostParser, llvm::LLVMContext &LLVMCtx,
28 llvm::Error &Err);
29
31 Parse(llvm::StringRef Input) override;
32
33 // Generate PTX for the last PTU
35
36 // Generate fatbinary contents in memory
37 llvm::Error GenerateFatbinary();
38
40
41protected:
47};
48
49} // namespace clang
50
51#endif // LLVM_CLANG_LIB_INTERPRETER_DEVICE_OFFLOAD_H
llvm::SmallVector< char, 1024 > FatbinContent
Definition: DeviceOffload.h:45
llvm::SmallString< 1024 > PTXCode
Definition: DeviceOffload.h:44
llvm::Expected< PartialTranslationUnit & > Parse(llvm::StringRef Input) override
Parses incremental input by creating an in-memory file.
llvm::IntrusiveRefCntPtr< llvm::vfs::InMemoryFileSystem > VFS
Definition: DeviceOffload.h:46
llvm::Expected< llvm::StringRef > GeneratePTX()
Provides support for incremental compilation.
Provides top-level interfaces for incremental compilation and execution.
Definition: Interpreter.h:91
The JSON file list parser is used to communicate input to InstallAPI.