Illustrated C/C++ source sheets, symbol index, API relationship graph, compiler console and debug trace

LIVE AI / FLEXIBLE SENSING / FLIGHT CONTEXT

Sensoraia API

Live AI and sensing, connected to the flight.
See, listen, inspect and return supported results while airborne.

Loading...
Searching...
No Matches
dipla::Network::State Struct Reference

Runtime-owned ONNX session and reusable input/output storage. More...

Classes

struct  ConditioningCache
 Own the paired encoder and cached denoiser plus their bound tensors. More...

Public Member Functions

 State (const std::string &model, const std::string &metadata, const NetworkOptions &policy)
 Validate the export contract before binding a reusable ONNX session.
 ~State ()
 Close the session while every borrowed member buffer is still alive.

Public Attributes

std::unique_ptr< ConditioningCache > conditioning_cache
onnx_session session {}
 Shared session borrowing this state's fixed buffers.
unsigned timeout_ms = 0
 Whole-plan cooperative deadline; zero disables the local timer.
std::array< float, DIPLA_COORDINATE_COUNT *points > candidate {}
 Float32 graph input: eight X values, then eight Y, then eight Z, not interleaved XYZ.
std::array< float, DIPLA_COORDINATE_COUNT *points > predicted {}
 Noise prediction written by the ONNX graph for each reverse step.
std::array< float, DIPLA_MAP_CHANNEL_COUNT *cells > maps {}
 NCHW map input: mean, variance, marker; each channel uses row * 51 + column.
std::array< float, 3 > position {}
 Normalized current pose tensor, ordered east/north/altitude.
std::array< float, 1 > total {}
 Normalized scalar total-variance tensor.
std::array< int64_t, 1 > timestep {}
 Current reverse-diffusion step.
std::array< double, DIPLA_DIFFUSION_STEPS > alpha {}
 Trained cumulative-alpha schedule used by the deterministic DDIM update.
Normalization mean_normalization
 Center/scale pairs for mean, variance, and log1p(total variance), in that order.
Normalization variance_normalization
Normalization total_normalization

Detailed Description

Runtime-owned ONNX session and reusable input/output storage.

Bind once and reuse across all twenty denoising calls and later plans. This avoids rebuilding application-side tensors in the hot loop; it does not promise allocation-free execution inside ONNX Runtime.

Invariant
The session borrows member buffers whose addresses remain stable until the session is closed by the destructor.
Warning
A State is single-owner mutable workspace, not a concurrent sampler.

Constructor & Destructor Documentation

◆ State()

dipla::Network::State::State ( const std::string & model,
const std::string & metadata,
const NetworkOptions & policy )
inline

Validate the export contract before binding a reusable ONNX session.

Reject mismatched geometry, schedules, and tensors at startup, when there is still a useful file error to report, rather than after a plausible-looking but mis-scaled route reaches the application.

Parameters
[in]modelONNX graph path.
[in]metadataDeployment JSON describing training-time preprocessing.
[in]policyOptional integrity descriptor, thread count, and deadline policy.
Precondition
initialize_runtime() has successfully selected a compatible runtime.
Exceptions
std::exceptionIf reading, allocation, validation, or session creation fails.
Note
Parser views are temporary. Copy only checked numeric values into members; nothing in the session may borrow the constructor's JSON arena.
Todo
Centralize the supported world and schedule contract. Changing these checks alone is not model support: update the public sizes, tensor shapes, grid indexing, sampler loop, and coordinate transforms together, then rerun the reference cases. Until then, reject drift.
Todo
Derive this shape from the same supported-grid contract as maps and Belief; do not independently make only the binding dynamic.

◆ ~State()

dipla::Network::State::~State ( )
inline

Close the session while every borrowed member buffer is still alive.

Destructor bodies run before member destruction. Explicit closure here preserves that order even though session is declared before its buffers.

Member Data Documentation

◆ alpha

std::array<double, DIPLA_DIFFUSION_STEPS> dipla::Network::State::alpha {}

Trained cumulative-alpha schedule used by the deterministic DDIM update.

◆ candidate

std::array<float, DIPLA_COORDINATE_COUNT * points> dipla::Network::State::candidate {}

Float32 graph input: eight X values, then eight Y, then eight Z, not interleaved XYZ.

◆ conditioning_cache

std::unique_ptr<ConditioningCache> dipla::Network::State::conditioning_cache

◆ maps

std::array<float, DIPLA_MAP_CHANNEL_COUNT * cells> dipla::Network::State::maps {}

NCHW map input: mean, variance, marker; each channel uses row * 51 + column.

◆ mean_normalization

Normalization dipla::Network::State::mean_normalization

Center/scale pairs for mean, variance, and log1p(total variance), in that order.

◆ position

std::array<float, 3> dipla::Network::State::position {}

Normalized current pose tensor, ordered east/north/altitude.

◆ predicted

std::array<float, DIPLA_COORDINATE_COUNT * points> dipla::Network::State::predicted {}

Noise prediction written by the ONNX graph for each reverse step.

◆ session

onnx_session dipla::Network::State::session {}

Shared session borrowing this state's fixed buffers.

◆ timeout_ms

unsigned dipla::Network::State::timeout_ms = 0

Whole-plan cooperative deadline; zero disables the local timer.

◆ timestep

std::array<int64_t, 1> dipla::Network::State::timestep {}

Current reverse-diffusion step.

◆ total

std::array<float, 1> dipla::Network::State::total {}

Normalized scalar total-variance tensor.

◆ total_normalization

Normalization dipla::Network::State::total_normalization

◆ variance_normalization

Normalization dipla::Network::State::variance_normalization

The documentation for this struct was generated from the following file: