clang  16.0.0git
Classes | Namespaces | Macros | Functions | Variables
Cuda.cpp File Reference
#include "clang/Basic/Cuda.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/VersionTuple.h"
Include dependency graph for Cuda.cpp:

Go to the source code of this file.

Classes

struct  clang::CudaVersionMapEntry
 

Namespaces

 clang
 

Macros

#define CUDA_ENTRY(major, minor)
 
#define SM2(sm, ca)   { CudaArch::SM_##sm, "sm_" #sm, ca }
 
#define SM(sm)   SM2(sm, "compute_" #sm)
 
#define GFX(gpu)   { CudaArch::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::CudaArchToString (CudaArch A)
 
const char * clang::CudaArchToVirtualArchString (CudaArch A)
 
CudaArch clang::StringToCudaArch (llvm::StringRef S)
 
CudaVersion clang::MinVersionForCudaArch (CudaArch A)
 Get the earliest CudaVersion that supports the given CudaArch. More...
 
CudaVersion clang::MaxVersionForCudaArch (CudaArch A)
 Get the latest CudaVersion that supports the given CudaArch. More...
 
bool clang::CudaFeatureEnabled (llvm::VersionTuple, CudaFeature)
 
bool clang::CudaFeatureEnabled (CudaVersion, CudaFeature)
 

Variables

static const CudaVersionMapEntry clang::CudaNameVersionMap []
 
static const CudaArchToStringMap 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 16 of file Cuda.cpp.

◆ GFX

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

Definition at line 80 of file Cuda.cpp.

◆ SM

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

Definition at line 79 of file Cuda.cpp.

◆ SM2

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

Definition at line 77 of file Cuda.cpp.

Variable Documentation

◆ arch

CudaArch arch

◆ arch_name

const char* arch_name

Definition at line 72 of file Cuda.cpp.

◆ virtual_arch_name

const char* virtual_arch_name

Definition at line 73 of file Cuda.cpp.