aboutsummaryrefslogtreecommitdiff
path: root/chapters/type_conversion.adoc
diff options
context:
space:
mode:
authorEric Kunze <eric.kunze@arm.com>2021-06-17 18:01:09 -0700
committerEric Kunze <eric.kunze@arm.com>2021-06-24 12:18:14 -0700
commita9101530d8ea7a3cb470b722bc6cf8745ab283ac (patch)
tree2918f0c0e16515295ef6d112c279902fdddd44fb /chapters/type_conversion.adoc
parentf19e594f71e04c72ecf937419333b57dc7dcb873 (diff)
downloadspecification-a9101530d8ea7a3cb470b722bc6cf8745ab283ac.tar.gz
Replace assert with REQUIRE()
REQUIRE is a direct replacement for the asserts, and uses the unpredictable() function in pseudocode to describe the required conditions for operators Change-Id: I35dc81e083d8e41f16728d992bdb8b06b0271226 Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Diffstat (limited to 'chapters/type_conversion.adoc')
-rw-r--r--chapters/type_conversion.adoc6
1 files changed, 3 insertions, 3 deletions
diff --git a/chapters/type_conversion.adoc b/chapters/type_conversion.adoc
index 2ca505e..35cebe7 100644
--- a/chapters/type_conversion.adoc
+++ b/chapters/type_conversion.adoc
@@ -103,9 +103,9 @@ Rescale quantized values into a new domain. This function scales by factor: mult
[source,c++]
----
for_each(index in shape) {
- assert(in_t == int8_t || in_t == uint8_t || input_zp == 0);
- assert(out_t == int8_t || out_t == uint8_t || output_zp == 0);
- assert((scale32 && in_t != int48_t_t) || (!scale32 && !double_round));
+ REQUIRE(in_t == int8_t || in_t == uint8_t || input_zp == 0);
+ REQUIRE(out_t == int8_t || out_t == uint8_t || output_zp == 0);
+ REQUIRE((scale32 && in_t != int48_t_t) || (!scale32 && !double_round));
int48_t value = tensor_read<in_t>(input, shape, index, input_zp);
int c = (per_channel) ? index[dims-1] : 0;
int32_t result = (scale32) ?