#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"
namespace clang {
struct CudaVersionMapEntry { … };
#define CUDA_ENTRY …
static const CudaVersionMapEntry CudaNameVersionMap[] = …;
#undef CUDA_ENTRY
const char *CudaVersionToString(CudaVersion V) { … }
CudaVersion CudaStringToVersion(const llvm::Twine &S) { … }
CudaVersion ToCudaVersion(llvm::VersionTuple Version) { … }
namespace {
struct OffloadArchToStringMap { … };
}
#define SM2 …
#define SM …
#define GFX …
static const OffloadArchToStringMap arch_names[] = …;
#undef SM
#undef SM2
#undef GFX
const char *OffloadArchToString(OffloadArch A) { … }
const char *OffloadArchToVirtualArchString(OffloadArch A) { … }
OffloadArch StringToOffloadArch(llvm::StringRef S) { … }
CudaVersion MinVersionForOffloadArch(OffloadArch A) { … }
CudaVersion MaxVersionForOffloadArch(OffloadArch A) { … }
bool CudaFeatureEnabled(llvm::VersionTuple Version, CudaFeature Feature) { … }
bool CudaFeatureEnabled(CudaVersion Version, CudaFeature Feature) { … }
}