simple_map.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.
Defined as empty because onnx-light does not require explicit
__declspec(dllexport)or__attribute__((visibility("default")))annotations — visibility is controlled at the shared-library level. The macro is provided so that vendored ONNX headers that decorate their declarations withONNX_APIcompile without modification.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 onnx_kernels
-
struct Map#
- #include <simple_map.h>
Map — minimal runtime map used by backend test cases and reference kernel implementations for operators that consume or produce
map(K, V)typed graph edges (e.g.CastMap,DictVectorizer,ZipMap).Companion to :cpp:struct:
Sequence: whereSequencecarries an ordered list of tensors sharing a common element type,Mapcarries a key-value mapping represented as two parallel 1-D tensors (one for keys, one for values). This matches the ONNXMapProtosemantics (a list of key/value pairs) but uses the lightweightTensorrepresentation already used by the runtime.The struct owns its underlying
Tensormembers: copying or destroying theMapcopies or destroys them too.Public Functions
-
Map() = default#
-
inline int64_t size() const noexcept#
Number of entries in the map.
-
inline bool empty() const noexcept#
truewhen the map contains no entries.
-
Map() = default#
-
struct Map#
-
namespace onnx_kernels