HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Ort::Session Struct Reference

Wrapper around ::OrtSession. More...

#include <onnxruntime_cxx_api.h>

+ Inheritance diagram for Ort::Session:

Public Member Functions

 Session (std::nullptr_t)
 Create an empty Session object, must be assigned a valid one to be used. More...
 
 Session (const Env &env, const ORTCHAR_T *model_path, const SessionOptions &options)
 Wraps OrtApi::CreateSession. More...
 
 Session (const Env &env, const ORTCHAR_T *model_path, const SessionOptions &options, OrtPrepackedWeightsContainer *prepacked_weights_container)
 Wraps OrtApi::CreateSessionWithPrepackedWeightsContainer. More...
 
 Session (const Env &env, const void *model_data, size_t model_data_length, const SessionOptions &options)
 Wraps OrtApi::CreateSessionFromArray. More...
 
 Session (const Env &env, const void *model_data, size_t model_data_length, const SessionOptions &options, OrtPrepackedWeightsContainer *prepacked_weights_container)
 Wraps OrtApi::CreateSessionFromArrayWithPrepackedWeightsContainer. More...
 
ConstSession GetConst () const
 
UnownedSession GetUnowned () const
 
- Public Member Functions inherited from Ort::detail::SessionImpl< OrtSession >
std::vector< ValueRun (const RunOptions &run_options, const char *const *input_names, const Value *input_values, size_t input_count, const char *const *output_names, size_t output_count)
 Run the model returning results in an Ort allocated vector. More...
 
void Run (const RunOptions &run_options, const char *const *input_names, const Value *input_values, size_t input_count, const char *const *output_names, Value *output_values, size_t output_count)
 Run the model returning results in user provided outputs Same as Run(const RunOptions&, const char* const*, const Value*, size_t,const char* const*, size_t) More...
 
void Run (const RunOptions &run_options, const IoBinding &)
 Wraps OrtApi::RunWithBinding. More...
 
AllocatedStringPtr EndProfilingAllocated (OrtAllocator *allocator)
 End profiling and return a copy of the profiling file name. More...
 
- Public Member Functions inherited from Ort::detail::ConstSessionImpl< OrtSession >
size_t GetInputCount () const
 Returns the number of model inputs. More...
 
size_t GetOutputCount () const
 Returns the number of model outputs. More...
 
size_t GetOverridableInitializerCount () const
 Returns the number of inputs that have defaults that can be overridden. More...
 
AllocatedStringPtr GetInputNameAllocated (size_t index, OrtAllocator *allocator) const
 Returns a copy of input name at the specified index. More...
 
AllocatedStringPtr GetOutputNameAllocated (size_t index, OrtAllocator *allocator) const
 Returns a copy of output name at then specified index. More...
 
AllocatedStringPtr GetOverridableInitializerNameAllocated (size_t index, OrtAllocator *allocator) const
 Returns a copy of the overridable initializer name at then specified index. More...
 
uint64_t GetProfilingStartTimeNs () const
 Wraps OrtApi::SessionGetProfilingStartTimeNs. More...
 
ModelMetadata GetModelMetadata () const
 Wraps OrtApi::SessionGetModelMetadata. More...
 
TypeInfo GetInputTypeInfo (size_t index) const
 Wraps OrtApi::SessionGetInputTypeInfo. More...
 
TypeInfo GetOutputTypeInfo (size_t index) const
 Wraps OrtApi::SessionGetOutputTypeInfo. More...
 
TypeInfo GetOverridableInitializerTypeInfo (size_t index) const
 Wraps OrtApi::SessionGetOverridableInitializerTypeInfo. More...
 
- Public Member Functions inherited from Ort::detail::Base< OrtSession >
constexpr Base ()=default
 
constexpr Base (contained_type *p) noexcept
 
 Base (const Base &)=delete
 
 Base (Base &&v) noexcept
 
 ~Base ()
 
Baseoperator= (const Base &)=delete
 
Baseoperator= (Base &&v) noexcept
 
constexpr operator contained_type * () const noexcept
 
contained_typerelease ()
 Relinquishes ownership of the contained C object pointer The underlying object is not destroyed. More...
 

Additional Inherited Members

- Public Types inherited from Ort::detail::SessionImpl< OrtSession >
using B = ConstSessionImpl< OrtSession >
 
using B = Base< OrtSession >
 
- Public Types inherited from Ort::detail::ConstSessionImpl< OrtSession >
using B = Base< OrtSession >
 
- Public Types inherited from Ort::detail::Base< OrtSession >
using contained_type = OrtSession
 
- Protected Attributes inherited from Ort::detail::Base< OrtSession >
contained_typep_
 

Detailed Description

Wrapper around ::OrtSession.

Definition at line 782 of file onnxruntime_cxx_api.h.

Constructor & Destructor Documentation

Ort::Session::Session ( std::nullptr_t  )
inlineexplicit

Create an empty Session object, must be assigned a valid one to be used.

Definition at line 783 of file onnxruntime_cxx_api.h.

Ort::Session::Session ( const Env env,
const ORTCHAR_T model_path,
const SessionOptions options 
)
inline

Wraps OrtApi::CreateSession.

Definition at line 937 of file onnxruntime_cxx_inline.h.

Ort::Session::Session ( const Env env,
const ORTCHAR_T model_path,
const SessionOptions options,
OrtPrepackedWeightsContainer *  prepacked_weights_container 
)
inline

Wraps OrtApi::CreateSessionWithPrepackedWeightsContainer.

Definition at line 941 of file onnxruntime_cxx_inline.h.

Ort::Session::Session ( const Env env,
const void model_data,
size_t  model_data_length,
const SessionOptions options 
)
inline

Wraps OrtApi::CreateSessionFromArray.

Definition at line 946 of file onnxruntime_cxx_inline.h.

Ort::Session::Session ( const Env env,
const void model_data,
size_t  model_data_length,
const SessionOptions options,
OrtPrepackedWeightsContainer *  prepacked_weights_container 
)
inline

Wraps OrtApi::CreateSessionFromArrayWithPrepackedWeightsContainer.

Definition at line 950 of file onnxruntime_cxx_inline.h.

Member Function Documentation

ConstSession Ort::Session::GetConst ( ) const
inline

Definition at line 791 of file onnxruntime_cxx_api.h.

UnownedSession Ort::Session::GetUnowned ( ) const
inline

Definition at line 792 of file onnxruntime_cxx_api.h.


The documentation for this struct was generated from the following files: