pub struct DeviceProperties<Feature: Ord + Copy> { /* private fields */ }
Expand description
Properties of what the device can do, like what Feature
are
supported by it and what its memory properties are.
Implementations§
Source§impl<Feature: Ord + Copy> DeviceProperties<Feature>
impl<Feature: Ord + Copy> DeviceProperties<Feature>
Sourcepub fn new(
features: &[Feature],
memory_props: MemoryDeviceProperties,
hardware: HardwareProperties,
time_measurement: TimeMeasurement,
) -> Self
pub fn new( features: &[Feature], memory_props: MemoryDeviceProperties, hardware: HardwareProperties, time_measurement: TimeMeasurement, ) -> Self
Create a new feature set with the given features and memory properties.
Sourcepub fn time_measurement(&self) -> TimeMeasurement
pub fn time_measurement(&self) -> TimeMeasurement
Get the time measurement of the current device.
Sourcepub fn feature_enabled(&self, feature: Feature) -> bool
pub fn feature_enabled(&self, feature: Feature) -> bool
Check if the provided Feature
is supported by the runtime.
Sourcepub fn register_feature(&mut self, feature: Feature) -> bool
pub fn register_feature(&mut self, feature: Feature) -> bool
Register a Feature
supported by the compute server.
This should only be used by a runtime when initializing a device.
Sourcepub fn memory_properties(&self) -> &MemoryDeviceProperties
pub fn memory_properties(&self) -> &MemoryDeviceProperties
The memory properties of this client.
Sourcepub fn hardware_properties(&self) -> &HardwareProperties
pub fn hardware_properties(&self) -> &HardwareProperties
The topology properties of this client.
Trait Implementations§
Auto Trait Implementations§
impl<Feature> Freeze for DeviceProperties<Feature>
impl<Feature> RefUnwindSafe for DeviceProperties<Feature>where
Feature: RefUnwindSafe,
impl<Feature> Send for DeviceProperties<Feature>where
Feature: Send,
impl<Feature> Sync for DeviceProperties<Feature>where
Feature: Sync,
impl<Feature> Unpin for DeviceProperties<Feature>
impl<Feature> UnwindSafe for DeviceProperties<Feature>where
Feature: RefUnwindSafe,
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