Skip to content

Commit

Permalink
use size_t
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhenze Wang committed Aug 15, 2024
1 parent 646a44e commit c7f2227
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -569,10 +569,10 @@ struct ProviderHost {

virtual void RegisterSchema(const std::string& domain, const OrtCustomOp* op, int type) = 0;
virtual const ONNX_NAMESPACE::OpSchema* GetSchema(const std::string& name, const int maxInclusiveVersion, const std::string& domain) = 0;
virtual const std::string& OpSchema__inputs__GetName(const ONNX_NAMESPACE::OpSchema* p, const int i) = 0;
virtual const std::string& OpSchema__inputs__GetTypeStr(const ONNX_NAMESPACE::OpSchema* p, const int i) = 0;
virtual const std::string& OpSchema__outputs__GetName(const ONNX_NAMESPACE::OpSchema* p, const int i) = 0;
virtual const std::string& OpSchema__outputs__GetTypeStr(const ONNX_NAMESPACE::OpSchema* p, const int i) = 0;
virtual const std::string& OpSchema__inputs__GetName(const ONNX_NAMESPACE::OpSchema* p, const size_t i) = 0;
virtual const std::string& OpSchema__inputs__GetTypeStr(const ONNX_NAMESPACE::OpSchema* p, const size_t i) = 0;
virtual const std::string& OpSchema__outputs__GetName(const ONNX_NAMESPACE::OpSchema* p, const size_t i) = 0;
virtual const std::string& OpSchema__outputs__GetTypeStr(const ONNX_NAMESPACE::OpSchema* p, const size_t i) = 0;
virtual const ONNX_NAMESPACE::TypeConstraintMap& OpSchema__typeConstraintMap(const ONNX_NAMESPACE::OpSchema* p) const = 0;

// ConfigOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -454,10 +454,10 @@ struct FunctionProto final {

struct OpSchema final {
const TypeConstraintMap& typeConstraintMap() const { return g_host->OpSchema__typeConstraintMap(this); }
const std::string& inputs__GetName(const int i) const { return g_host->OpSchema__inputs__GetName(this, i); };
const std::string& inputs__GetTypeStr(const int i) const { return g_host->OpSchema__inputs__GetTypeStr(this, i); };
const std::string& outputs__GetName(const int i) const { return g_host->OpSchema__outputs__GetName(this, i); };
const std::string& outputs__GetTypeStr(const int i) const { return g_host->OpSchema__outputs__GetTypeStr(this, i); };
const std::string& inputs__GetName(const size_t i) const { return g_host->OpSchema__inputs__GetName(this, i); };
const std::string& inputs__GetTypeStr(const size_t i) const { return g_host->OpSchema__inputs__GetTypeStr(this, i); };
const std::string& outputs__GetName(const size_t i) const { return g_host->OpSchema__outputs__GetName(this, i); };
const std::string& outputs__GetTypeStr(const size_t i) const { return g_host->OpSchema__outputs__GetTypeStr(this, i); };
PROVIDER_DISALLOW_ALL(OpSchema)
};
} // namespace ONNX_NAMESPACE
Expand Down
8 changes: 4 additions & 4 deletions onnxruntime/core/session/provider_bridge_ort.cc
Original file line number Diff line number Diff line change
Expand Up @@ -816,10 +816,10 @@ struct ProviderHostImpl : ProviderHost {
const ONNX_NAMESPACE::OpSchema* GetSchema(const std::string& name, const int maxInclusiveVersion, const std::string& domain) override {
return ONNX_NAMESPACE::OpSchemaRegistry::Instance()->GetSchema(name, maxInclusiveVersion, domain);
}
const std::string& OpSchema__inputs__GetName(const ONNX_NAMESPACE::OpSchema* p, const int i) override { return p->inputs()[i].GetName(); }
const std::string& OpSchema__inputs__GetTypeStr(const ONNX_NAMESPACE::OpSchema* p, const int i) override { return p->inputs()[i].GetTypeStr(); }
const std::string& OpSchema__outputs__GetName(const ONNX_NAMESPACE::OpSchema* p, const int i) override { return p->outputs()[i].GetName(); }
const std::string& OpSchema__outputs__GetTypeStr(const ONNX_NAMESPACE::OpSchema* p, const int i) override { return p->outputs()[i].GetTypeStr(); }
const std::string& OpSchema__inputs__GetName(const ONNX_NAMESPACE::OpSchema* p, const size_t i) override { return p->inputs()[i].GetName(); }
const std::string& OpSchema__inputs__GetTypeStr(const ONNX_NAMESPACE::OpSchema* p, const size_t i) override { return p->inputs()[i].GetTypeStr(); }
const std::string& OpSchema__outputs__GetName(const ONNX_NAMESPACE::OpSchema* p, const size_t i) override { return p->outputs()[i].GetName(); }
const std::string& OpSchema__outputs__GetTypeStr(const ONNX_NAMESPACE::OpSchema* p, const size_t i) override { return p->outputs()[i].GetTypeStr(); }
const ONNX_NAMESPACE::TypeConstraintMap& OpSchema__typeConstraintMap(const ONNX_NAMESPACE::OpSchema* p) const override { return p->typeConstraintMap(); }

// ConfigOptions (wrapped)
Expand Down

0 comments on commit c7f2227

Please sign in to comment.