HasValue property

Pointer<NativeFunction<OrtStatusPtr Function(Pointer<OrtValue> value, Pointer<Int> out)>> HasValue
getter/setter pair

\brief Sets out to 1 iff an optional type OrtValue has an element, 0 otherwise (OrtValue is None) Use this API to find if the optional type OrtValue is None or not. If the optional type OrtValue is not None, use the OrtValue just like any other OrtValue. For example, if you get an OrtValue that corresponds to Optional(tensor) and if HasValue() returns true, use it as tensor and so on.

\paramin value Input OrtValue. \paramout out indicating if the input OrtValue contains data (1) or if it is a None (0)

\snippet{doc} snippets.dox OrtStatus Return Value

Implementation

external ffi.Pointer<
  ffi.NativeFunction<
    OrtStatusPtr Function(
      ffi.Pointer<OrtValue> value,
      ffi.Pointer<ffi.Int> out,
    )
  >
>
HasValue;