| Title: | ArrayFire Backend for 'amatrix' |
|---|---|
| Description: | Portable GPU backend for the 'amatrix' package using the 'ArrayFire' C API for dense float32 linear algebra. Builds with or without the 'ArrayFire' runtime present; without it the backend reports itself unavailable and 'amatrix' falls back to CPU execution. |
| Authors: | Bradley Buchsbaum [aut, cre] |
| Maintainer: | Bradley Buchsbaum <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-10-12 12:00:14 UTC |
| Source: | https://github.com/bbuchsbaum/amatrix |
Functions for registering and inspecting the ArrayFire GPU backend. The backend is optional: if ArrayFire is not installed the package loads but all GPU operations fall back to CPU.
amatrix_arrayfire_register(overwrite = TRUE) amatrix_arrayfire_enable_probe(register = TRUE) amatrix_arrayfire_is_available() amatrix_arrayfire_native_available(force = FALSE) amatrix_arrayfire_capabilities() amatrix_arrayfire_diagnostics() amatrix_arrayfire_bridge_info() amatrix_arrayfire_backend()amatrix_arrayfire_register(overwrite = TRUE) amatrix_arrayfire_enable_probe(register = TRUE) amatrix_arrayfire_is_available() amatrix_arrayfire_native_available(force = FALSE) amatrix_arrayfire_capabilities() amatrix_arrayfire_diagnostics() amatrix_arrayfire_bridge_info() amatrix_arrayfire_backend()
overwrite |
logical; whether to overwrite a previously registered
backend of the same name (default |
register |
logical; whether to register the backend with
amatrix after enabling the runtime probe (default |
force |
logical; when |
Call amatrix_arrayfire_register() once per session (or place it in
‘.Rprofile’) to make the ArrayFire backend available for dispatch.
ArrayFire registration is opt-in; loading amatrix.arrayfire no longer
auto-registers the backend unless options(amatrix.enable_arrayfire = TRUE)
is set before package load.
amatrix_arrayfire_enable_probe() activates the runtime probe for the
current session by setting AMATRIX_ARRAYFIRE_PROBE_GPU=1, enables
optional registration, and returns the probed availability invisibly.
amatrix_arrayfire_is_available() returns TRUE when ArrayFire
was found at build time and initialises successfully at runtime. Availability
checks are probe-gated so ordinary package load and backend listing stay safe.
amatrix_arrayfire_diagnostics() returns details about the active
compute backend, device count, and LAPACK availability.
The ARRAYFIRE_PREFIX environment variable can be set before
installation to point to a non-standard ArrayFire location.
amatrix_arrayfire_register returns the backend name invisibly.
amatrix_arrayfire_enable_probe returns the probed availability
invisibly.
amatrix_arrayfire_is_available and
amatrix_arrayfire_native_available return a scalar logical.
amatrix_arrayfire_capabilities returns a character vector of
supported operation names.
amatrix_arrayfire_diagnostics and amatrix_arrayfire_bridge_info
return named lists with diagnostic information.
amatrix_arrayfire_backend returns the backend contract list used
internally by amatrix.
amatrix::amatrix_backend_names(),
amatrix::amatrix_backend_status()