Struct anira_prepare_info#
-
struct anira_prepare_info#
Collaboration diagram for anira_prepare_info:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"3" [label="anira_memory_handle" tooltip="anira_memory_handle"]
"1" [label="anira_prepare_info" tooltip="anira_prepare_info" fillcolor="#BFBFBF"]
"4" [label="anira_sync_token" tooltip="anira_sync_token"]
"2" [label="anira_tensor" tooltip="anira_tensor"]
"1" -> "2" [dir=forward tooltip="usage"]
"2" -> "3" [dir=forward tooltip="usage"]
"2" -> "4" [dir=forward tooltip="usage"]
}](../../_images/graphviz-201347252597068f91a09742d2c12c09a87cc05f.png)
What the prepare slot of a processor or an engine receives (anira_processor_prepare_fn, anira_engine_prepare_fn): the handler being prepared and what its chunks will look like. Tier 2, struct_size first, no implicit padding (LP64 72 bytes, ILP32 48); anira fills it, so it carries no struct_id. Valid for the duration of the call: the callee copies what it keeps (the handler pointer and the report stay valid while the handler stays prepared, the arrays do not).
Public Members
-
uint32_t struct_size#
sizeof(anira_prepare_info) of the library.
-
uint32_t num_entries#
anira_handler_num_entries of this prepare: the chunks that can be in flight at once, one scratch slot per entry (anira_processor_ctx.entry and anira_engine_ctx.entry, the chunk’s position in the handler’s chunk pool).
-
anira_handler *handler#
The handler being prepared: its getters and the two Static entries are legal, never prepare, destroy or a Hard entry.
-
const anira_plan_report *report#
This prepare’s plan report; valid while the handler stays prepared.
-
const anira_tensor *inputs#
num_inputs templates in slot order, State tensors included: the MODEL end of every input, the spec’s dtype and shape at the pinned window, all-zero strides, the slot’s host domain, no memory (never dereferenced). What anira_processor_input_tensor will fill, minus the data; an engine’s process sees the ENGINE side of the same slots, the templates of its load record.
-
const anira_tensor *outputs#
num_outputs templates, likewise.
-
const char *const *input_names#
num_inputs canonical names, in slot order.
-
const char *const *output_names#
num_outputs canonical names.
-
uint32_t num_inputs#
The tensors of the model’s input list, State tensors included.
-
uint32_t num_outputs#
The tensors of the model’s output list, State tensors included.
-
uint32_t flags#
The flags of this prepare: ANIRA_PREPARE_EXCLUSIVE when the handler’s inferences run one at a time and in order (a model declared ANIRA_MODEL_STATEFUL or with a declared State pair), with a reset at every stream start; 0 otherwise. No other bit is defined in this pre-release.
-
uint32_t reserved#
0.
-
uint32_t struct_size#