gpuDevice
Query the selected GPU device.
📝Syntax
d = gpuDevice()
📤Output Arguments
Parameter Description
d a struct describing the selected GPU device.
📄Description

d = gpuDevice() returns a struct describing the selected GPU device, with the following fields:

Index: the device index.

Name: the adapter name.

Vendor: the hardware vendor.

Architecture: the device architecture.

Backend: the graphics backend in use (Vulkan, Metal or D3D12).

MaxBufferSize: the maximum size in bytes of a single device buffer.

An error is raised when no compatible GPU device is available.

💡Examples
if canUseGPU()
  d = gpuDevice()
end
🔗See Also
gpuDeviceCountcanUseGPU
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub