getTensorShapeElementCount method
Pointer<OrtStatus>
getTensorShapeElementCount(
- Pointer<
OrtTensorTypeAndShapeInfo> info, - Pointer<
Size> out
Implementation
Pointer<OrtStatus> getTensorShapeElementCount(
Pointer<OrtTensorTypeAndShapeInfo> info,
Pointer<Size> out,
) {
final getTensorShapeElementCountFn =
GetTensorShapeElementCount.asFunction<
Pointer<OrtStatus> Function(
Pointer<OrtTensorTypeAndShapeInfo>,
Pointer<Size>,
)
>();
final status = getTensorShapeElementCountFn(info, out);
if (status.isError) {
final error =
'Get tensor shape element count failed. Code: ${getErrorCodeMessage(status)}\n'
'Message: ${consumeErrorMessage(status)}';
throw Exception(error);
}
return status;
}