Skip to main content

neat Namespace

Definition

namespace simaai::neat { ... }

Namespaces Index

namespacedebug
namespacedlpack

Minimal DLPack-shaped structs for zero-copy interop with NumPy/PyTorch. More...

namespaceerror_codes
namespacegenai
namespacegraph
namespaceinternal
namespacempk
namespacenodes
namespacepipeline_internal
namespacestages
namespacevalidators

Classes Index

structAudioSpec

Audio-tensor metadata: sample rate, channel count, interleaving. More...

structBoundaryFlowStats

Per-boundary flow statistics — buffer counts at identity probes between Nodes. More...

structBox

One axis-aligned detection produced by BoxDecode. More...

structBoxDecodeResult

Parsed BoxDecode output paired with its raw byte buffer. More...

structBuildAdaptationAction

One line item from the build-adaptation log. More...

structBuildAdaptationSummary

Snapshot of build-time adaptation state — present for build(input) flows. More...

structBusMessage

A single GStreamer bus message captured during pipeline build/run. More...

structByteStreamSpec

Opaque byte-stream tensor metadata. More...

classCast

CVU kernel Node that casts a tensor between FP32 and BF16 (no scale/zero-point). More...

structCastOptions

Construction options for a Cast Node. More...

classCastTess

Fused CVU kernel Node: Cast (FP32→BF16) followed by Tess. More...

structCastTessOptions

Construction options for a CastTess Node. More...

structColorConvertSpec

Color-format conversion parameters. More...

classContract

A single validation rule applied to a NodeGroup. More...

structContractFieldSpec

Per-field contract: where the field value comes from and the override policy. More...

structContractPortSpec

Per-port contract: the shape/type/segment requirements for one input or output. More...

classContractRegistry

Holds a set of Contracts and runs them to produce a ValidationReport. More...

structConversionCost

Cost estimate for a conversion: bytes moved + a coarse compute-class bucket (low/med/high). More...

structConversionTrace

Single audit-log entry for a conversion that occurred. More...

structConversionTraceCollector

Collects ConversionTrace entries for post-mortem auditing of a pipeline run. More...

classDequant

CVU kernel Node that dequantizes INT8 tensors to FP32 using scale + zero-point. More...

structDequantOptions

Construction options for a Dequant Node. More...

classDetess

CVU kernel Node that detessellates MLA-layout tensors back to natural HWC/CHW order. More...

classDetessCast

Fused CVU kernel Node: Detess followed by Cast (BF16→FP32). More...

structDetessCastOptions

Construction options for a DetessCast Node. More...

classDetessDequant

Fused CVU kernel Node: Detess followed by Dequant (INT8→FP32). More...

structDetessDequantOptions

Construction options for a DetessDequant Node. More...

structDetessOptions

Construction options for a Detess Node. More...

structDevice

Device descriptor: type + numeric ID (for multi-device boards). More...

structEncodedSpec

Encoded-stream tensor metadata: which codec the bytes represent. More...

classFileInput

Wraps GStreamer's filesrc element — reads encoded media from a path on disk. More...

structFormatSpec

Thin wrapper around FormatTag with implicit string conversions. More...

structGraphProcessCvuStageRequest
structGraphProcessMlaStageRequest
structGraphQuantContract
structGraphTensorContract
classH264CapsFixup

Helper Node that fills in missing H.264 RTP caps fields with fallbacks. More...

classH264Decode

Hardware-accelerated H.264 decoder Node. More...

classH264Depacketize

Depayloads RTP-encapsulated H.264 into a raw H.264 byte stream. More...

classH264EncodeSima

Hardware-accelerated H.264 encoder Node. More...

classH264Packetize

RTP H.264 payloader Node — wraps encoded H.264 into RTP packets. More...

classH264Parse

H.264 stream parser Node — parses NAL units, finds keyframes, optionally locks caps. More...

structH264ParseOptions

Construction options for an H264Parse Node — config-interval and optional caps lock. More...

structI420Mapped

Bundles an I420 view with the Mapping that keeps its underlying buffer alive. More...

structI420View

Non-owning view into I420 pixel data: separate Y, U, V planes. More...

classImageDecode

Auto-detects and decodes still-image formats (JPEG, PNG, BMP, …) to raw video. More...

structImageSpec

Image-tensor metadata: pixel format and (optional) color space. More...

classInput

Push-mode source Node. More...

structInputDropInfo

Diagnostic record for a dropped input frame. More...

structInputOptions

Caps, buffering, and pool options for the Input Node. More...

structInputStreamStats

Per-Run input-side telemetry: counts, drops, and timing averages. More...

classJpegDecode

Decodes JPEG-encoded buffers to raw frames. More...

classLatencyProfiler

Per-sample latency tracker; attach to a Run to capture timing telemetry. More...

structLatencyProfilerOptions

Construction options for LatencyProfiler. More...

structLayoutConvertSpec

Axis-permutation parameters for HWC↔CHW-style layout conversions. More...

structMapping

Scoped read/write window into a TensorBuffer. More...

structMeasureLatencyStats

Percentile summary for a measured latency series. More...

structMeasureOptions

Options for framework-owned runtime measurement. More...

structMeasurePluginLatency

Aggregated per-plugin/kernel timing captured during a measurement window. More...

structMeasureReport

Framework-owned report returned by MeasureScope::stop(). More...

classMeasureScope

Observation scope for measuring an application-owned push/pull interval. More...

classMetadataSender
structMetadataSenderOptions
classModel

Loaded form of an MPK; the simplified entry point to run inference on Modalix. More...

structNodeContractDefinition

Bundle of port and field specs that fully describes a Node's contract. More...

structNodeReport

Per-Node entry in the report, listing what that Node produced in the GStreamer pipeline. More...

structNormalizeSpec

Mean/stddev normalization parameters. More...

structNv12Mapped

Bundles an NV12 view with the Mapping that keeps its underlying buffer alive. More...

structNv12View

Non-owning view into NV12 pixel data: Y plane + interleaved UV plane. More...

classOutput

Pull-side terminal sink. More...

structOutputOptions

Buffering / sync options for the Output Node. More...

structOutputTensorOptions

Options for Session::add_output_tensor() — the tensor-friendly output helper. More...

classPCIeSink

Terminal sink Node that streams samples to a PCIe-connected host. More...

structPCIeSinkOptions

Construction options for a PCIeSink Node. More...

classPCIeSrc

Source-role Node that receives samples from a PCIe-connected host. More...

structPCIeSrcOptions

Construction options for a PCIeSrc Node. More...

structPcmAudio
structPlane

One plane of a composite (multi-plane) tensor. More...

structPowerFieldReading

One scalar rail field read from a PMIC. More...

structPowerFieldSummary

Summary statistics for one scalar rail field. More...

classPowerMonitor

Background SOM power sampler. More...

structPowerMonitorOptions

Options for a PowerMonitor. More...

structPowerRailConfig

Configuration for one PMBus rail exposed by a paged PMIC. More...

structPowerRailReading

Snapshot for one rail. More...

structPowerRailSummary

Summary statistics for one rail. More...

structPowerSnapshot

Point-in-time board power snapshot. More...

structPowerSummary

