clang 20.0.0git
Classes | Namespaces | Macros | Functions | Variables
Cuda.cpp File Reference
#include "clang/Basic/Cuda.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/VersionTuple.h"

Go to the source code of this file.

Classes

struct  clang::CudaVersionMapEntry
 

Namespaces

namespace  clang
 The JSON file list parser is used to communicate input to InstallAPI.
 

Macros

#define CUDA_ENTRY(major, minor)
 
#define SM2(sm, ca)   {OffloadArch::SM_##sm, "sm_" #sm, ca}
 
#define SM(sm)   SM2(sm, "compute_" #sm)
 
#define GFX(gpu)   {OffloadArch::GFX##gpu, "gfx" #gpu, "compute_amdgcn"}
 

Functions

const char * clang::CudaVersionToString (CudaVersion V)
 
CudaVersion clang::CudaStringToVersion (const llvm::Twine &S)
 
CudaVersion clang::ToCudaVersion (llvm::VersionTuple)
 
const char * clang::OffloadArchToString (OffloadArch A)
 
const char * clang::OffloadArchToVirtualArchString (OffloadArch A)
 
OffloadArch clang::StringToOffloadArch (llvm::StringRef S)
 
CudaVersion clang::MinVersionForOffloadArch (OffloadArch A)
 Get the earliest CudaVersion that supports the given OffloadArch.
 
CudaVersion clang::MaxVersionForOffloadArch (OffloadArch A)
 Get the latest CudaVersion that supports the given OffloadArch.
 
bool clang::CudaFeatureEnabled (llvm::VersionTuple, CudaFeature)
 
bool clang::CudaFeatureEnabled (CudaVersion, CudaFeature)
 

Variables

static const CudaVersionMapEntry clang::CudaNameVersionMap []
 
static const OffloadArchToStringMap clang::arch_names []
 

Macro Definition Documentation

◆ CUDA_ENTRY

#define CUDA_ENTRY (   major,
  minor 
)
Value:
{ \
#major "." #minor, CudaVersion::CUDA_##major##minor, \
llvm::VersionTuple(major, minor) \
}

Definition at line 15 of file Cuda.cpp.

◆ GFX

#define GFX (   gpu)    {OffloadArch::GFX##gpu, "gfx" #gpu, "compute_amdgcn"}

Definition at line 84 of file Cuda.cpp.

◆ SM

#define SM (   sm)    SM2(sm, "compute_" #sm)

Definition at line 83 of file Cuda.cpp.

◆ SM2

#define SM2 (   sm,
  ca 
)    {OffloadArch::SM_##sm, "sm_" #sm, ca}

Definition at line 82 of file Cuda.cpp.

Variable Documentation

◆ arch

OffloadArch arch

◆ arch_name

const char* arch_name

Definition at line 77 of file Cuda.cpp.

◆ virtual_arch_name

const char* virtual_arch_name

Definition at line 78 of file Cuda.cpp.