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
onnx_runtime.h
Go to the documentation of this file.
1/*
2 * Copyright 2026 OpenUAS
3 * SPDX-License-Identifier: Apache-2.0
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18/** @file onnx_runtime.h
19 * @brief Process-wide runtime ownership shared by independent model sessions. */
20#ifndef SENSORAIA_ONNX_RUNTIME_H
21#define SENSORAIA_ONNX_RUNTIME_H
22
23#include <stdbool.h>
24#include <stddef.h>
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30struct OrtApi;
31struct OrtEnv;
32
33/**
34 * @brief Initialize one process-lifetime runtime/environment using explicit local search roots.
35 * @param library_directory Optional final search directory; NULL/empty omits it.
36 * @param error Writable diagnostic buffer, cleared on success.
37 * @param capacity Available bytes in error, including its terminator.
38 * @return True after initialization or when this process already owns a runtime.
39 * @details The first existing candidate must work; falling back would hide broken packages.
40 * The library and environment stay alive so sessions never retain unloaded API pointers.
41 * @note Concurrent initialization is serialized; later calls reuse the selected runtime.
42 */
43bool onnx_runtime_open(const char *library_directory, char *error, size_t capacity);
44/** @brief Borrow the initialized API, without transferring release ownership.
45 * @return Process-lifetime API, or NULL before successful open. */
46const struct OrtApi *onnx_runtime_api(void);
47/** @brief Borrow the environment retained until process exit.
48 * @return Shared environment, or NULL before successful open. */
49struct OrtEnv *onnx_runtime_environment(void);
50
51#ifdef __cplusplus
52}
53#endif
54#endif
static unsigned capacity[COVERAGE_CAMERAS]
struct jpeg_error_mgr error
Definition lwir_image.c:60
bool onnx_runtime_open(const char *library_directory, char *error, size_t capacity)
Initialize one process-lifetime runtime/environment using explicit local search roots.
const struct OrtApi * onnx_runtime_api(void)
Borrow the initialized API, without transferring release ownership.
struct OrtEnv * onnx_runtime_environment(void)
Borrow the environment retained until process exit.