pub struct DeviceProperties<Feature: Ord + Copy> {
pub memory: MemoryDeviceProperties,
pub hardware: HardwareProperties,
pub timing_method: TimingMethod,
/* private fields */
}
Expand description
Properties of what the device can do, like what Feature
are
supported by it and what its memory properties are.
Fields§
§memory: MemoryDeviceProperties
The memory properties of this client.
hardware: HardwareProperties
The topology properties of this client.
timing_method: TimingMethod
The method used for profiling on the device.
Implementations§
Source§impl<Feature: Ord + Copy> DeviceProperties<Feature>
impl<Feature: Ord + Copy> DeviceProperties<Feature>
Sourcepub fn new(
features: &[Feature],
memory_props: MemoryDeviceProperties,
hardware: HardwareProperties,
timing_method: TimingMethod,
) -> Self
pub fn new( features: &[Feature], memory_props: MemoryDeviceProperties, hardware: HardwareProperties, timing_method: TimingMethod, ) -> Self
Create a new feature set with the given features and memory properties.
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 remove_feature(&mut self, feature: Feature)
pub fn remove_feature(&mut self, feature: Feature)
Removes a Feature
from the compute server.
This should only be used by a runtime when initializing a device.
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