From 44fc9206480b51907ef4d06c760d792c372c83c6 Mon Sep 17 00:00:00 2001 From: Kalle Raiskila Date: Sun, 19 May 2024 21:41:22 +0200 Subject: [PATCH] Add int32 to casts types. Related to issue #26 --- src/nodes/cast.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/nodes/cast.cc b/src/nodes/cast.cc index cdefd32..5bbeecc 100644 --- a/src/nodes/cast.cc +++ b/src/nodes/cast.cc @@ -25,11 +25,12 @@ void Cast::resolve(void) switch(to) { + case onnx::TensorProto_DataType_INT32: + output_type = "int32_t"; break; case onnx::TensorProto_DataType_FLOAT: - output_type = "float"; + output_type = "float"; break; case onnx::TensorProto_DataType_DOUBLE: - output_type = "double"; - break; + output_type = "double"; break; default: ERROR("Unimplemented casting to requested type"); }