AllocOnStream property

Pointer<NativeFunction<Pointer<Void> Function(Pointer<OrtAllocator> this_, Size size, Pointer<OrtSyncStream> stream)>> AllocOnStream
getter/setter pair

\brief Allocate using a stream.

If the allocator is stream aware this performs allocation using a stream.

Alloc will be used if this is nullptr.

\paramin this_ OrtAllocator instance \paramin size Size of the allocation in bytes. nullptr if size was 0 or allocation failed. \paramin stream The stream to allocate on.

\return pointer to an allocated block of size bytes

\note Implementation of this function is optional and AllocOnStream may be set to a nullptr. \since 1.23

Implementation

external ffi.Pointer<
  ffi.NativeFunction<
    ffi.Pointer<ffi.Void> Function(
      ffi.Pointer<OrtAllocator> this_,
      ffi.Size size,
      ffi.Pointer<OrtSyncStream> stream,
    )
  >
>
AllocOnStream;