pub struct Device<'e> { /* private fields */ }Available on crate feature
api-22 only.Implementations§
Source§impl<'e> Device<'e>
impl<'e> Device<'e>
Sourcepub fn ep(&self) -> Result<&'e str>
pub fn ep(&self) -> Result<&'e str>
Returns the name of the EP this device belongs to.
let env = Environment::current()?;
let cpu = env.devices().next().unwrap();
assert!(matches!(cpu.ep(), Ok("CPUExecutionProvider")));Sourcepub fn ep_vendor(&self) -> Result<&'e str>
pub fn ep_vendor(&self) -> Result<&'e str>
Returns the name of the EP vendor this device belongs to, e.g. "Microsoft" for DirectML devices.
For the manufacturer of the device, see [Device::vendor].
let env = Environment::current()?;
let cpu = env.devices().next().unwrap();
assert!(matches!(cpu.ep_vendor(), Ok("Microsoft")));pub fn hardware_device(&self) -> HardwareDevice<'e>
pub fn memory_info(&self, host_accessible: bool) -> MemoryInfo<'_>
Available on crate feature
api-23 only.pub fn compatibility<E: ExecutionProvider>( &self, compatibility_info: &CompatibilityInfo<E>, ) -> Result<DeviceCompatibility>
Available on crate feature
api-24 only.Trait Implementations§
Auto Trait Implementations§
impl<'e> !Send for Device<'e>
impl<'e> !Sync for Device<'e>
impl<'e> Freeze for Device<'e>
impl<'e> RefUnwindSafe for Device<'e>
impl<'e> Unpin for Device<'e>
impl<'e> UnsafeUnpin for Device<'e>
impl<'e> UnwindSafe for Device<'e>
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