Class anira::Capabilities#
-
class Capabilities#
A view over a context’s probed capabilities (anira_capabilities): what backends are usable here, which memory domains a tensor may live in, the extension kinds this build understands, and the edge registry. Valid while the Context is; refreshed in place by Context::probe.
Public Functions
-
inline explicit Capabilities(const anira_capabilities *capabilities) noexcept#
-
inline std::vector<BackendId> backends() const#
The backends compiled in and usable here.
-
inline std::vector<Domain> domains() const#
-
inline std::vector<std::string> ext_kinds() const#
-
inline std::vector<anira_edge_info> edges() const#
Every row of the edge registry, available or not: two per backend of backends(), in its order, edges()[2 * i] from the host domain to backends()[i] and edges()[2 * i + 1] back. The first read of a device provider’s rows asks its device’s memory kind (anira_edge_info.memory_kind; the unified-memory probe, bounded, kept by the context), so call it off the audio thread.
-
inline anira_edge_info edge(Domain from, const BackendId &to) const#
The row from domain
fromto backendto, the way an input goes (a device provider’s asks its memory kind as edges() does, for this backend alone).- Throws:
Error – with ANIRA_ERROR_EDGE_UNREACHABLE when the registry has no such row.
-
inline anira_edge_info edge(const BackendId &from, Domain to) const#
The row from backend
fromto domainto, the way an output goes.- Throws:
Error – with ANIRA_ERROR_EDGE_UNREACHABLE when the registry has no such row.
-
inline const anira_capabilities *native() const noexcept#
-
inline explicit Capabilities(const anira_capabilities *capabilities) noexcept#