parallel_region_collector.h#
-
namespace onnx_light
Alias that makes onnx-light headers compatible with code that references
ONNX_LIGHT_NAMESPACE(the macro used in the standard onnx package).Set to
ONNX_LIGHT_NAMESPACEso both names resolve to the same namespace.Symbol-visibility attribute for the public onnx-light C++ API.
Maps the upstream compatibility macro to onnx-light’s explicit proto ABI annotation. This keeps declarations from vendored ONNX headers visible when
lib_onnx_protouses hidden visibility by default.Namespace alias so that ONNX C++ code (and consumers such as onnxruntime) that refers to the literal
onnxnamespace — rather than theONNX_NAMESPACEmacro — resolves to the onnx-light namespace. The standard onnx package lives innamespace onnx; onnx-light usesonnx_light(via ONNX_LIGHT_NAMESPACE), so this alias keeps onnx-light a true drop-in. It is only introduced when the onnx-light namespace differs fromonnx.-
namespace core
-
namespace runtime
Functions
-
ParallelRegionCollector *CurrentParallelRegionCollector() noexcept#
Returns the non-owning collector installed on the calling thread.
-
class ParallelRegionCollector#
- #include <parallel_region_collector.h>
Collects parallel-region events in fixed storage without locking inference.
Storage is allocated once by the constructor. Concurrent writers reserve distinct slots atomically; events beyond
capacityincrement the dropped count. Readers must inspect events only when no inference is writing.Public Functions
-
explicit ParallelRegionCollector(size_t capacity)#
Allocates storage for exactly
capacityevents.
-
ParallelRegionCollector(const ParallelRegionCollector&) = delete#
-
ParallelRegionCollector &operator=(const ParallelRegionCollector&) = delete#
-
void Record(ParallelRegionEvent event) noexcept#
Records an event or increments the dropped count when storage is full.
-
inline size_t capacity() const noexcept#
Returns the configured event capacity.
-
std::span<const ParallelRegionEvent> events() const noexcept#
Returns the completed event slots. No inference may be writing concurrently.
-
inline uint64_t dropped_events() const noexcept#
Returns the number of events rejected after capacity was exhausted.
-
explicit ParallelRegionCollector(size_t capacity)#
-
class ParallelRegionCollectorScope#
- #include <parallel_region_collector.h>
Installs a non-owning collector view for the lifetime of this scope.
Public Functions
-
explicit ParallelRegionCollectorScope(ParallelRegionCollector *collector) noexcept#
-
ParallelRegionCollectorScope(const ParallelRegionCollectorScope&) = delete#
-
ParallelRegionCollectorScope &operator=(const ParallelRegionCollectorScope&) = delete#
-
~ParallelRegionCollectorScope()#
Private Members
-
ParallelRegionCollector *previous_#
-
explicit ParallelRegionCollectorScope(ParallelRegionCollector *collector) noexcept#
-
struct ParallelRegionEvent#
- #include <parallel_region_collector.h>
Describes one portable ParallelFor execution.
-
ParallelRegionCollector *CurrentParallelRegionCollector() noexcept#
-
namespace runtime
-
namespace core