pub enum ScopedGpu {
Cuda(Option<ComputeApi>, ScopedCudaDevice),
Hip(Option<ComputeApi>, ScopedHipDevice),
}Variants§
Cuda(Option<ComputeApi>, ScopedCudaDevice)
Hip(Option<ComputeApi>, ScopedHipDevice)
Implementations§
Source§impl ScopedGpu
impl ScopedGpu
pub fn current_api() -> Option<ComputeApi>
Trait Implementations§
Source§impl From<ScopedCudaDevice> for ScopedGpu
impl From<ScopedCudaDevice> for ScopedGpu
Source§fn from(device: ScopedCudaDevice) -> Self
fn from(device: ScopedCudaDevice) -> Self
Converts to this type from the input type.
Source§impl From<ScopedHipDevice> for ScopedGpu
impl From<ScopedHipDevice> for ScopedGpu
Source§fn from(device: ScopedHipDevice) -> Self
fn from(device: ScopedHipDevice) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ScopedGpu
impl RefUnwindSafe for ScopedGpu
impl !Send for ScopedGpu
impl !Sync for ScopedGpu
impl Unpin for ScopedGpu
impl UnwindSafe for ScopedGpu
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