IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /docs/manual/basics.md). For the complete Mojo documentation index, see llms.txt.
Skip to main content
Version: Nightly
For the complete Mojo documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /docs/manual/basics.md).

DeviceRef

struct DeviceRef

Uniquely identifies a specific compute device within this system.

Fields

  • driver (StaticString): The unique identifier for the driver that provides access to this device.
  • driver_device_index (Int): The index of this device within the list of enumerated devices in the context of the providing driver. This will never be negative.
  • spec (DeviceSpec): The device specification this device conforms to.

Implemented traits

AnyType, Copyable, ImplicitlyDeletable, Movable