backend.h file
Runtime _ptr table (VECMAT_) and vm_.
Classes
- struct vm_backend_ops
- Function table for a registered backend.
- struct vm_backend
- External SIMD backend.
Enums
- enum (anonymous) { VM_BACKEND_OK = 0, VM_BACKEND_ERR_INVAL = -1, VM_BACKEND_ERR_NODISPATCH = -2, VM_BACKEND_ERR_FULL = -3, VM_BACKEND_ERR_CONFLICT = -4 }
Typedefs
- using vm_backend_ops = struct vm_backend_ops
- Function table for a registered backend.
- using vm_backend = struct vm_backend
- External SIMD backend.
Functions
-
auto vm_backend_register(const vm_
backend* backend) -> int - Register an external backend.
-
auto vm_backend_builtin(vm_
cpu_ features_ t isa) -> const vm_ backend_ ops* - Built-in op table for a compiled ISA, or NULL.
Defines
- #define VECMAT_DISPATCH_LIST(X)
- #define VECMAT_BACKEND_OP(name, params, args)
- #define VM_BACKEND_MAX
Typedef documentation
typedef struct vm_backend_ops vm_backend_ops
Function table for a registered backend.
Layout follows VECMAT_ below. New slots are appended; existing slots are never reordered.
typedef struct vm_backend vm_backend
External SIMD backend.
Register before the first vm_ (or from it). The implementation must only register when the kernels can run on this CPU. Public code does not dlopen.
Function documentation
int vm_backend_register(const vm_ backend* backend)
Register an external backend.
| Parameters | |
|---|---|
| backend | Backend descriptor; must outlive the process. |
| Returns | VM_ or a negative VM_BACKEND_ERR_* code. |
Idempotent for the same backend pointer. Rejects a NULL name, NULL ops, or any NULL slot. Same name with a different pointer is a conflict.
const vm_ backend_ ops* vm_backend_builtin(vm_ cpu_ features_ t isa)
Built-in op table for a compiled ISA, or NULL.
Optional CPU backends copy this and override slots, then call vm_. The table matches this TU's float width. Returns NULL if that ISA was not compiled. NEON, SVE, and SVE2 are provided. They are not part of the default library. See doc/.