Aggregated power monitor result. More...

structPreparedRunnerOptions

Experimental prepared-route runner options. More...

structPreparedRuntimeDescriptor
classPreproc

Fused CVU preprocessing Node — resize + color-convert + normalize (+ optional tess). More...

structPreprocessContract

Per-input contract describing what the preprocess stage expects to receive. More...

structPreprocessExplicitKnobs

Per-stage flags recording which preprocess fields the user set explicitly. More...

structPreprocessMetaContract

Metadata-side contract — names and fields the preprocess stage requires. More...

structPreprocessMetaTemplate

Preprocess metadata template attached to ingress buffers. More...

structPreprocessOptions

User-facing preprocess intent — what the application asks for. More...

structPreprocessRuntimeMeta

Per-buffer preprocessing context — the inverse-transform breadcrumb trail. More...

structPreprocOptions

Construction options for a Preproc Node. More...

structProcessCvuOptions

Simple process-CVU backend placement for model pre/post stages. More...

structProcessMlaOptions

process-MLA execution options. More...

structProfilerKernelAggregate

Aggregated timings for one (backend, kernel, stage, slot) tuple. More...

structProfilerKernelInvocation

One kernel-invocation telemetry event. More...

structProfilerMemcpySite

Aggregate counters for one instrumented memcpy site. More...

structProfilerReport

Snapshot bundle returned by LatencyProfiler::finalize(). More...

structPullError

Structured error returned by Run::pull() when status is Error. More...

classQuant

CVU kernel Node that quantizes FP32 tensors to INT8 using scale + zero-point. More...

structQuantizeSpec

INT8 (or other low-precision) quantization parameters. More...

structQuantOptions

Construction options for a Quant Node. More...

structQuantSpec

Quantization metadata for INT8/INT16 tensors. More...

classQuantTess

Fused CVU kernel Node: Quant (FP32→INT8) followed by Tess. More...

structQuantTessOptions

Construction options for a QuantTess Node. More...

classQueue

Wraps GStreamer's queue element — inserts a thread/buffer boundary. More...

structResizeSpec

Resize / letterbox / crop parameters. More...

structResolvedPreprocessPlan

Final resolved plan — what the framework actually compiled and runs. More...

classRTSPInput

RTSP source Node — pulls a stream from an RTSP URL. More...

classRtspServerHandle

Live handle for a Session running in RTSP server mode. More...

structRtspServerOptions

Options for Session::run_rtsp() — controls the RTSP server's mount point and ports. More...

classRun

Live pipeline handle: push inputs in, pull outputs out. More...

structRunAdvancedOptions

Advanced runtime tuning knobs (most users never set these). More...

structRunDiagSnapshot

Aggregate diagnostic snapshot: stages, boundaries, per-element, per-pad. More...

structRunElementFlowStats

Per-element data-flow telemetry — buffer and byte counts, plus caps changes. More...

structRunElementPadTimingStats

Per-pad timing — finest-grained telemetry, one row per (element, pad). More...

structRunElementTimingStats

Per-element timing — finer-grained than per-stage; one row per GStreamer element. More...

structRunMeasurementSummary

One-call runtime measurement summary. More...

structRunOptions

Per-Run runtime options. More...

structRunReportOptions

Toggles for what Run::report() includes in its formatted text output. More...

structRunStageStats

Per-stage timing telemetry — how long each stage takes per sample. More...

structRunStats

Per-Run end-to-end statistics: counts and latency. More...

structRuntimeCounters

Common input/output/drop counters. More...

structRuntimeLatencyMetrics

Basic latency summary in milliseconds. More...

structRuntimeMetricGroup

Generic named metric group for adapter-specific diagnostics. More...

structRuntimeMetrics

Unified runtime metrics returned by Run, Model::Runner, GraphRun, and tools. More...

structRuntimeMetricsOptions

Options controlling collection and rendering of runtime metrics. More...

structRuntimeMetricValue

Generic named scalar metric. More...

structSample

Typed payload returned by Run::pull() and consumed by Run::push(). More...

structSegment

One named memory segment within a multi-segment tensor buffer (e.g., separate Y / UV planes). More...

structSemantic

Discriminated union of "what this tensor represents". More...

classSession

The assembly stage — turns a list of Nodes into a runnable, deterministic pipeline. More...

classSessionError

Framework exception type carrying a structured SessionReport. More...

structSessionOptions

Per-Session construction options. More...

structSessionReport

Structured pipeline diagnostics — the framework's primary triage record. More...

classSimaArgMax

EV74 postprocess Node that emits the top-class index from a classification tensor. More...

structSimaArgMaxOptions

Construction options for a SimaArgMax Node. More...

classSimaBoxDecode

EV74 postprocess Node that decodes detection-head tensors into object boxes (with NMS). More...

classSimaRender

Node that renders bounding-box overlays onto a video frame. More...

structSimaRenderOptions

Construction options for a SimaRender Node. More...

classStillImageInput

Source Node that emits a single image as a continuous video stream. More...

structTensor

Universal tensor type — a labeled box of numbers that flows between Nodes. More...

structTensorBuffer

Storage handle for a tensor — opaque container for one of four backing memory kinds. More...

structTensorConstraint

Declarative tensor contract — describes the shape/dtype/device/format a tensor must satisfy. More...

structTensorRouteMeta

Routing metadata that travels with a tensor through multi-output pipelines. More...

classTess

CVU kernel Node that tessellates a natural-layout tensor into MLA tile geometry. More...

structTessellateSpec

MLA tessellation (tile-shuffle) parameters. More...

structTessOptions

Construction options for a Tess Node. More...

structTessSpec

Tessellation metadata — tile geometry for the MLA's tile-block layout. More...

structTextSpec

UTF-8 text tensor metadata. More...

structTokensSpec

Token-tensor metadata for NLP-style tensors. More...

structTransform

Discriminated union of all per-stage transform specs. More...

classUdpOutput

UDP sink Node — writes packets to a UDP destination. More...

structUdpOutputOptions

Destination + sync options for the UdpOutput Node. More...

structValidateOptions

Options for Session::validate(). More...

structValidationContext

Context passed to contracts during validation. More...

structValidationIssue

A single reported issue from a Contract. More...

classValidationReport

Report produced by running a ContractRegistry. More...

structVerboseOptions

Per-topic framework verbosity controls. More...

classVideoConvert

Wraps GStreamer's videoconvert. More...

classVideoScale

Wraps GStreamer's videoscale. More...

classVideoTrackSelect

Creates a qtdemux element and selects a specific video pad (e.g., demux.video_0). More...

Typedefs Index

usingBusMessageFn = void(*)(const char *type, const char *src, const std::string &line, void *user_data)

Callback invoked for every bus message drained. More...

usingBusErrorFn = void(*)(const std::string &line, void *user_data)

Callback invoked when a bus error message is encountered. More...

usingTensorSpec = TensorConstraint

Tensor specification used by the Model API. More...

usingSampleList = std::vector< Sample >

Convenience alias for a list of Samples (multi-input/multi-output payloads). More...

usingTensorList = std::vector< Tensor >

Convenience alias for an ordered list of Tensors (multi-input/multi-output models). More...

