CreateAllocator property
Pointer<NativeFunction<OrtStatusPtr Function(Pointer<OrtEpFactory> this_ptr, Pointer<OrtMemoryInfo> memory_info, Pointer<OrtKeyValuePairs> allocator_options, Pointer<Pointer<OrtAllocator> > allocator)> >
CreateAllocator
getter/setter pair
\brief Create an OrtAllocator that can be shared across sessions for the given OrtMemoryInfo.
The factory that creates the EP is responsible for providing the allocators required by the EP. The OrtMemoryInfo instance will match one of the values set in the OrtEpDevice using EpDevice_AddAllocatorInfo.
\paramin this_ptr The OrtEpFactory instance.
\paramin memory_info The OrtMemoryInfo to create the allocator for. May be nullptr.
\paramin allocator_options Optional key-value pairs for allocator options, can be nullptr.
\paramout allocator The created OrtAllocator instance. Set to nullptr if the default CPU allocator is used.
\snippet{doc} snippets.dox OrtStatus Return Value
\since Version 1.23.
Implementation
external ffi.Pointer<
ffi.NativeFunction<
OrtStatusPtr Function(
ffi.Pointer<OrtEpFactory> this_ptr,
ffi.Pointer<OrtMemoryInfo> memory_info,
ffi.Pointer<OrtKeyValuePairs> allocator_options,
ffi.Pointer<ffi.Pointer<OrtAllocator>> allocator,
)
>
>
CreateAllocator;