pub struct MultiGpuContext { /* private fields */ }Expand description
Multi-GPU context for managing multiple devices
Implementations§
Source§impl MultiGpuContext
impl MultiGpuContext
Sourcepub fn device_count(&self) -> usize
pub fn device_count(&self) -> usize
Get number of available devices
Sourcepub fn active_device(&self) -> &Arc<Device> ⓘ
pub fn active_device(&self) -> &Arc<Device> ⓘ
Get the active device
Sourcepub fn active_device_index(&self) -> usize
pub fn active_device_index(&self) -> usize
Get the active device index
Sourcepub fn set_device(&mut self, index: usize) -> Result<()>
pub fn set_device(&mut self, index: usize) -> Result<()>
Set the active device
Sourcepub fn can_access_peer(&self, src: usize, dst: usize) -> Result<bool>
pub fn can_access_peer(&self, src: usize, dst: usize) -> Result<bool>
Check if peer access is enabled between two devices
Sourcepub fn enable_peer_access(&mut self, src: usize, dst: usize) -> Result<()>
pub fn enable_peer_access(&mut self, src: usize, dst: usize) -> Result<()>
Enable peer access between two devices
Sourcepub fn disable_peer_access(&mut self, src: usize, dst: usize) -> Result<()>
pub fn disable_peer_access(&mut self, src: usize, dst: usize) -> Result<()>
Disable peer access between two devices
Sourcepub fn all_properties(&self) -> Vec<&DeviceProperties>
pub fn all_properties(&self) -> Vec<&DeviceProperties>
Get properties for all devices
Sourcepub fn distribute_range(&self, total: usize) -> Vec<DeviceRange>
pub fn distribute_range(&self, total: usize) -> Vec<DeviceRange>
Distribute a 1D range across all devices (simple round-robin)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MultiGpuContext
impl RefUnwindSafe for MultiGpuContext
impl Send for MultiGpuContext
impl Sync for MultiGpuContext
impl Unpin for MultiGpuContext
impl UnsafeUnpin for MultiGpuContext
impl UnwindSafe for MultiGpuContext
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