Class PlanReport#

The plan report of a handler’s last prepare, the web twin of anira::PlanReport: what InferenceHandler.prepare() and an audio node’s prepare return. One plan per model entry and candidate that matched, its slots and the extensions it consumes; a dense plan index is what InferenceHandler.setPlan() takes, and PlanReport.find() looks one up by its variant, engine and provider (a PlanQuery, anira::PlanQuery), null where C++ returns an empty optional. A slot row (PlanSlot) says where its edge takes the bytes (edgeClass, an anira_edge_class) and who moves them (movedBy, an anira_mover_flags: nobody, anira’s own code, or the engine’s runtime), with reason saying why, and the window a Streamed slot runs at (window and hop, a flexible window as the anchor hop pinned it; windowDerived where its spec declared none and the window was derived from the Time axis); a plan row (PlanInfo) names the memory its provider computes in (memoryKind, an anira_memory_kind: unified on the CPU path, unknown for a device provider, since a browser exposes no device’s memory kind, so its slots read ANIRA_EDGE_UNKNOWN).

class PlanReport(abi, report)#

The plan report of a handler’s last prepare (anira_plan_report): one plan per model entry and candidate that matched, in plan order, with its slots and the extensions it consumes; what InferenceHandler.prepare returns, as anira::PlanReport of anira.hpp. A view: it reads the handler’s report at every call, valid until the handler’s next prepare or its destroy. A plan is a dense index below numPlans(), what InferenceHandler.setPlan takes.

Arguments:
  • abi (AniraBindings)

  • report (number)

numPlans()#

The number of plans (anira_plan_report_num_plans).

Returns:

number

plans()#

One row per plan, in plan order (anira_plan_report_plans).

Returns:

PlanInfo[]

slots(plan, inputs)#

The input (inputs true) or output slots of one plan, in tensor order.

Arguments:
  • plan (number)

  • inputs (boolean)

Returns:

PlanSlot[]

extensions(plan)#

The extensions one plan consumes (anira_plan_report_exts).

Arguments:
  • plan (number)

Returns:

PlanExtension[]

find(query={})#

The first plan, in plan order, that has every property the query names (anira_plan_report_find, as anira::PlanReport::find): the index InferenceHandler.setPlan takes, or null when no plan has them (where C++ returns an empty optional). Allocates nothing on the heap. A query against the pair rule (ANIRA_ENGINE_CUSTOM without engineId, an id beside a built-in value) throws an AniraError.

Arguments:
  • query (PlanQuery)

Returns:

null | number

native()#

The anira_plan_report* the raw entries take (0 for a handler that is not prepared).

Returns:

number