|
@ -650,6 +650,9 @@ using AllocatedStringPtr = std::unique_ptr<char, detail::AllocatedFree>; |
|
|
* constructors to construct an instance of a Status object from exceptions. |
|
|
* constructors to construct an instance of a Status object from exceptions. |
|
|
*/ |
|
|
*/ |
|
|
struct Status : detail::Base<OrtStatus> { |
|
|
struct Status : detail::Base<OrtStatus> { |
|
|
|
|
|
using Base = detail::Base<OrtStatus>; |
|
|
|
|
|
using Base::Base; |
|
|
|
|
|
|
|
|
explicit Status(std::nullptr_t) noexcept {} ///< Create an empty object, must be assigned a valid one to be used
|
|
|
explicit Status(std::nullptr_t) noexcept {} ///< Create an empty object, must be assigned a valid one to be used
|
|
|
explicit Status(OrtStatus* status) noexcept; ///< Takes ownership of OrtStatus instance returned from the C API.
|
|
|
explicit Status(OrtStatus* status) noexcept; ///< Takes ownership of OrtStatus instance returned from the C API.
|
|
|
explicit Status(const Exception&) noexcept; ///< Creates status instance out of exception
|
|
|
explicit Status(const Exception&) noexcept; ///< Creates status instance out of exception
|
|
@ -728,6 +731,9 @@ struct Env : detail::Base<OrtEnv> { |
|
|
* |
|
|
* |
|
|
*/ |
|
|
*/ |
|
|
struct CustomOpDomain : detail::Base<OrtCustomOpDomain> { |
|
|
struct CustomOpDomain : detail::Base<OrtCustomOpDomain> { |
|
|
|
|
|
using Base = detail::Base<OrtCustomOpDomain>; |
|
|
|
|
|
using Base::Base; |
|
|
|
|
|
|
|
|
explicit CustomOpDomain(std::nullptr_t) {} ///< Create an empty CustomOpDomain object, must be assigned a valid one to be used
|
|
|
explicit CustomOpDomain(std::nullptr_t) {} ///< Create an empty CustomOpDomain object, must be assigned a valid one to be used
|
|
|
|
|
|
|
|
|
/// \brief Wraps OrtApi::CreateCustomOpDomain
|
|
|
/// \brief Wraps OrtApi::CreateCustomOpDomain
|
|
@ -963,8 +969,10 @@ struct SessionOptions : detail::SessionOptionsImpl<OrtSessionOptions> { |
|
|
* |
|
|
* |
|
|
*/ |
|
|
*/ |
|
|
struct ModelMetadata : detail::Base<OrtModelMetadata> { |
|
|
struct ModelMetadata : detail::Base<OrtModelMetadata> { |
|
|
explicit ModelMetadata(std::nullptr_t) {} ///< Create an empty ModelMetadata object, must be assigned a valid one to be used
|
|
|
using Base = detail::Base<OrtModelMetadata>; |
|
|
explicit ModelMetadata(OrtModelMetadata* p) : Base<OrtModelMetadata>{p} {} ///< Used for interop with the C API
|
|
|
using Base::Base; |
|
|
|
|
|
|
|
|
|
|
|
explicit ModelMetadata(std::nullptr_t) {} ///< Create an empty ModelMetadata object, must be assigned a valid one to be used
|
|
|
|
|
|
|
|
|
/** \brief Returns a copy of the producer name.
|
|
|
/** \brief Returns a copy of the producer name.
|
|
|
* |
|
|
* |
|
@ -1237,6 +1245,9 @@ using ConstTensorTypeAndShapeInfo = detail::TensorTypeAndShapeInfoImpl<detail::U |
|
|
* |
|
|
* |
|
|
*/ |
|
|
*/ |
|
|
struct TensorTypeAndShapeInfo : detail::TensorTypeAndShapeInfoImpl<OrtTensorTypeAndShapeInfo> { |
|
|
struct TensorTypeAndShapeInfo : detail::TensorTypeAndShapeInfoImpl<OrtTensorTypeAndShapeInfo> { |
|
|
|
|
|
using Base = detail::TensorTypeAndShapeInfoImpl<OrtTensorTypeAndShapeInfo>; |
|
|
|
|
|
using Base::Base; |
|
|
|
|
|
|
|
|
explicit TensorTypeAndShapeInfo(std::nullptr_t) {} ///< Create an empty TensorTypeAndShapeInfo object, must be assigned a valid one to be used
|
|
|
explicit TensorTypeAndShapeInfo(std::nullptr_t) {} ///< Create an empty TensorTypeAndShapeInfo object, must be assigned a valid one to be used
|
|
|
explicit TensorTypeAndShapeInfo(OrtTensorTypeAndShapeInfo* p) : TensorTypeAndShapeInfoImpl{p} {} ///< Used for interop with the C API
|
|
|
explicit TensorTypeAndShapeInfo(OrtTensorTypeAndShapeInfo* p) : TensorTypeAndShapeInfoImpl{p} {} ///< Used for interop with the C API
|
|
|
ConstTensorTypeAndShapeInfo GetConst() const { return ConstTensorTypeAndShapeInfo{this->p_}; } |
|
|
ConstTensorTypeAndShapeInfo GetConst() const { return ConstTensorTypeAndShapeInfo{this->p_}; } |
|
@ -1258,6 +1269,9 @@ using ConstSequenceTypeInfo = detail::SequenceTypeInfoImpl<detail::Unowned<const |
|
|
* |
|
|
* |
|
|
*/ |
|
|
*/ |
|
|
struct SequenceTypeInfo : detail::SequenceTypeInfoImpl<OrtSequenceTypeInfo> { |
|
|
struct SequenceTypeInfo : detail::SequenceTypeInfoImpl<OrtSequenceTypeInfo> { |
|
|
|
|
|
using Base = detail::SequenceTypeInfoImpl<OrtSequenceTypeInfo>; |
|
|
|
|
|
using Base::Base; |
|
|
|
|
|
|
|
|
explicit SequenceTypeInfo(std::nullptr_t) {} ///< Create an empty SequenceTypeInfo object, must be assigned a valid one to be used
|
|
|
explicit SequenceTypeInfo(std::nullptr_t) {} ///< Create an empty SequenceTypeInfo object, must be assigned a valid one to be used
|
|
|
explicit SequenceTypeInfo(OrtSequenceTypeInfo* p) : SequenceTypeInfoImpl<OrtSequenceTypeInfo>{p} {} ///< Used for interop with the C API
|
|
|
explicit SequenceTypeInfo(OrtSequenceTypeInfo* p) : SequenceTypeInfoImpl<OrtSequenceTypeInfo>{p} {} ///< Used for interop with the C API
|
|
|
ConstSequenceTypeInfo GetConst() const { return ConstSequenceTypeInfo{this->p_}; } |
|
|
ConstSequenceTypeInfo GetConst() const { return ConstSequenceTypeInfo{this->p_}; } |
|
@ -1293,6 +1307,9 @@ using ConstMapTypeInfo = detail::MapTypeInfoImpl<detail::Unowned<const OrtMapTyp |
|
|
* |
|
|
* |
|
|
*/ |
|
|
*/ |
|
|
struct MapTypeInfo : detail::MapTypeInfoImpl<OrtMapTypeInfo> { |
|
|
struct MapTypeInfo : detail::MapTypeInfoImpl<OrtMapTypeInfo> { |
|
|
|
|
|
using Base = detail::MapTypeInfoImpl<OrtMapTypeInfo>; |
|
|
|
|
|
using Base::Base; |
|
|
|
|
|
|
|
|
explicit MapTypeInfo(std::nullptr_t) {} ///< Create an empty MapTypeInfo object, must be assigned a valid one to be used
|
|
|
explicit MapTypeInfo(std::nullptr_t) {} ///< Create an empty MapTypeInfo object, must be assigned a valid one to be used
|
|
|
explicit MapTypeInfo(OrtMapTypeInfo* p) : MapTypeInfoImpl<OrtMapTypeInfo>{p} {} ///< Used for interop with the C API
|
|
|
explicit MapTypeInfo(OrtMapTypeInfo* p) : MapTypeInfoImpl<OrtMapTypeInfo>{p} {} ///< Used for interop with the C API
|
|
|
ConstMapTypeInfo GetConst() const { return ConstMapTypeInfo{this->p_}; } |
|
|
ConstMapTypeInfo GetConst() const { return ConstMapTypeInfo{this->p_}; } |
|
@ -1324,6 +1341,9 @@ using ConstTypeInfo = detail::TypeInfoImpl<detail::Unowned<const OrtTypeInfo>>; |
|
|
/// the information about contained sequence or map depending on the ONNXType.
|
|
|
/// the information about contained sequence or map depending on the ONNXType.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
struct TypeInfo : detail::TypeInfoImpl<OrtTypeInfo> { |
|
|
struct TypeInfo : detail::TypeInfoImpl<OrtTypeInfo> { |
|
|
|
|
|
using Base = detail::TypeInfoImpl<OrtTypeInfo>; |
|
|
|
|
|
using Base::Base; |
|
|
|
|
|
|
|
|
explicit TypeInfo(std::nullptr_t) {} ///< Create an empty TypeInfo object, must be assigned a valid one to be used
|
|
|
explicit TypeInfo(std::nullptr_t) {} ///< Create an empty TypeInfo object, must be assigned a valid one to be used
|
|
|
explicit TypeInfo(OrtTypeInfo* p) : TypeInfoImpl<OrtTypeInfo>{p} {} ///< C API Interop
|
|
|
explicit TypeInfo(OrtTypeInfo* p) : TypeInfoImpl<OrtTypeInfo>{p} {} ///< C API Interop
|
|
|
|
|
|
|
|
@ -1661,11 +1681,11 @@ using UnownedValue = detail::ValueImpl<detail::Unowned<OrtValue>>; |
|
|
*/ |
|
|
*/ |
|
|
struct Value : detail::ValueImpl<OrtValue> { |
|
|
struct Value : detail::ValueImpl<OrtValue> { |
|
|
using Base = detail::ValueImpl<OrtValue>; |
|
|
using Base = detail::ValueImpl<OrtValue>; |
|
|
|
|
|
using Base::Base; |
|
|
using OrtSparseValuesParam = detail::OrtSparseValuesParam; |
|
|
using OrtSparseValuesParam = detail::OrtSparseValuesParam; |
|
|
using Shape = detail::Shape; |
|
|
using Shape = detail::Shape; |
|
|
|
|
|
|
|
|
explicit Value(std::nullptr_t) {} ///< Create an empty Value object, must be assigned a valid one to be used
|
|
|
explicit Value(std::nullptr_t) {} ///< Create an empty Value object, must be assigned a valid one to be used
|
|
|
explicit Value(OrtValue* p) : Base{p} {} ///< Used for interop with the C API
|
|
|
|
|
|
Value(Value&&) = default; |
|
|
Value(Value&&) = default; |
|
|
Value& operator=(Value&&) = default; |
|
|
Value& operator=(Value&&) = default; |
|
|
|
|
|
|
|
@ -1941,6 +1961,10 @@ struct ArenaCfg : detail::Base<OrtArenaCfg> { |
|
|
/// This struct provides life time management for custom op attribute
|
|
|
/// This struct provides life time management for custom op attribute
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
struct OpAttr : detail::Base<OrtOpAttr> { |
|
|
struct OpAttr : detail::Base<OrtOpAttr> { |
|
|
|
|
|
using Base = detail::Base<OrtOpAttr>; |
|
|
|
|
|
using Base::Base; |
|
|
|
|
|
|
|
|
|
|
|
explicit OpAttr(std::nullptr_t) {} |
|
|
OpAttr(const char* name, const void* data, int len, OrtOpAttrType type); |
|
|
OpAttr(const char* name, const void* data, int len, OrtOpAttrType type); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
@ -2106,10 +2130,10 @@ struct KernelContext { |
|
|
explicit KernelContext(OrtKernelContext* context); |
|
|
explicit KernelContext(OrtKernelContext* context); |
|
|
size_t GetInputCount() const; |
|
|
size_t GetInputCount() const; |
|
|
size_t GetOutputCount() const; |
|
|
size_t GetOutputCount() const; |
|
|
// If input is optional and is not present, the method returns en empty ConstValue
|
|
|
// If input is optional and is not present, the method returns an empty ConstValue
|
|
|
// which can be compared to nullptr.
|
|
|
// which can be compared to nullptr.
|
|
|
ConstValue GetInput(size_t index) const; |
|
|
ConstValue GetInput(size_t index) const; |
|
|
// If outout is optional and is not present, the method returns en empty UnownedValue
|
|
|
// If output is optional and is not present, the method returns an empty UnownedValue
|
|
|
// which can be compared to nullptr.
|
|
|
// which can be compared to nullptr.
|
|
|
UnownedValue GetOutput(size_t index, const int64_t* dim_values, size_t dim_count) const; |
|
|
UnownedValue GetOutput(size_t index, const int64_t* dim_values, size_t dim_count) const; |
|
|
UnownedValue GetOutput(size_t index, const std::vector<int64_t>& dims) const; |
|
|
UnownedValue GetOutput(size_t index, const std::vector<int64_t>& dims) const; |
|
@ -2183,6 +2207,8 @@ using ConstKernelInfo = detail::KernelInfoImpl<detail::Unowned<const OrtKernelIn |
|
|
/// so it does not destroy the pointer the kernel does not own.
|
|
|
/// so it does not destroy the pointer the kernel does not own.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
struct KernelInfo : detail::KernelInfoImpl<OrtKernelInfo> { |
|
|
struct KernelInfo : detail::KernelInfoImpl<OrtKernelInfo> { |
|
|
|
|
|
using Base = detail::KernelInfoImpl<OrtKernelInfo>; |
|
|
|
|
|
using Base::Base; |
|
|
explicit KernelInfo(std::nullptr_t) {} ///< Create an empty instance to initialize later
|
|
|
explicit KernelInfo(std::nullptr_t) {} ///< Create an empty instance to initialize later
|
|
|
explicit KernelInfo(OrtKernelInfo* info); ///< Take ownership of the instance
|
|
|
explicit KernelInfo(OrtKernelInfo* info); ///< Take ownership of the instance
|
|
|
ConstKernelInfo GetConst() const { return ConstKernelInfo{this->p_}; } |
|
|
ConstKernelInfo GetConst() const { return ConstKernelInfo{this->p_}; } |
|
@ -2192,6 +2218,9 @@ struct KernelInfo : detail::KernelInfoImpl<OrtKernelInfo> { |
|
|
/// Create and own custom defined operation.
|
|
|
/// Create and own custom defined operation.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
struct Op : detail::Base<OrtOp> { |
|
|
struct Op : detail::Base<OrtOp> { |
|
|
|
|
|
using Base = detail::Base<OrtOp>; |
|
|
|
|
|
using Base::Base; |
|
|
|
|
|
|
|
|
explicit Op(std::nullptr_t) {} ///< Create an empty Operator object, must be assigned a valid one to be used
|
|
|
explicit Op(std::nullptr_t) {} ///< Create an empty Operator object, must be assigned a valid one to be used
|
|
|
|
|
|
|
|
|
explicit Op(OrtOp*); ///< Take ownership of the OrtOp
|
|
|
explicit Op(OrtOp*); ///< Take ownership of the OrtOp
|
|
|