clang 22.0.0git
OffloadArch.h
Go to the documentation of this file.
1//===--- OffloadArch.h - Definition of offloading architectures --- 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#ifndef LLVM_CLANG_BASIC_OFFLOADARCH_H
10#define LLVM_CLANG_BASIC_OFFLOADARCH_H
11
12namespace llvm {
13class StringRef;
14} // namespace llvm
15
16namespace clang {
17
119
120static inline bool IsNVIDIAOffloadArch(OffloadArch A) {
121 return A >= OffloadArch::SM_20 && A < OffloadArch::GFX600;
122}
123
124static inline bool IsAMDOffloadArch(OffloadArch A) {
125 // Generic processor model is for testing only.
126 return A >= OffloadArch::GFX600 && A < OffloadArch::Generic;
127}
128
132
136
140
141const char *OffloadArchToString(OffloadArch A);
142const char *OffloadArchToVirtualArchString(OffloadArch A);
143
144// Convert a string to an OffloadArch enum value. Returns
145// OffloadArch::UNKNOWN if the string is not recognized.
146OffloadArch StringToOffloadArch(llvm::StringRef S);
147
148} // namespace clang
149
150#endif // LLVM_CLANG_BASIC_OFFLOADARCH_H
The JSON file list parser is used to communicate input to InstallAPI.
static bool IsIntelOffloadArch(OffloadArch Arch)
static bool IsIntelCPUOffloadArch(OffloadArch Arch)
static bool IsAMDOffloadArch(OffloadArch A)
static bool IsNVIDIAOffloadArch(OffloadArch A)
const char * OffloadArchToVirtualArchString(OffloadArch A)
OffloadArch StringToOffloadArch(llvm::StringRef S)
const char * OffloadArchToString(OffloadArch A)
static bool IsIntelGPUOffloadArch(OffloadArch Arch)
@ Generic
not a target-specific vector type
Definition TypeBase.h:4134
Diagnostic wrappers for TextAPI types for error reporting.
Definition Dominators.h:30