usingStorage = TensorBuffer

Alias for backward-compatibility. New code prefers TensorBuffer directly. More...

usingByteFormat = ByteStreamSpec::ByteFormat

Convenience top-level alias for ByteStreamSpec::ByteFormat. More...

Enumerations Index

enum classGraphTensorMaterializationKind : std::uint8_t { ... }
enum classCastDirection { ... }

Direction of the BF16/FP32 conversion performed by a Cast Node. More...

enum classTensorMemory { ... }

Placement for Tensor creators that materialize owned storage. More...

enum classMapMode { ... }

Access mode for TensorBuffer::map(). More...

enum classMemoryContract { ... }

How a Node (or Session) wants buffer memory to be sourced/handed back. More...

enum classCapsMemory { ... }

Memory class to advertise in GStreamer caps. More...

enum classContractFieldSource { ... }

Where the value of a contract field originates. More...

enum classContractOverridePolicy { ... }

Whether the Builder may override a contract field at build time. More...

enum classValidationSeverity { ... }

Severity level for validation issues. More...

enum classAutoFlag { ... }

Tri-state knob: let the planner decide, force on, or force off. More...

enum classInputKind { ... }

What kind of input the user is feeding the preprocess pipeline. More...

enum classResizeMode { ... }

How the resize stage maps non-matching input dimensions to the model's input shape. More...

enum classPreprocessColorFormat { ... }

Color format hint for the color-convert stage. More...

enum classNormalizePreset { ... }

Common normalize presets — convenient shorthand for famous mean/stddev pairs. More...

enum classPreprocessGraphFamily { ... }

Which preprocess graph family the planner selected. More...

enum classTransformType { ... }

Which transformation a Transform represents — used in user-supplied transform lists. More...

enum classInputMemoryPolicy { ... }

Where ingress buffers should be allocated when the application pushes samples. More...

enum classBoxDecodeType : std::int32_t { ... }

Decode families accepted by the BoxDecode backend. More...

enum classBoxDecodeTypeOption : std::int32_t { ... }

Tensor packing/layout option within a decode family. More...

enum classFormatTag { ... }

Identifies a media or tensor payload format. More...

enum classPowerMonitorProfile { ... }

Named board-level power monitor profiles. More...

enum classOverflowPolicy { ... }

What push() does when the input queue is full. More...

enum classRunPreset { ... }

Convenience preset bundles for RunOptions. More...

enum classOutputMemory { ... }

How output Tensors relate to the underlying GStreamer buffers. More...

enum classRuntimeMetricsFormat { ... }

Output format for runtime metrics reports. More...

enum classVerbosityLevel { ... }

Coarse-grained framework verbosity selector. More...

enum classRunMode { ... }

Timing mode a Run operates in. More...

enum classSampleKind { ... }

What kind of payload a Sample carries. More...

enum classPullStatus { ... }

Result status of Run::pull(). More...

enum classConversionKind { ... }

What kind of transformation a tensor conversion represents. More...

enum classConversionPolicy { ... }

How strict the framework is about implicit tensor conversions. More...

enum classDeviceType { ... }

Where a tensor's data lives — which processor can read it directly. More...

enum classStorageKind { ... }

How a TensorBuffer's memory was acquired and how to access it. More...

enum classPlaneRole { ... }

Role of a plane within a composite (multi-plane) tensor. More...

enum classTensorDType { ... }

Element data type of a tensor. More...

enum classTensorAxisSemantic : uint8_t { ... }

Per-axis semantic tag — the long-term layout vocabulary. More...

enum classTensorLayout { ... }

Transition-only coarse layout token (HWC / CHW / HW). More...

Operators Index

std::ostream &operator<< (std::ostream &os, const FormatSpec &spec)

Stream-insert the canonical string form of spec. More...

Functions Index

const char *to_string (ValidationSeverity s)

Stable string label for a ValidationSeverity (for reports/logs). More...

std::stringgst_message_to_string (GstMessage *msg)

Format a single GStreamer bus message into a stable, one-line string. More...

voiddrain_bus (GstElement *pipeline, BusMessageFn on_message, void *user_data)

Drain pending messages from the pipeline's bus, invoking on_message for each. More...

voidthrow_if_bus_error (GstElement *pipeline, BusMessageFn on_message, void *user_data, BusErrorFn on_error, void *error_user_data)

Drain the bus and throw a SessionError if any error message is found. More...

boolelement_exists (const char *factory)

Returns true if a GStreamer element factory with factory name is registered. More...

boolelement_property_exists (const char *factory, const char *property_name)

Returns true if factory exists and exposes a property named property_name. More...

std::stringfactory_plugin_path (const char *factory)

Returns the filesystem path of the plugin .so providing factory, or empty if unknown. More...

voidrequire_element (const char *factory, const char *context)

Throw a SessionError if factory is not registered. More...

voidrequire_tensordecoder (const char *context)

Throw a SessionError if SiMa's tensordecoder element is not available. More...

voidgst_init_once ()

Initialize GStreamer exactly once across the process. More...

boolprepare_processmla_runtime_config (ProcessMlaRuntimeConfig *runtime_cfg, std::string *error_message=nullptr)
boolbuild_graph_processmla_prepared_stage (const GraphProcessMlaStageRequest &request, simaai::gst::ProcessMlaPreparedStage *out, std::string *error_message=nullptr)
boolbuild_graph_processcvu_prepared_stage (const GraphProcessCvuStageRequest &request, simaai::gst::ProcessCvuPreparedStage *out, std::string *error_message=nullptr)
boolbuild_prepared_stage_from_manifest_context (const GstContext *static_manifest_context, const char *stage_id_or_name, const char *element_name_fallback, simaai::gst::PreparedStageSpec *out, std::string *error_message=nullptr)
boolattach_prepared_runtime_context (GstElement *pipeline, PreparedRuntimeDescriptor prepared_runtime, std::string *error_message=nullptr)
constexpr const char *box_decode_type_token (BoxDecodeType type)

Stable lower-case token for a decode family (used in caps, manifests, logs). More...

constexpr const char *box_decode_type_option_token (BoxDecodeTypeOption option)

Stable lower-case token for a decode-layout option. More...

constexpr boolbox_decode_type_is_yolo_family (BoxDecodeType type)

True iff type is one of the YOLO-family detection or segmentation variants. More...

constexpr boolbox_decode_type_is_segmentation (BoxDecodeType type)

True iff type is a segmentation variant (carries a mask head). More...

constexpr const char *box_decode_type_contract_summary (BoxDecodeType type)

Human-readable summary of type's tensor contract, used in API/docs/error surfaces. More...

std::vector< Box >parse_bbox_bytes (const std::vector< uint8_t > &bytes, int img_w, int img_h, int expected_topk, bool strict)

Parse a packed BBOX byte payload into typed Box records. More...

BoxDecodeResultdecode_bbox_tensor (const simaai::neat::Tensor &tensor, int img_w, int img_h, int expected_topk, bool strict)

Decode a BBOX-format Tensor into a BoxDecodeResult. More...

simaai::neat::EncodedSpec::Codeccaps_to_codec (const std::string &caps_string)

Map a GStreamer-style caps string to an EncodedSpec::Codec value. More...

