Struct DeviceProperties

Source
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>

Source

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.

Source

pub fn time_measurement(&self) -> TimeMeasurement

Get the time measurement of the current device.

Source

pub fn feature_enabled(&self, feature: Feature) -> bool

Check if the provided Feature is supported by the runtime.

Source

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.

Source

pub fn memory_properties(&self) -> &MemoryDeviceProperties

The memory properties of this client.

Source

pub fn hardware_properties(&self) -> &HardwareProperties

The topology properties of this client.

Trait Implementations§

Source§

impl<Feature: Debug + Ord + Copy> Debug for DeviceProperties<Feature>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V