Skip to content

Commit

Permalink
Minor fix to satisfy c++14 (microsoft#6162)
Browse files Browse the repository at this point in the history
  • Loading branch information
pranavsharma authored Dec 17, 2020
1 parent 36c03b3 commit efa1b0d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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
}
}

0 comments on commit efa1b0d

Please sign in to comment.