Samplemake_encoded_sample (std::vector< uint8_t > bytes, std::string caps_string, int64_t pts_ns=-1, int64_t dts_ns=-1, int64_t duration_ns=-1)

Build an encoded Sample from raw bytes and caps metadata. More...

const char *format_tag_name (FormatTag tag)

Stable, canonical string token for tag (empty string for Auto). More...

std::stringformat_tag_to_string (FormatTag tag)

std::string form of the canonical format token. More...

std::stringupper_copy_ascii (std::string value)

ASCII upper-case copy of value (does not touch non-ASCII bytes). More...

booltensor_format_is_bf16_alias (std::string value)

True iff value names BF16 (any of BF16, BFLOAT16, EVXX_BF16, EVXX_BFLOAT16). More...

booltensor_format_is_fp32_alias (std::string value)

True iff value names FP32 (FP32, FLOAT32, EVXX_FLOAT32). More...

booltensor_format_is_int8_alias (std::string value)

True iff value names INT8 (INT8, EVXX_INT8). More...

booltensor_format_is_int16_alias (std::string value)

True iff value names INT16 (INT16, EVXX_INT16). More...

booltensor_format_is_int32_alias (std::string value)

True iff value names INT32 (INT32, EVXX_INT32). More...

std::stringnormalize_tensor_caps_format (std::string value)

Normalize tensor format aliases to the canonical EVXX_* token. More...

std::stringnormalize_caps_format_for_media (std::string media_type, std::string format)

Normalize a caps-format string conditionally on its media type. More...

FormatTagformat_tag_from_string (const std::string &value)

Parse a string token to a FormatTag; unknown values map to Auto. More...

boolis_raw_video_format (FormatTag tag)

True iff tag names a raw (uncompressed) video format. More...

boolis_tensor_payload_format (FormatTag tag)

True iff tag names a tensor payload (MLA, BBOX, ARGMAX, dtype kinds, EVXX aliases). More...

Samplemake_tensor_sample (const std::string &port_name, simaai::neat::Tensor tensor)

Construct a TensorSet-kind Sample wrapping a single Tensor for the named port. More...

Samplemake_bundle_sample (std::initializer_list< Sample > fields)

Construct a Bundle-kind Sample whose payload is the given list of inner Samples. More...

boolsample_is_multi_output (const Sample &sample)

Returns true if the sample carries multiple outputs (Bundle, or TensorSet with size > 1). More...

boolsample_has_tensor_list (const Sample &sample)

Returns true if the sample is a TensorSet with at least one tensor. More...

TensorList &sample_tensor_list (Sample &sample, const char *where=nullptr)

Mutable reference to the sample's tensor list. Throws SessionError if kind != TensorSet. More...

const TensorList &sample_tensor_list (const Sample &sample, const char *where=nullptr)

Const reference to the sample's tensor list. Throws SessionError if kind != TensorSet. More...

Tensor &require_single_tensor (Sample &sample, const char *where=nullptr)

Returns the sample's single Tensor; throws if the sample carries 0 or >1 tensors. More...

const Tensor &require_single_tensor (const Sample &sample, const char *where=nullptr)

Const variant of require_single_tensor. More...

TensorListtensors_from_sample (const Sample &sample, bool require_nonempty=true)

Extract all tensors from any sample shape (Tensor, TensorSet, Bundle); flattens recursively. More...

Samplesample_from_tensors (const TensorList &tensors)

Construct a TensorSet sample from a list of tensors. More...

Tensorfrom_gst_sample (GstSample *sample)
PcmAudiotensor_to_pcm_audio (const Tensor &tensor)
ConversionCostestimate_conversion_cost (ConversionKind kind, std::uint64_t bytes_copied)

Estimate the cost (bytes + compute class) of a conversion of the given kind moving bytes_copied bytes. More...

boolconversion_allowed (ConversionPolicy policy, ConversionKind kind)

Returns true if the policy allows a conversion of this kind (without performing it). More...

std::shared_ptr< TensorBuffer >make_cpu_owned_storage (std::size_t size_bytes)

Allocate a CPU-owned heap buffer of size_bytes, initialized to zero. More...

std::shared_ptr< TensorBuffer >make_cpu_external_storage (void *data, std::size_t size_bytes, std::shared_ptr< void > holder={}, bool read_only=true)

Wrap a foreign CPU pointer as a TensorBuffer without copying. More...

boolis_tessellated_int8_format (const std::string &fmt)

True iff fmt names an INT8 tessellated tensor format string. More...

boolis_tessellated_bf16_format (const std::string &fmt)

True iff fmt names a BF16 tessellated tensor format string. More...

std::vector< PowerRailConfig >default_modalix_som_power_rails ()

Default Modalix SOM PMIC rail table from the board measurement scripts. More...

std::vector< PowerRailConfig >default_modalix_dvt_power_rails ()

Default Modalix DVT PMIC rail table. More...

PowerMonitorProfiledetect_default_power_monitor_profile ()

Detect the most likely built-in board power profile for the current host. More...

std::stringpower_monitor_profile_name (PowerMonitorProfile profile)

Human-readable name for a power monitor profile. More...

std::vector< PowerRailConfig >power_rails_for_profile (PowerMonitorProfile profile)

Resolve a built-in board profile to its rail table. More...

PowerMonitorOptionsboard_power_monitor_options (int sample_interval_ms=100, PowerMonitorProfile profile=PowerMonitorProfile::Auto)

Convenience options enabling board power monitoring with optional auto-detect. More...

PowerMonitorOptionsmodalix_som_power_monitor_options (int sample_interval_ms=100)

Convenience options enabling Modalix SOM power monitoring. More...

PowerMonitorOptionsmodalix_dvt_power_monitor_options (int sample_interval_ms=100)

Convenience options enabling Modalix DVT power monitoring. More...

PowerSnapshotread_power_snapshot (const PowerMonitorOptions &options)

Read one immediate power snapshot using native Linux I2C access. More...

std::stringformat_power_summary (const PowerSummary &summary)

Format a compact human-readable power summary. More...

std::stringpower_summary_to_json (const PowerSummary &summary, int indent=2)

Format power summary as a JSON object. More...

std::stringformat_runtime_metrics (const RuntimeMetrics &metrics, RuntimeMetricsFormat format=RuntimeMetricsFormat::Text)

Render runtime metrics in the requested format. More...

std::stringruntime_metrics_to_json (const RuntimeMetrics &metrics, int indent=0)

Render runtime metrics as JSON. More...

std::stringruntime_metrics_to_text (const RuntimeMetrics &metrics)

Render runtime metrics as human-readable text. More...

std::stringruntime_metrics_to_compact_text (const RuntimeMetrics &metrics)

Render runtime metrics as one compact line. More...

Typedefs

BusErrorFn

using simaai::neat::BusErrorFn = typedef void (*)(const std::string& line, void* user_data)

Callback invoked when a bus error message is encountered.

Definition at line 36 of file GstBusWatch.h.

36using BusErrorFn = void (*)(const std::string& line, void* user_data);

BusMessageFn

using simaai::neat::BusMessageFn = typedef void (*)(const char* type, const char* src, const std::string& line, void* user_data)

