MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
mtl::runtime Namespace Reference

Classes

struct  none
 No device runtime: host memory, and runtime::preferred in a build that enables no accelerator. More...

Typedefs

using preferred = none
 The runtime the build selected, and the default argument of every device memory kind, so application code can write memory_space::device<> and name no programming model.

Typedef Documentation

◆ preferred

The runtime the build selected, and the default argument of every device memory kind, so application code can write memory_space::device<> and name no programming model.

MTL5_PREFERRED_RUNTIME names it explicitly (its tag must be declared before this header is included); otherwise it is the enabled backend's runtime (runtime::metal with MTL5::metal, runtime::cuda with MTL5::cuda, runtime::hip with MTL5::hip, runtime::vulkan with MTL5::vulkan), and runtime::none in a build without one. A build that links two backends names its choice with MTL5_PREFERRED_RUNTIME.