ONNX Runtime
Loading...
Searching...
No Matches
Ort::ArenaCfg Struct Reference

it is a structure that represents the configuration of an arena based allocator More...

#include <onnxruntime_cxx_api.h>

Inheritance diagram for Ort::ArenaCfg:
Ort::detail::Base< OrtArenaCfg >

Public Member Functions

 ArenaCfg (std::nullptr_t)
 Create an empty ArenaCfg object, must be assigned a valid one to be used.
 
 ArenaCfg (size_t max_mem, int arena_extend_strategy, int initial_chunk_size_bytes, int max_dead_bytes_per_chunk)
 
- Public Member Functions inherited from Ort::detail::Base< OrtArenaCfg >
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.
 

Additional Inherited Members

- Public Types inherited from Ort::detail::Base< OrtArenaCfg >
using contained_type = OrtArenaCfg
 
- Protected Attributes inherited from Ort::detail::Base< OrtArenaCfg >
contained_typep_
 

Detailed Description

it is a structure that represents the configuration of an arena based allocator

Please see docs/C_API.md for details

Constructor & Destructor Documentation

◆ ArenaCfg() [1/2]

Ort::ArenaCfg::ArenaCfg ( std::nullptr_t  )
inlineexplicit

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

◆ ArenaCfg() [2/2]

Ort::ArenaCfg::ArenaCfg ( size_t  max_mem,
int  arena_extend_strategy,
int  initial_chunk_size_bytes,
int  max_dead_bytes_per_chunk 
)

Wraps OrtApi::CreateArenaCfg

Parameters
max_mem- use 0 to allow ORT to choose the default
arena_extend_strategy- use -1 to allow ORT to choose the default, 0 = kNextPowerOfTwo, 1 = kSameAsRequested
initial_chunk_size_bytes- use -1 to allow ORT to choose the default
max_dead_bytes_per_chunk- use -1 to allow ORT to choose the default See docs/C_API.md for details on what the following parameters mean and how to choose these values