Callback invoked for every bus message drained.

Parameters
type

GStreamer message type as a stable string (e.g., "warning", "info").

src

Name of the element that posted the message, or empty.

line

Pre-formatted single-line summary of the message.

user_data

Opaque pointer the caller registered.

Definition at line 32 of file GstBusWatch.h.

33 void* user_data);

SampleList

using simaai::neat::SampleList = typedef std::vector<Sample>

Convenience alias for a list of Samples (multi-input/multi-output payloads).

Definition at line 463 of file SessionOptions.h.

463using SampleList = std::vector<Sample>;

Storage

using simaai::neat::Storage = typedef TensorBuffer

Alias for backward-compatibility. New code prefers TensorBuffer directly.

Definition at line 461 of file TensorCore.h.

TensorList

using simaai::neat::TensorList = typedef std::vector<Tensor>

Convenience alias for an ordered list of Tensors (multi-input/multi-output models).

Definition at line 23 of file Tensor.h.

23using TensorList = std::vector<Tensor>;

TensorSpec

using simaai::neat::TensorSpec = typedef TensorConstraint

Tensor specification used by the Model API.

Definition at line 47 of file Model.h.

Enumerations

CastDirection

enum class simaai::neat::CastDirection
strong

Direction of the BF16/FP32 conversion performed by a Cast Node.

Enumeration values
Bf16ToFp32Read BF16, emit FP32 (typical post-MLA path) (= 0)
Fp32ToBf16Read FP32, emit BF16 (typical pre-MLA path) (= 1)

Definition at line 30 of file Cast.h.

30enum class CastDirection {
31 Bf16ToFp32 = 0,
32 Fp32ToBf16 = 1,
33};

GraphTensorMaterializationKind

enum class simaai::neat::GraphTensorMaterializationKind : std::uint8_t
strong
Enumeration values
Unknown (= 0)
Direct (= 1)
OffsetView (= 2)
Bf16LaneSplitRepack (= 3)

Definition at line 19 of file PreparedRuntimeBridge.h.

19enum class GraphTensorMaterializationKind : std::uint8_t {
20 Unknown = 0,
21 Direct = 1,
22 OffsetView = 2,
24};

MapMode

enum class simaai::neat::MapMode
strong

Access mode for TensorBuffer::map().

Enumeration values
ReadRead-only map; framework may skip cache invalidation if known clean (= 0)
WriteWrite-only map; framework may skip read-back; flushes cache on unmap
ReadWriteBoth directions; framework treats as full ownership transfer for the mapping's lifetime

Affects whether the framework treats the mapping as read or write.

Definition at line 122 of file TensorCore.h.

122enum class MapMode {
123 Read = 0,
124 Write,
125 ReadWrite,
127};

TensorMemory

enum class simaai::neat::TensorMemory
strong

Placement for Tensor creators that materialize owned storage.

Enumeration values
EV74 (= 0)
CPU
MLA
A65
Auto

The default for new owning creators is EV74: DDR allocated from the SiMa allocator in the EV74-addressable window (not EV74 VCCM). Use CPU for ordinary malloc-backed host tensors, or MLA for DMS0-backed tensors when the runtime allocator is available.

Definition at line 97 of file TensorCore.h.

97enum class TensorMemory {
98 EV74 = 0,
99 CPU,
100 MLA,
101 A65,
102 Auto,
103};

Operators

operator<<()

std::ostream & simaai::neat::operator<< (std::ostream & os, const FormatSpec & spec)
inline

Stream-insert the canonical string form of spec.

Definition at line 332 of file FormatSpec.h.

332inline std::ostream& operator<<(std::ostream& os, const FormatSpec& spec) {
333 os << spec.str();
334 return os;
335}

Functions

attach_prepared_runtime_context()

bool simaai::neat::attach_prepared_runtime_context (GstElement * pipeline, PreparedRuntimeDescriptor prepared_runtime, std::string * error_message=nullptr)

Definition at line 120 of file PreparedRuntimeBridge.h.

box_decode_type_contract_summary()

constexpr const char * simaai::neat::box_decode_type_contract_summary (BoxDecodeType type)
constexpr

Human-readable summary of type's tensor contract, used in API/docs/error surfaces.

Definition at line 205 of file BoxDecodeType.h.

206 switch (type) {
214 return "YOLO tensor contract: decoupled class heads (>4 channels, repeated across heads) or "
215 "packed heads (depth=3*(num_classes+5), consistent across heads).";
217 return "YOLO26 tensor contract: grouped raw l/t/r/b bbox heads (4 channels) paired "
218 "with repeated class-score heads (>4 channels).";
224 return "YOLO-seg contract: same class-depth rules as YOLO plus segmentation decode path.";
226 return "DETR contract: class channels inferred from max depth across heads; max depth must be "
227 ">4.";
231 return "Non-YOLO fallback contract: class channels inferred from max depth across heads; "
232 "max depth must be >4.";
234 default:
235 return "Unset decode type; runtime decode must fail fast until a concrete decode family is "
236 "selected.";
237 }
238}

box_decode_type_is_segmentation()

constexpr bool simaai::neat::box_decode_type_is_segmentation (BoxDecodeType type)
constexpr

True iff type is a segmentation variant (carries a mask head).

Definition at line 178 of file BoxDecodeType.h.

box_decode_type_is_yolo_family()

constexpr bool simaai::neat::box_decode_type_is_yolo_family (BoxDecodeType type)
constexpr

True iff type is one of the YOLO-family detection or segmentation variants.

Definition at line 151 of file BoxDecodeType.h.

152 switch (type) {
166 return true;
172 default:
173 return false;
174 }
175}

box_decode_type_option_token()

constexpr const char * simaai::neat::box_decode_type_option_token (BoxDecodeTypeOption option)
constexpr

Stable lower-case token for a decode-layout option.

Definition at line 123 of file BoxDecodeType.h.

124 switch (option) {
126 return "auto";
128 return "packed-per-head";
130 return "interleaved-by-head";
132 return "grouped-by-role";
134 return "split3-interleaved";
136 return "split3-grouped";
138 return "interleaved-by-head-probability";
140 return "interleaved-by-head-logit";
142 return "grouped-by-role-probability";
144 return "grouped-by-role-logit";
145 default:
146 return "auto";
147 }
148}

box_decode_type_token()

constexpr const char * simaai::neat::box_decode_type_token (BoxDecodeType type)
constexpr

Stable lower-case token for a decode family (used in caps, manifests, logs).

Definition at line 80 of file BoxDecodeType.h.

80constexpr const char* box_decode_type_token(BoxDecodeType type) {
81 switch (type) {
83 return "yolo";
85 return "yolov5";
87 return "yolov5-seg";
89 return "yolov7";
91 return "yolov7-seg";
93 return "yolov8";
95 return "yolov8-seg";
97 return "yolov8-pose";
99 return "yolov9";
101 return "yolov9-seg";
103 return "yolov10";
105 return "yolov10-seg";
107 return "yolo26";
109 return "detr";
111 return "effdet";
113 return "rcnn-stage1";
115 return "centernet";
117 default:
118 return "unspecified";
119 }
120}

build_graph_processcvu_prepared_stage()

bool simaai::neat::build_graph_processcvu_prepared_stage (const GraphProcessCvuStageRequest & request, simaai::gst::ProcessCvuPreparedStage * out, std::string * error_message=nullptr)

Definition at line 110 of file PreparedRuntimeBridge.h.

build_graph_processmla_prepared_stage()

bool simaai::neat::build_graph_processmla_prepared_stage (const GraphProcessMlaStageRequest & request, simaai::gst::ProcessMlaPreparedStage * out, std::string * error_message=nullptr)

Definition at line 106 of file PreparedRuntimeBridge.h.

build_prepared_stage_from_manifest_context()

bool simaai::neat::build_prepared_stage_from_manifest_context (const GstContext * static_manifest_context, const char * stage_id_or_name, const char * element_name_fallback, simaai::gst::PreparedStageSpec * out, std::string * error_message=nullptr)

Definition at line 114 of file PreparedRuntimeBridge.h.

caps_to_codec()

simaai::neat::EncodedSpec::Codec simaai::neat::caps_to_codec (const std::string & caps_string)

Map a GStreamer-style caps string to an EncodedSpec::Codec value.

Parameters
caps_string

GStreamer caps string (e.g., "video/x-h264, ...").

Returns

Matching codec enum, or the codec-unspecified sentinel if no match.

Definition at line 31 of file EncodedSampleUtil.h.

conversion_allowed()

bool simaai::neat::conversion_allowed (ConversionPolicy policy, ConversionKind kind)

Returns true if the policy allows a conversion of this kind (without performing it).

Definition at line 95 of file TensorConversion.h.

decode_bbox_tensor()

BoxDecodeResult simaai::neat::decode_bbox_tensor (const simaai::neat::Tensor & tensor, int img_w, int img_h, int expected_topk, bool strict)

Decode a BBOX-format Tensor into a BoxDecodeResult.

Convenience wrapper that maps the tensor, parses bytes via parse_bbox_bytes, and retains the raw byte view alongside the typed boxes.

Parameters
tensor

Tensor whose payload is a BBOX byte stream.

img_w

Original image width used to clamp/scale coordinates.

img_h

Original image height used to clamp/scale coordinates.

expected_topk

Number of detections expected (advisory; see strict).

strict

If true, mismatches against expected_topk throw.

Returns

Parsed detections plus retained raw bytes.

Definition at line 83 of file DetectionTypes.h.

drain_bus()

void simaai::neat::drain_bus (GstElement * pipeline, BusMessageFn on_message, void * user_data)

Drain pending messages from the pipeline's bus, invoking on_message for each.

Non-blocking: pulls all messages currently posted, then returns. Safe to call from the framework's polling loop while the pipeline is running.

Parameters
pipeline

Pipeline whose bus to drain.

on_message

Callback invoked for each message (may be null).

user_data

Opaque pointer forwarded to on_message.

Definition at line 55 of file GstBusWatch.h.

element_exists()

bool simaai::neat::element_exists (const char * factory)

Returns true if a GStreamer element factory with factory name is registered.

Definition at line 20 of file GstHelpers.h.

element_property_exists()

bool simaai::neat::element_property_exists (const char * factory, const char * property_name)

Returns true if factory exists and exposes a property named property_name.

Definition at line 23 of file GstHelpers.h.

estimate_conversion_cost()

ConversionCost simaai::neat::estimate_conversion_cost (ConversionKind kind, std::uint64_t bytes_copied)

Estimate the cost (bytes + compute class) of a conversion of the given kind moving bytes_copied bytes.

Definition at line 93 of file TensorConversion.h.

factory_plugin_path()

std::string simaai::neat::factory_plugin_path (const char * factory)

Returns the filesystem path of the plugin .so providing factory, or empty if unknown.

Definition at line 26 of file GstHelpers.h.

format_tag_from_string()

FormatTag simaai::neat::format_tag_from_string (const std::string & value)
inline

Parse a string token to a FormatTag; unknown values map to Auto.

Definition at line 199 of file FormatSpec.h.

199inline FormatTag format_tag_from_string(const std::string& value) {
200 const std::string up = upper_copy_ascii(value);
201 if (up.empty())
202 return FormatTag::Auto;
203 if (up == "RGB")
204 return FormatTag::RGB;
205 if (up == "BGR")
206 return FormatTag::BGR;
207 if (up == "GRAY" || up == "GRAY8")
208 return FormatTag::GRAY8;
209 if (up == "NV12")
210 return FormatTag::NV12;
211 if (up == "I420" || up == "YUV420")
212 return FormatTag::I420;
213 if (up == "YUYV")
214 return FormatTag::YUYV;
215 if (up == "ENCODED")
216 return FormatTag::ENCODED;
217 if (up == "H264")
218 return FormatTag::H264;
219 if (up == "BYTESTREAM" || up == "BYTE_STREAM" || up == "BYTE-STREAM" || up == "RAW_BYTES" ||
220 up == "RAW-BYTES" || up == "OPAQUE_BYTES" || up == "OPAQUE-BYTES" || up == "OCTET_STREAM" ||
221 up == "OCTET-STREAM")
223 if (up == "MLA")
224 return FormatTag::MLA;
225 if (up == "BBOX")
226 return FormatTag::BBOX;
227 if (up == "ARGMAX")
228 return FormatTag::ARGMAX;
229 if (up == "DETESSDEQUANT")
231 if (up == "FP32")
232 return FormatTag::FP32;
233 if (up == "INT8")
234 return FormatTag::INT8;
235 if (up == "UINT8")
236 return FormatTag::UINT8;
237 if (up == "BF16" || up == "BFLOAT16")
238 return FormatTag::BF16;
239 if (up == "EVXX_BF16")
241 if (up == "EVXX_FLOAT32")
243 if (up == "EVXX_INT8")
245 if (up == "EVXX_BFLOAT16")
247 return FormatTag::Auto;
248}

format_tag_name()

const char * simaai::neat::format_tag_name (FormatTag tag)
inline

Stable, canonical string token for tag (empty string for Auto).

Definition at line 61 of file FormatSpec.h.

61inline const char* format_tag_name(FormatTag tag) {
62 switch (tag) {
64 return "";
66 return "RGB";
68 return "BGR";
70 return "GRAY8";
72 return "NV12";
74 return "I420";
76 return "YUYV";
78 return "ENCODED";
80 return "H264";
82 return "BYTESTREAM";
84 return "MLA";
86 return "BBOX";
88 return "ARGMAX";
90 return "DETESSDEQUANT";
92 return "FP32";
94 return "INT8";
96 return "UINT8";
98 return "BF16";
100 return "EVXX_FLOAT32";
102 return "EVXX_INT8";
104 return "EVXX_BFLOAT16";
105 }
106 return "";
107}

format_tag_to_string()

std::string simaai::neat::format_tag_to_string (FormatTag tag)
inline

std::string form of the canonical format token.

Definition at line 110 of file FormatSpec.h.

110inline std::string format_tag_to_string(FormatTag tag) {
111 return std::string(format_tag_name(tag));
112}

from_gst_sample()

Tensor simaai::neat::from_gst_sample (GstSample * sample)

Definition at line 18 of file TensorAdapters.h.

gst_init_once()

void simaai::neat::gst_init_once ()

Initialize GStreamer exactly once across the process.

Safe to call from multiple threads and multiple times — only the first call performs the actual gst_init(); subsequent calls return immediately.

Definition at line 22 of file GstInit.h.

gst_message_to_string()

std::string simaai::neat::gst_message_to_string (GstMessage * msg)

Format a single GStreamer bus message into a stable, one-line string.

Parameters
msg

The bus message to format. Must be non-null.

Returns

Human-readable summary suitable for logs and SessionReport.

Definition at line 43 of file GstBusWatch.h.

is_raw_video_format()

bool simaai::neat::is_raw_video_format (FormatTag tag)
inline

True iff tag names a raw (uncompressed) video format.

Definition at line 251 of file FormatSpec.h.

252 return tag == FormatTag::RGB || tag == FormatTag::BGR || tag == FormatTag::GRAY8 ||
253 tag == FormatTag::NV12 || tag == FormatTag::I420 || tag == FormatTag::YUYV;
254}

is_tensor_payload_format()

bool simaai::neat::is_tensor_payload_format (FormatTag tag)
inline

True iff tag names a tensor payload (MLA, BBOX, ARGMAX, dtype kinds, EVXX aliases).

Definition at line 257 of file FormatSpec.h.

258 return tag == FormatTag::ByteStream || tag == FormatTag::MLA || tag == FormatTag::BBOX ||
260 tag == FormatTag::INT8 || tag == FormatTag::UINT8 || tag == FormatTag::BF16 ||
263}

is_tessellated_bf16_format()

bool simaai::neat::is_tessellated_bf16_format (const std::string & fmt)

True iff fmt names a BF16 tessellated tensor format string.

Definition at line 20 of file TessellatedTensor.h.

is_tessellated_int8_format()

bool simaai::neat::is_tessellated_int8_format (const std::string & fmt)

True iff fmt names an INT8 tessellated tensor format string.

Definition at line 18 of file TessellatedTensor.h.

make_bundle_sample()

Sample simaai::neat::make_bundle_sample (std::initializer_list< Sample > fields)
inline

Construct a Bundle-kind Sample whose payload is the given list of inner Samples.

Definition at line 484 of file SessionOptions.h.

484inline Sample make_bundle_sample(std::initializer_list<Sample> fields) {
485 Sample out;
487 out.fields = fields;
488 return out;
489}

make_cpu_external_storage()

std::shared_ptr< TensorBuffer > simaai::neat::make_cpu_external_storage (void * data, std::size_t size_bytes, std::shared_ptr< void > holder={}, bool read_only=true)

Wrap a foreign CPU pointer as a TensorBuffer without copying.

Lifetime of the underlying memory is tracked via the holder shared_ptr — pass a custom deleter or a refcounted handle that keeps the original allocation alive. Set read_only to indicate the framework should not write through this storage.

Definition at line 472 of file TensorCore.h.

make_cpu_owned_storage()

std::shared_ptr< TensorBuffer > simaai::neat::make_cpu_owned_storage (std::size_t size_bytes)

Allocate a CPU-owned heap buffer of size_bytes, initialized to zero.

Definition at line 464 of file TensorCore.h.

make_encoded_sample()

Sample simaai::neat::make_encoded_sample (std::vector< uint8_t > bytes, std::string caps_string, int64_t pts_ns=-1, int64_t dts_ns=-1, int64_t duration_ns=-1)

Build an encoded Sample from raw bytes and caps metadata.

The returned Sample owns bytes (moved in) and carries the supplied caps string plus optional PTS/DTS/duration timestamps. Pass -1 to leave a timestamp unset.

Parameters
bytes

Encoded payload (e.g., H.264 access unit or NAL).

caps_string

Caps string describing the codec/profile.

pts_ns

Presentation timestamp in nanoseconds, or -1 if unknown.

dts_ns

Decode timestamp in nanoseconds, or -1 if unknown.

duration_ns

Frame duration in nanoseconds, or -1 if unknown.

Returns

A Sample wrapping the encoded payload with the supplied caps.

Definition at line 47 of file EncodedSampleUtil.h.

make_tensor_sample()

Sample simaai::neat::make_tensor_sample (const std::string & port_name, simaai::neat::Tensor tensor)
inline

Construct a TensorSet-kind Sample wrapping a single Tensor for the named port.

Definition at line 466 of file SessionOptions.h.

466inline Sample make_tensor_sample(const std::string& port_name, simaai::neat::Tensor tensor) {
467 Sample out;
469 out.stream_label = port_name;
470 out.tensors = TensorList{std::move(tensor)};
471 return out;
472}

normalize_caps_format_for_media()

std::string simaai::neat::normalize_caps_format_for_media (std::string media_type, std::string format)
inline

Normalize a caps-format string conditionally on its media type.

Tensor caps (application/vnd.simaai.tensor) are normalized to canonical EVXX_ tokens; other media types (raw video, encoded video) are returned unchanged.

Parameters
media_type

GStreamer-style media type (e.g., application/vnd.simaai.tensor).

format

Format string to potentially normalize.

Returns

Normalized format if applicable, otherwise format unchanged.

Definition at line 187 of file FormatSpec.h.

187inline std::string normalize_caps_format_for_media(std::string media_type, std::string format) {
188 if (format.empty()) {
189 return format;
190 }
191 const std::string media_up = upper_copy_ascii(std::move(media_type));
192 if (media_up == "APPLICATION/VND.SIMAAI.TENSOR") {
193 return normalize_tensor_caps_format(std::move(format));
194 }
195 return format;
196}

normalize_tensor_caps_format()

std::string simaai::neat::normalize_tensor_caps_format (std::string value)
inline

Normalize tensor format aliases to the canonical EVXX_* token.

Maps user-facing or legacy spellings (FP32/FLOAT32, BF16/BFLOAT16, INT8/16/32) onto the EV-side caps form. Unknown values are passed through unchanged.

Definition at line 157 of file FormatSpec.h.

157inline std::string normalize_tensor_caps_format(std::string value) {
158 if (tensor_format_is_fp32_alias(value)) {
159 return "EVXX_FLOAT32";
160 }
161 if (tensor_format_is_bf16_alias(value)) {
162 return "EVXX_BFLOAT16";
163 }
164 if (tensor_format_is_int8_alias(value)) {
165 return "EVXX_INT8";
166 }
168 return "EVXX_INT16";
169 }
171 return "EVXX_INT32";
172 }
173 return value;
174}

parse_bbox_bytes()

std::vector< Box > simaai::neat::parse_bbox_bytes (const std::vector< uint8_t > & bytes, int img_w, int img_h, int expected_topk, bool strict)

Parse a packed BBOX byte payload into typed Box records.

Parameters
bytes

Raw bytes (the BBOX caps payload).

img_w

Original image width used to clamp/scale coordinates.

img_h

Original image height used to clamp/scale coordinates.

expected_topk

Number of detections expected (advisory; see strict).

strict

If true, mismatches against expected_topk throw; if false, parse best-effort.

Returns

Parsed detections (size may be less than expected_topk).

