Minor fix to satisfy c++14 (#6162)

This commit is contained in:
Pranav Sharma 2020-12-17 13:53:24 -08:00 committed by GitHub
parent 36c03b32e9
commit efa1b0d864
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View file

@ -19,7 +19,8 @@
#pragma once
#include "onnxruntime_cxx_api.h"
namespace Ort::Experimental {
namespace Ort {
namespace Experimental {
struct Session : Ort::Session {
Session(Env& env, std::basic_string<ORTCHAR_T>& model_path, SessionOptions& options)
@ -62,6 +63,7 @@ struct Value : Ort::Value {
static Ort::Value CreateTensor(const std::vector<int64_t>& shape, ONNXTensorElementDataType type);
};
} // namespace Ort::Experimental
}
}
#include "experimental_onnxruntime_cxx_inline.h"

View file

@ -5,7 +5,8 @@
//
// These are the inline implementations of the C++ header APIs. They are in this separate file as to not clutter
// the main C++ file with implementation details.
namespace Ort::Experimental {
namespace Ort {
namespace Experimental {
inline std::vector<Ort::Value> Session::Run(const std::vector<std::string>& input_names, const std::vector<Ort::Value>& input_values,
const std::vector<std::string>& output_names, const RunOptions& run_options) {
@ -106,4 +107,5 @@ inline Ort::Value Value::CreateTensor(const std::vector<int64_t>& shape, ONNXTen
return Ort::Value::CreateTensor(allocator, shape.data(), shape.size(), type);
}
} // namespace Ort::Experimental
}
}