Class anira::PrepareInfo#
-
class PrepareInfo#
Collaboration diagram for anira::PrepareInfo:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"1" [label="anira::PrepareInfo" tooltip="anira::PrepareInfo" fillcolor="#BFBFBF"]
"4" [label="anira_memory_handle" tooltip="anira_memory_handle"]
"2" [label="anira_prepare_info" tooltip="anira_prepare_info"]
"5" [label="anira_sync_token" tooltip="anira_sync_token"]
"3" [label="anira_tensor" tooltip="anira_tensor"]
"1" -> "2" [dir=forward tooltip="usage"]
"2" -> "3" [dir=forward tooltip="usage"]
"3" -> "4" [dir=forward tooltip="usage"]
"3" -> "5" [dir=forward tooltip="usage"]
}](../../_images/graphviz-58f383d346d8c7671c7b518dc6574dbc2b1ea571.png)
The record a Processor’s and an Engine::Loaded’s prepare receives, anira_prepare_info of anira/abi/lifecycle.h as views. Valid for the duration of prepare: the spans die with the call, the handler and the report stay valid while the handler stays prepared.
Public Functions
-
inline explicit PrepareInfo(const anira_prepare_info *info) noexcept#
-
inline anira_handler *handler() const noexcept#
The handler being prepared: its getters and the two Static entries are legal, never prepare, destroy or a Hard entry.
-
inline PlanReport report() const noexcept#
This prepare’s plan report.
-
inline uint32_t num_entries() const noexcept#
anira_handler_num_entries of this prepare: the chunks that can be in flight at once, one scratch slot per entry (ProcessorContext::entry).
-
inline std::span<const Tensor> inputs() const noexcept#
One template per slot of the model’s input list, State tensors included: the model end of the slot in the spec’s dtype and shape at the pinned window, the slot’s host domain, all-zero strides, no memory (never dereferenced). What ProcessorContext::input_tensor will fill, minus the data. A Tensor is an anira_tensor with names on it (one size, standard layout), so the C array reads as one of Tensor.
-
inline std::span<const char*const> input_names() const noexcept#
The canonical names of the input list, in slot order.
-
inline std::span<const char*const> output_names() const noexcept#
The canonical names of the output list, in slot order.
-
inline uint32_t flags() const noexcept#
The flags of this prepare: ANIRA_PREPARE_EXCLUSIVE when the handler’s inferences run one at a time and in order (a model declared stateful or with a declared State pair), with a reset at every stream start.
-
inline bool exclusive() const noexcept#
Whether ANIRA_PREPARE_EXCLUSIVE is set: an Engine::Loaded builds the session’s own executor in its Prepared then, since the session’s calls claim no shared instance.
-
inline const anira_prepare_info *native() const noexcept#
-
inline explicit PrepareInfo(const anira_prepare_info *info) noexcept#