Definition at line 67 of file DetectionTypes.h.

prepare_processmla_runtime_config()

bool simaai::neat::prepare_processmla_runtime_config (ProcessMlaRuntimeConfig * runtime_cfg, std::string * error_message=nullptr)

Definition at line 103 of file PreparedRuntimeBridge.h.

require_element()

void simaai::neat::require_element (const char * factory, const char * context)

Throw a SessionError if factory is not registered.

Parameters
factory

GStreamer element factory name (e.g., "h264parse").

context

Caller context interpolated into the error message (typically the Node kind).

Definition at line 33 of file GstHelpers.h.

require_single_tensor()

Tensor & simaai::neat::require_single_tensor (Sample & sample, const char * where=nullptr)

Returns the sample's single Tensor; throws if the sample carries 0 or >1 tensors.

Definition at line 507 of file SessionOptions.h.

require_single_tensor()

const Tensor & simaai::neat::require_single_tensor (const Sample & sample, const char * where=nullptr)

Const variant of require_single_tensor.

Definition at line 509 of file SessionOptions.h.

require_tensordecoder()

void simaai::neat::require_tensordecoder (const char * context)

Throw a SessionError if SiMa's tensordecoder element is not available.

Parameters
context

Caller context for the error message.

Definition at line 39 of file GstHelpers.h.

sample_from_tensors()

Sample simaai::neat::sample_from_tensors (const TensorList & tensors)

Construct a TensorSet sample from a list of tensors.

Definition at line 513 of file SessionOptions.h.

sample_has_tensor_list()

bool simaai::neat::sample_has_tensor_list (const Sample & sample)
inline

Returns true if the sample is a TensorSet with at least one tensor.

Definition at line 498 of file SessionOptions.h.

498inline bool sample_has_tensor_list(const Sample& sample) {
499 return sample.kind == SampleKind::TensorSet && !sample.tensors.empty();
500}

sample_is_multi_output()

bool simaai::neat::sample_is_multi_output (const Sample & sample)
inline

Returns true if the sample carries multiple outputs (Bundle, or TensorSet with size > 1).

Definition at line 492 of file SessionOptions.h.

492inline bool sample_is_multi_output(const Sample& sample) {
493 return sample.kind == SampleKind::Bundle ||
494 (sample.kind == SampleKind::TensorSet && sample.tensors.size() > 1U);
495}

sample_tensor_list()

TensorList & simaai::neat::sample_tensor_list (Sample & sample, const char * where=nullptr)

Mutable reference to the sample's tensor list. Throws SessionError if kind != TensorSet.

Definition at line 503 of file SessionOptions.h.

sample_tensor_list()

const TensorList & simaai::neat::sample_tensor_list (const Sample & sample, const char * where=nullptr)

Const reference to the sample's tensor list. Throws SessionError if kind != TensorSet.

Definition at line 505 of file SessionOptions.h.

tensor_format_is_bf16_alias()

bool simaai::neat::tensor_format_is_bf16_alias (std::string value)
inline

True iff value names BF16 (any of BF16, BFLOAT16, EVXX_BF16, EVXX_BFLOAT16).

Definition at line 122 of file FormatSpec.h.

122inline bool tensor_format_is_bf16_alias(std::string value) {
123 const std::string up = upper_copy_ascii(std::move(value));
124 return up == "BF16" || up == "BFLOAT16" || up == "EVXX_BF16" || up == "EVXX_BFLOAT16";
125}

tensor_format_is_fp32_alias()

bool simaai::neat::tensor_format_is_fp32_alias (std::string value)
inline

True iff value names FP32 (FP32, FLOAT32, EVXX_FLOAT32).

Definition at line 128 of file FormatSpec.h.

128inline bool tensor_format_is_fp32_alias(std::string value) {
129 const std::string up = upper_copy_ascii(std::move(value));
130 return up == "FP32" || up == "FLOAT32" || up == "EVXX_FLOAT32";
131}

tensor_format_is_int16_alias()

bool simaai::neat::tensor_format_is_int16_alias (std::string value)
inline

True iff value names INT16 (INT16, EVXX_INT16).

Definition at line 140 of file FormatSpec.h.

140inline bool tensor_format_is_int16_alias(std::string value) {
141 const std::string up = upper_copy_ascii(std::move(value));
142 return up == "INT16" || up == "EVXX_INT16";
143}

tensor_format_is_int32_alias()

bool simaai::neat::tensor_format_is_int32_alias (std::string value)
inline

True iff value names INT32 (INT32, EVXX_INT32).

Definition at line 146 of file FormatSpec.h.

146inline bool tensor_format_is_int32_alias(std::string value) {
147 const std::string up = upper_copy_ascii(std::move(value));
148 return up == "INT32" || up == "EVXX_INT32";
149}

tensor_format_is_int8_alias()

bool simaai::neat::tensor_format_is_int8_alias (std::string value)
inline

True iff value names INT8 (INT8, EVXX_INT8).

Definition at line 134 of file FormatSpec.h.

134inline bool tensor_format_is_int8_alias(std::string value) {
135 const std::string up = upper_copy_ascii(std::move(value));
136 return up == "INT8" || up == "EVXX_INT8";
137}

tensor_to_pcm_audio()

PcmAudio simaai::neat::tensor_to_pcm_audio (const Tensor & tensor)

Definition at line 15 of file TensorAudio.h.

tensors_from_sample()

TensorList simaai::neat::tensors_from_sample (const Sample & sample, bool require_nonempty=true)

Extract all tensors from any sample shape (Tensor, TensorSet, Bundle); flattens recursively.

Definition at line 511 of file SessionOptions.h.

throw_if_bus_error()

void simaai::neat::throw_if_bus_error (GstElement * pipeline, BusMessageFn on_message, void * user_data, BusErrorFn on_error, void * error_user_data)

Drain the bus and throw a SessionError if any error message is found.

Drains exactly like drain_bus but additionally invokes on_error and raises a SessionError if any GST_MESSAGE_ERROR is observed.

Parameters
pipeline

Pipeline whose bus to drain.

on_message

Callback invoked for every message (may be null).

user_data

Opaque pointer forwarded to on_message.

on_error

Callback invoked once for the error line before throwing (may be null).

error_user_data

Opaque pointer forwarded to on_error.

Definition at line 69 of file GstBusWatch.h.

to_string()

const char * simaai::neat::to_string (ValidationSeverity s)
inline

Stable string label for a ValidationSeverity (for reports/logs).

Definition at line 36 of file ValidationReport.h.

36inline const char* to_string(ValidationSeverity s) {
37 switch (s) {
39 return "INFO";
41 return "WARNING";
43 return "ERROR";
44 }
45 return "UNKNOWN";
46}

upper_copy_ascii()

std::string simaai::neat::upper_copy_ascii (std::string value)
inline

ASCII upper-case copy of value (does not touch non-ASCII bytes).

Definition at line 115 of file FormatSpec.h.

115inline std::string upper_copy_ascii(std::string value) {
116 std::transform(value.begin(), value.end(), value.begin(),
117 [](unsigned char c) { return static_cast<char>(std::toupper(c)); });
118 return value;
119}

The documentation for this namespace was generated from the following files:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.