internal_symbol.h#
Defines
-
FORALL_BUILTIN_SYMBOLS(_)#
Defines the builtin interned symbols used by ONNX graph rewriting code.
The macro expands to both enum values and string-mapping switch cases in internal_symbol.cc, keeping the canonical symbol list in one place.
-
DEFINE_SYMBOL(s)#
-
namespace ONNX_LIGHT_NAMESPACE
-
Functions
-
static inline bool operator==(BuiltinSymbol lhs, Symbol rhs)#
-
static inline bool operator==(Symbol lhs, BuiltinSymbol rhs)#
-
struct Symbol#
- #include <internal_symbol.h>
Represents a lightweight interned symbol identifier.
Builtin symbols map to BuiltinSymbol values. Non-builtin symbols are added on demand by a process-wide string interning table.
Public Functions
-
Symbol() = default#
-
inline Symbol(BuiltinSymbol value)#
Creates a symbol from a builtin symbol value.
-
explicit Symbol(const std::string &s)#
Creates a symbol by interning the corresponding string value.
-
inline explicit Symbol(uint32_t value)#
Creates a symbol from a raw symbol identifier.
-
inline operator uint32_t() const#
Returns the symbol identifier as an integer.
-
const char *toString() const#
Returns the string representation of this symbol.
Private Members
-
uint32_t value = {0}#
-
Symbol() = default#
-
static inline bool operator==(BuiltinSymbol lhs, Symbol rhs)#
-
namespace std#
-
template<>
struct hash<ONNX_LIGHT_NAMESPACE::Symbol># Public Functions
-
inline std::size_t operator()(ONNX_LIGHT_NAMESPACE::Symbol s) const#
Hashes the numeric symbol identifier.
-
inline std::size_t operator()(ONNX_LIGHT_NAMESPACE::Symbol s) const#
-
template<>