pub struct DeviceCapabilities {
pub name: String,
pub total_memory: usize,
pub available_memory: usize,
pub supports_f16: bool,
pub supports_f64: bool,
pub max_threads_per_block: usize,
pub compute_capability: Option<(usize, usize)>,
}Expand description
Information about a device’s capabilities.
Fields§
§name: StringName of the device.
total_memory: usizeTotal memory in bytes.
available_memory: usizeAvailable memory in bytes.
supports_f16: boolWhether the device supports f16.
supports_f64: boolWhether the device supports f64.
max_threads_per_block: usizeMaximum threads per block (for GPU).
compute_capability: Option<(usize, usize)>Compute capability version (for CUDA).
Implementations§
Source§impl DeviceCapabilities
impl DeviceCapabilities
Sourcepub const fn supports_f32(&self) -> bool
pub const fn supports_f32(&self) -> bool
Returns true if the device supports f32.
Trait Implementations§
Source§impl Clone for DeviceCapabilities
impl Clone for DeviceCapabilities
Source§fn clone(&self) -> DeviceCapabilities
fn clone(&self) -> DeviceCapabilities
Returns a duplicate of the value. Read more
1.0.0 · 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 DeviceCapabilities
impl RefUnwindSafe for DeviceCapabilities
impl Send for DeviceCapabilities
impl Sync for DeviceCapabilities
impl Unpin for DeviceCapabilities
impl UnwindSafe for DeviceCapabilities
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