GetTensorShapeElementCount property

Pointer<NativeFunction<OrtStatusPtr Function(Pointer<OrtTensorTypeAndShapeInfo> info, Pointer<Size> out)>> GetTensorShapeElementCount
getter/setter pair

\brief Get total number of elements in a tensor shape from an ::OrtTensorTypeAndShapeInfo

Return the number of elements specified by the tensor shape (all dimensions multiplied by each other). For 0 dimensions, 1 is returned. If any dimension is less than 0, the result is always -1.

Examples:
[] = 1
1,3,4 = 12
2,0,4 = 0
-1,3,4 = -1

\paramin info \paramout out Number of elements

\snippet{doc} snippets.dox OrtStatus Return Value

Implementation

external ffi.Pointer<
  ffi.NativeFunction<
    OrtStatusPtr Function(
      ffi.Pointer<OrtTensorTypeAndShapeInfo> info,
      ffi.Pointer<ffi.Size> out,
    )
  >
>
GetTensorShapeElementCount;