ONE - On-device Neural Engine
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
onert::ir::ModelEdgeHash Struct Reference

#include <NNPkg.h>

Public Member Functions

size_t operator() (const ::onert::ir::ModelEdge &edge) const noexcept
 

Detailed Description

Definition at line 46 of file NNPkg.h.

Member Function Documentation

◆ operator()()

size_t onert::ir::ModelEdgeHash::operator() ( const ::onert::ir::ModelEdge edge) const
inlinenoexcept

Definition at line 48 of file NNPkg.h.

49 {
50 const auto &[from_model_index, from_sug_index, from_io_index] = edge.from;
51 unsigned long long h1 =
52 (from_model_index.value() << 24) | (from_sug_index.value() << 16) | from_io_index.value();
53
54 const auto &[to_model_index, to_sug_index, to_io_index] = edge.to;
55 unsigned long long h2 =
56 (to_model_index.value() << 24) | (to_sug_index.value() << 16) | to_io_index.value();
57 return h1 + h2;
58 }

The documentation for this struct was generated from the following file: