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

Mojo module

device_context

This module provides functionality for interacting with accelerators. In particular the DeviceContext struct, which represents a single stream of execution on a given accelerator. You can use this struct to allocate accelerator memory, copy data to and from the accelerator, and compile and execute functions on the accelerator.

comptime values​

DeviceContextList​

comptime DeviceContextList = DeviceContextArray[_]

Deprecated: A fixed-size collection of DeviceContext values.

This struct has been renamed to DeviceContextArray. This alias will be removed in a future version of Mojo.

Deprecated: 'DeviceContextList' is deprecated, use 'DeviceContextArray' instead

Structs​