Skip to main content

Library

Struct Library 

Source
pub struct Library { /* private fields */ }
Expand description

One library behind a set of declarations, made of every file in files, each of which must load.

A symbol is looked up in each file in order, as NPP’s functions are spread over eleven. The NVIDIA libraries have constructors of their own, such as Library::cusparse, which name their files on each platform.

Implementations§

Source§

impl Library

Source

pub const fn cuda_driver() -> Self

Creates the library for the CUDA driver, whose files carry major version 1.

Its files on Linux:

  • libcuda.so.1

Its files on Windows:

  • nvcuda.dll
Source

pub const fn cuda_runtime() -> Self

Creates the library for the CUDA runtime, whose files carry major version 13.

Its files on Linux:

  • libcudart.so.13

Its files on Windows:

  • cudart64_13.dll
Source

pub const fn nvrtc() -> Self

Creates the library for NVRTC, whose files carry major version 13.

Its files on Linux:

  • libnvrtc.so.13

Its files on Windows:

  • nvrtc64_130_0.dll

Creates the library for nvJitLink, whose files carry major version 13.

Its files on Linux:

  • libnvJitLink.so.13

Its files on Windows:

  • nvJitLink_130_0.dll
Source

pub const fn nvvm() -> Self

Creates the library for NVVM, whose files carry major version 4.

Its files on Linux:

  • libnvvm.so.4

Its files on Windows:

  • nvvm64_40_0.dll
Source

pub const fn nvtx() -> Self

Creates the library for NVTX, whose files carry major version 1.

NVTX’s headers implement it inline; this library exports the same functions for languages that cannot use them.

Its files on Linux:

  • libnvtx3interop.so.1

Its files on Windows:

  • nvtx3interop.dll
Source

pub const fn nvml() -> Self

Creates the library for NVML, whose files carry major version 1.

Its files on Linux:

  • libnvidia-ml.so.1

Its files on Windows:

  • nvml.dll
Source

pub const fn cublas() -> Self

Creates the library for cuBLAS, whose files carry major version 13.

Its files on Linux:

  • libcublas.so.13

Its files on Windows:

  • cublas64_13.dll
Source

pub const fn cublas_lt() -> Self

Creates the library for cuBLASLt, whose files carry major version 13.

Its files on Linux:

  • libcublasLt.so.13

Its files on Windows:

  • cublasLt64_13.dll
Source

pub const fn cudnn() -> Self

Creates the library for cuDNN, whose files carry major version 9.

cuDNN loads its own sub-libraries.

Its files on Linux:

  • libcudnn.so.9

Its files on Windows:

  • cudnn64_9.dll
Source

pub const fn cudss() -> Self

Creates the library for cuDSS, whose files carry major version 1.

Its files on Linux:

  • libcudss.so.1

Its files on Windows:

  • cudss64_1.dll
Source

pub const fn cufft() -> Self

Creates the library for cuFFT, whose files carry major version 12.

Its files on Linux:

  • libcufft.so.12

Its files on Windows:

  • cufft64_12.dll
Source

pub const fn cufile() -> Self

Creates the library for cuFile, whose files carry major version 0.

cuFile has no Windows release.

Its files on Linux:

  • libcufile.so.0

It has no files on Windows.

Source

pub const fn cupti() -> Self

Creates the library for CUPTI, whose files carry major version 13.

Windows’ CUPTI carries its release in its name, as cupti64_2025.4.0.dll, which no fixed name matches.

Its files on Linux:

  • libcupti.so.13

It has no files on Windows.

Source

pub const fn curand() -> Self

Creates the library for cuRAND, whose files carry major version 10.

Its files on Linux:

  • libcurand.so.10

Its files on Windows:

  • curand64_10.dll
Source

pub const fn cusolver() -> Self

Creates the library for cuSOLVER, whose files carry major version 12.

Its files on Linux:

  • libcusolver.so.12

Its files on Windows:

  • cusolver64_12.dll
Source

pub const fn cusparse() -> Self

Creates the library for cuSPARSE, whose files carry major version 12.

Its files on Linux:

  • libcusparse.so.12

Its files on Windows:

  • cusparse64_12.dll
Source

pub const fn cutensor() -> Self

Creates the library for cuTENSOR, whose files carry major version 2.

Its files on Linux:

  • libcutensor.so.2

Its files on Windows:

  • cutensor.dll
Source

pub const fn cutensor_mg() -> Self

Creates the library for cuTENSORMg, whose files carry major version 2.

Its files on Linux:

  • libcutensorMg.so.2

Its files on Windows:

  • cutensorMg.dll
Source

pub const fn cutensor_mp() -> Self

Creates the library for cuTENSORMp, whose files carry major version 2.

cuTENSORMp runs over NCCL, which is Linux-only.

Its files on Linux:

  • libcutensorMp.so.2

It has no files on Windows.

Source

pub const fn nccl() -> Self

Creates the library for NCCL, whose files carry major version 2.

Its files on Linux:

  • libnccl.so.2

It has no files on Windows.

Source

pub const fn npp() -> Self

Creates the library for NPP, whose files carry major version 13.

NPP’s functions are spread over its core library and ten by domain.

Its files on Linux:

  • libnppc.so.13
  • libnppial.so.13
  • libnppicc.so.13
  • libnppidei.so.13
  • libnppif.so.13
  • libnppig.so.13
  • libnppim.so.13
  • libnppist.so.13
  • libnppisu.so.13
  • libnppitc.so.13
  • libnpps.so.13

Its files on Windows:

  • nppc64_13.dll
  • nppial64_13.dll
  • nppicc64_13.dll
  • nppidei64_13.dll
  • nppif64_13.dll
  • nppig64_13.dll
  • nppim64_13.dll
  • nppist64_13.dll
  • nppisu64_13.dll
  • nppitc64_13.dll
  • npps64_13.dll
Source

pub const fn nvcomp() -> Self

Creates the library for nvCOMP, whose files carry major version 6.

Its files on Linux:

  • libnvcomp.so.6

Its files on Windows:

  • nvcomp64_6.dll
Source

pub const fn nvimagecodec() -> Self

Creates the library for nvImageCodec, whose files carry major version 0.

Its files on Linux:

  • libnvimgcodec.so.0

Its files on Windows:

  • nvimgcodec_0.dll
Source

pub const fn nvjpeg() -> Self

Creates the library for nvJPEG, whose files carry major version 13.

Its files on Linux:

  • libnvjpeg.so.13

Its files on Windows:

  • nvjpeg64_13.dll
Source

pub const fn nvjpeg2k() -> Self

Creates the library for nvJPEG2000, whose files carry major version 0.

Its files on Linux:

  • libnvjpeg2k.so.0

Its files on Windows:

  • nvjpeg2k_0.dll
Source

pub const fn nvtiff() -> Self

Creates the library for nvTIFF, whose files carry major version 0.

Its files on Linux:

  • libnvtiff.so.0

Its files on Windows:

  • nvtiff_0.dll
Source§

impl Library

Source

pub const fn new(name: &'static str, files: &'static [&'static str]) -> Self

Creates a library named name from the files that make it up on this platform.

Source

pub const fn name(&self) -> &'static str

Returns the library’s name, such as cuSPARSE.

Source

pub fn load(&self) -> Result<(), LoadError>

Loads every file once, and keeps them loaded for the life of the process, which every cached function relies on.

§Errors

Returns an error if the library has no files on this platform or a file would not load.

Source

pub fn paths(&self) -> Result<Vec<PathBuf>, LoadError>

Returns where each file loaded from, in order, loading them if they are not yet.

§Errors

Returns an error if the library would not load.

Trait Implementations§

Source§

impl Debug for Library

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.