class CudaInstallationDetector

Declaration

class CudaInstallationDetector { /* full declaration omitted */ };

Description

A class to find a viable CUDA installation

Declared at: clang/lib/Driver/ToolChains/Cuda.h:28

Member Variables

private const clang::driver::Driver& D
private bool IsValid = false
private clang::CudaVersion Version = CudaVersion::UNKNOWN
private std::string InstallPath
private std::string BinPath
private std::string LibPath
private std::string LibDevicePath
private std::string IncludePath
private llvm::StringMap<std::string> LibDeviceMap
private std::bitset<(int)CudaArch::LAST> ArchsWithBadVersion

Method Overview

Methods

void AddCudaIncludeArgs(
    const llvm::opt::ArgList& DriverArgs,
    llvm::opt::ArgStringList& CC1Args) const

Declared at: clang/lib/Driver/ToolChains/Cuda.h:48

Parameters

const llvm::opt::ArgList& DriverArgs
llvm::opt::ArgStringList& CC1Args

void CheckCudaVersionSupportsArch(
    clang::CudaArch Arch) const

Description

Emit an error if Version does not support the given Arch. If either Version or Arch is unknown, does not emit an error. Emits at most one error per Arch.

Declared at: clang/lib/Driver/ToolChains/Cuda.h:55

Parameters

clang::CudaArch Arch

CudaInstallationDetector(
    const clang::driver::Driver& D,
    const llvm::Triple& HostTriple,
    const llvm::opt::ArgList& Args)

Declared at: clang/lib/Driver/ToolChains/Cuda.h:45

Parameters

const clang::driver::Driver& D
const llvm::Triple& HostTriple
const llvm::opt::ArgList& Args

void WarnIfUnsupportedVersion()

Declared at: clang/lib/Driver/ToolChains/Cuda.h:81

llvm::StringRef getBinPath() const

Description

Get the detected path to Cuda's bin directory.

Declared at: clang/lib/Driver/ToolChains/Cuda.h:70

llvm::StringRef getIncludePath() const

Description

Get the detected Cuda Include path.

Declared at: clang/lib/Driver/ToolChains/Cuda.h:72

llvm::StringRef getInstallPath() const

Description

Get the detected Cuda installation path.

Declared at: clang/lib/Driver/ToolChains/Cuda.h:68

std::string getLibDeviceFile(
    llvm::StringRef Gpu) const

Description

Get libdevice file for given architecture

Declared at: clang/lib/Driver/ToolChains/Cuda.h:78

Parameters

llvm::StringRef Gpu

llvm::StringRef getLibDevicePath() const

Description

Get the detected Cuda device library path.

Declared at: clang/lib/Driver/ToolChains/Cuda.h:76

llvm::StringRef getLibPath() const

Description

Get the detected Cuda library path.

Declared at: clang/lib/Driver/ToolChains/Cuda.h:74

bool isValid() const

Description

Check whether we detected a valid Cuda install.

Declared at: clang/lib/Driver/ToolChains/Cuda.h:58

void print(llvm::raw_ostream& OS) const

Description

Print information about the detected CUDA installation.

Declared at: clang/lib/Driver/ToolChains/Cuda.h:60

Parameters

llvm::raw_ostream& OS

clang::CudaVersion version() const

Description

Get the detected Cuda install's version.

Declared at: clang/lib/Driver/ToolChains/Cuda.h:63