Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Classes | Public Member Functions | Friends | List of all members
uni20::cuda::Runtime Class Reference

Scoped owner of the process-wide CUDA resource installation. More...

#include <runtime.hpp>

Public Member Functions

std::optional< int > default_device () const noexcept
 Return the configured default CUDA device ordinal, if any.
 
DeviceResources & default_device_resources () const
 Return the canonical resources for the configured default device.
 
DeviceResources & device_resources (int device) const
 Return the canonical resources for an enrolled device.
 
bool has_device (int device) const noexcept
 Return whether this runtime enrolled a CUDA device ordinal.
 
Runtime & operator= (Runtime &&)=delete
 
Runtime & operator= (Runtime const &)=delete
 
 Runtime (Runtime &&)=delete
 
 Runtime (Runtime const &)=delete
 
 ~Runtime () noexcept
 

Friends

Runtime initialize (RuntimeConfig)
 Install and return a scoped process-wide CUDA runtime owner.
 

Detailed Description

Scoped owner of the process-wide CUDA resource installation.

Construction installs globally discoverable per-device resources. Destruction first uninstalls lookup, then drains and destroys those resources. The owner must outlive every CUDA Tensor, buffer, task, stream, and provider-resource lease.

Constructor & Destructor Documentation

◆ Runtime() [1/2]

uni20::cuda::Runtime::Runtime ( Runtime const &  )
delete

◆ Runtime() [2/2]

uni20::cuda::Runtime::Runtime ( Runtime &&  )
delete

◆ ~Runtime()

uni20::cuda::Runtime::~Runtime ( )
noexcept

Member Function Documentation

◆ default_device()

std::optional< int > uni20::cuda::Runtime::default_device ( ) const
inlinenoexcept

Return the configured default CUDA device ordinal, if any.

◆ default_device_resources()

DeviceResources & uni20::cuda::Runtime::default_device_resources ( ) const

Return the canonical resources for the configured default device.

◆ device_resources()

DeviceResources & uni20::cuda::Runtime::device_resources ( int  device) const

Return the canonical resources for an enrolled device.

◆ has_device()

bool uni20::cuda::Runtime::has_device ( int  device) const
noexcept

Return whether this runtime enrolled a CUDA device ordinal.

◆ operator=() [1/2]

Runtime & uni20::cuda::Runtime::operator= ( Runtime &&  )
delete

◆ operator=() [2/2]

Runtime & uni20::cuda::Runtime::operator= ( Runtime const &  )
delete

Friends And Related Symbol Documentation

◆ initialize

Runtime initialize ( RuntimeConfig  )
friend

Install and return a scoped process-wide CUDA runtime owner.

Only one installation may be active. Retain the returned object at the application startup boundary for as long as CUDA objects exist.


The documentation for this class was generated from the following files: