1 | #include "caffe2/utils/proto_wrap.h" |
2 | |
3 | #include <google/protobuf/stubs/common.h> |
4 | #include <google/protobuf/generated_message_util.h> |
5 | |
6 | namespace ONNX_NAMESPACE { |
7 | |
8 | // ONNX wrapper functions for protobuf's GetEmptyStringAlreadyInited() function |
9 | // used to avoid duplicated global variable in the case when protobuf |
10 | // is built with hidden visibility. |
11 | TORCH_API const ::std::string& GetEmptyStringAlreadyInited() { |
12 | return ::google::protobuf::internal::GetEmptyStringAlreadyInited(); |
13 | } |
14 | |
15 | } // namespace ONNX_NAMESPACE |
16 | |
17 | namespace caffe2 { |
18 | |
19 | // Caffe2 wrapper functions for protobuf's GetEmptyStringAlreadyInited() function |
20 | // used to avoid duplicated global variable in the case when protobuf |
21 | // is built with hidden visibility. |
22 | TORCH_API const ::std::string& GetEmptyStringAlreadyInited() { |
23 | return ::google::protobuf::internal::GetEmptyStringAlreadyInited(); |
24 | } |
25 | |
26 | void ShutdownProtobufLibrary() { |
27 | ::google::protobuf::ShutdownProtobufLibrary(); |
28 | } |
29 | |
30 | } // namespace caffe2 |
31 | |
32 | namespace torch { |
33 | |
34 | // Caffe2 wrapper functions for protobuf's GetEmptyStringAlreadyInited() function |
35 | // used to avoid duplicated global variable in the case when protobuf |
36 | // is built with hidden visibility. |
37 | TORCH_API const ::std::string& GetEmptyStringAlreadyInited() { |
38 | return ::google::protobuf::internal::GetEmptyStringAlreadyInited(); |
39 | } |
40 | |
41 | void ShutdownProtobufLibrary() { |
42 | ::google::protobuf::ShutdownProtobufLibrary(); |
43 | } |
44 | |
45 | } // namespace torch |
46 | |