Исходный код СУБД RuDB — свободной СУБД с открытым исходным кодом на базе PostgreSQL
rudb
3 days ago bd039d1e92813358c5c5a1e346b49074baf513f2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
 
#pragma once
 
#include "core/common/flatbuffers.h"
 
#include "core/graph/op_identifier.h"
 
#include "core/common/status.h"
#include "core/graph/graph.h"
#include "core/graph/onnx_protobuf.h"
 
namespace onnxruntime {
 
namespace fbs::utils {
 
#if !defined(ORT_MINIMAL_BUILD)
 
Status SaveOpIdentifierOrtFormat(flatbuffers::FlatBufferBuilder& builder,
                                 const onnxruntime::OpIdentifier& op_id,
                                 flatbuffers::Offset<flatbuffers::String>& fbs_op_id_str);
 
#endif  // !defined(ORT_MINIMAL_BUILD)
 
Status LoadOpIdentifierOrtFormat(const flatbuffers::String& fbs_op_id_str,
                                 onnxruntime::OpIdentifier& op_id);
 
}  // namespace fbs::utils
 
namespace utils {
 
inline onnxruntime::OpIdentifier MakeOpId(const Node& node) {
  return onnxruntime::OpIdentifier{node.Domain(), node.OpType(), node.SinceVersion()};
}
 
#if !defined(ORT_MINIMAL_BUILD)
 
inline onnxruntime::OpIdentifier MakeOpId(const ONNX_NAMESPACE::OpSchema& op_schema) {
  return onnxruntime::OpIdentifier{op_schema.domain(), op_schema.Name(), op_schema.SinceVersion()};
}
 
#endif  // !defined(ORT_MINIMAL_BUILD)
 
}  // namespace utils
 
}  // namespace onnxruntime