clang  13.0.0git
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.

Namespaces

 clang
 

Macros

#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)
 
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...
 
CudaVersion clang::ToCudaVersion (llvm::VersionTuple)
 
bool clang::CudaFeatureEnabled (llvm::VersionTuple, CudaFeature)
 
bool clang::CudaFeatureEnabled (CudaVersion, CudaFeature)
 

Variables

static const CudaArchToStringMap clang::arch_names []
 

Macro Definition Documentation

◆ GFX

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

Definition at line 71 of file Cuda.cpp.

◆ SM

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

Definition at line 70 of file Cuda.cpp.

◆ SM2

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

Definition at line 68 of file Cuda.cpp.

Variable Documentation

◆ arch

CudaArch arch

◆ arch_name

const char* arch_name

Definition at line 63 of file Cuda.cpp.

◆ virtual_arch_name

const char* virtual_arch_name

Definition at line 64 of file Cuda.cpp.