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...

Collaboration diagram for dipla::Network::State:

Data Structures

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.

Data Fields

std::unique_ptr< ConditioningCache > conditioning_cache
onnx_session session {}
unsigned timeout_ms = 0
std::array< float, DIPLA_COORDINATE_COUNT *points > candidate {}
std::array< float, DIPLA_COORDINATE_COUNT *points > predicted {}
std::array< float, DIPLA_MAP_CHANNEL_COUNT *cells > maps {}
std::array< float, 3 > position {}
std::array< float, 1 > total {}
std::array< int64_t, 1 > timestep {}
std::array< double, DIPLA_DIFFUSION_STEPS > alpha {}
Normalization mean_normalization
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.

Definition at line 197 of file dipla_planner.cpp.

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.

Definition at line 343 of file dipla_planner.cpp.

◆ ~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.

Definition at line 455 of file dipla_planner.cpp.

Field Documentation

◆ alpha

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

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

Definition at line 326 of file dipla_planner.cpp.

◆ 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.

Definition at line 314 of file dipla_planner.cpp.

◆ conditioning_cache

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

Definition at line 308 of file dipla_planner.cpp.

◆ 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.

Definition at line 318 of file dipla_planner.cpp.

◆ mean_normalization

Normalization dipla::Network::State::mean_normalization

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

Definition at line 328 of file dipla_planner.cpp.

◆ position

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

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

Definition at line 320 of file dipla_planner.cpp.

◆ predicted

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

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

Definition at line 316 of file dipla_planner.cpp.

◆ session

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

Shared session borrowing this state's fixed buffers.

Definition at line 310 of file dipla_planner.cpp.

◆ timeout_ms

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

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

Definition at line 312 of file dipla_planner.cpp.

◆ timestep

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

Current reverse-diffusion step.

Definition at line 324 of file dipla_planner.cpp.

◆ total

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

Normalized scalar total-variance tensor.

Definition at line 322 of file dipla_planner.cpp.

◆ total_normalization

Normalization dipla::Network::State::total_normalization

Definition at line 328 of file dipla_planner.cpp.

◆ variance_normalization

Normalization dipla::Network::State::variance_normalization

Definition at line 328 of file dipla_planner.cpp.


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