pub struct CudaToolkit {
pub nvcc_path: PathBuf,
pub include_dir: PathBuf,
pub lib_dir: PathBuf,
pub version: Option<(u32, u32)>,
}Expand description
CUDA toolkit information.
Fields§
§nvcc_path: PathBufPath to the nvcc binary.
include_dir: PathBufCUDA include directory.
lib_dir: PathBufCUDA lib directory.
version: Option<(u32, u32)>CUDA version (major, minor) if detected (e.g., (12, 6)).
Implementations§
Source§impl CudaToolkit
impl CudaToolkit
Sourcepub fn detect() -> Result<Self>
pub fn detect() -> Result<Self>
Auto-detect CUDA toolkit installation.
Defers to baracuda_build::detect_cuda for install discovery, then
resolves nvcc via baracuda_build::find_nvcc (which adds $NVCC /
$PATH lookup as fallbacks).
Sourcepub fn from_nvcc_path(nvcc_path: PathBuf) -> Result<Self>
pub fn from_nvcc_path(nvcc_path: PathBuf) -> Result<Self>
Create toolkit from explicit nvcc path.
Sourcepub fn supported_architectures(&self) -> Vec<usize>
pub fn supported_architectures(&self) -> Vec<usize>
Get supported GPU architectures by querying nvcc.
Trait Implementations§
Source§impl Clone for CudaToolkit
impl Clone for CudaToolkit
Source§fn clone(&self) -> CudaToolkit
fn clone(&self) -> CudaToolkit
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CudaToolkit
impl RefUnwindSafe for CudaToolkit
impl Send for CudaToolkit
impl Sync for CudaToolkit
impl Unpin for CudaToolkit
impl UnsafeUnpin for CudaToolkit
impl UnwindSafe for CudaToolkit
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more