typedef struct uform_arena_handle_t * uform_arena_t; Memory
Made by uform_arena_init where its executor computes: host pages on its memory domains, or the memory of its GPU, and a GPU that runs out reports uform_status_out_of_memory_k rather than falling back to the host. Each call given the arena rewinds it, which invalidates every output of the previous call, and refills it, growing only when the new outputs outsize everything it held, so a steady loop allocates once. To keep one call's outputs alive past the next call, pass the next call another arena.
- A
NULLarena is refused withuform_status_invalid_argument_k. - A call whose inputs point into the arena it is about to rewind reports
uform_status_invalid_argument_k. - An arena serves one call at a time; a second call naming it finishes
uform_status_contended_k, and a deferred one does so at submission. - A call on another residency or device than the arena's, or a call naming a GPU arena with another executor than the one that made it,
NULLincluded, reportsuform_status_device_k. - A blocking call borrows the arena until it returns, and a deferred one holds it until final.
- A call that fails or is cancelled leaves its outputs
NULL.
Notes
A GPU arena grows, fills and frees on the first stream of the executor that made it, so it serves only calls on that executor, and must be freed before that executor is.