KernelContext_GetScratchBuffer property

Pointer<NativeFunction<OrtStatusPtr Function(Pointer<OrtKernelContext> context, Pointer<OrtMemoryInfo> mem_info, Size count_or_bytes, Pointer<Pointer<Void>> out)>> KernelContext_GetScratchBuffer
getter/setter pair

\brief Get scratch buffer from the corresponding allocator under the specific OrtMemoryInfo object. NOTE: callers are responsible to release this scratch buffer from the corresponding allocator \paramin context OrtKernelContext instance \paramin mem_info OrtMemoryInfo instance \paramin count_or_bytes How many bytes is this scratch buffer \paramout out A pointer to the scratch buffer

\snippet{doc} snippets.dox OrtStatus Return Value

\since Version 1.18.

Implementation

external ffi.Pointer<
  ffi.NativeFunction<
    OrtStatusPtr Function(
      ffi.Pointer<OrtKernelContext> context,
      ffi.Pointer<OrtMemoryInfo> mem_info,
      ffi.Size count_or_bytes,
      ffi.Pointer<ffi.Pointer<ffi.Void>> out,
    )
  >
>
KernelContext_GetScratchBuffer;