aboutsummaryrefslogtreecommitdiff
path: root/chapters
diff options
context:
space:
mode:
authorDominic Symes <dominic.symes@arm.com>2022-07-27 12:53:11 +0100
committerDominic Symes <dominic.symes@arm.com>2022-08-26 09:11:01 +0100
commit8783adb282f4d6414a1442042bd8e02afcd12b18 (patch)
tree82aad31c55fce13032f675e4acb2c4329861184d /chapters
parenteda7b126d3914e9461cf014439b3571b9e6a9c41 (diff)
downloadspecification-8783adb282f4d6414a1442042bd8e02afcd12b18.tar.gz
RESCALE and POW: remove rank restriction
Also be consistent to use the term 'rank' rather than 'dims'. Change-Id: Ica827fcfd44e9735da2d1a4ddb8cb1fa04c6479b Signed-off-by: Dominic Symes <dominic.symes@arm.com>
Diffstat (limited to 'chapters')
-rw-r--r--chapters/type_conversion.adoc2
1 files changed, 1 insertions, 1 deletions
diff --git a/chapters/type_conversion.adoc b/chapters/type_conversion.adoc
index 90452a3..c3d986e 100644
--- a/chapters/type_conversion.adoc
+++ b/chapters/type_conversion.adoc
@@ -65,7 +65,7 @@ for_each(index in shape) {
ERROR_IF(!scale32 && double_round);
int48_t value = tensor_read<in_t>(input, shape, index);
value = value - input_zp;
- int c = (per_channel) ? index[dims-1] : 0;
+ int c = (per_channel) ? index[rank(input) - 1] : 0;
int32_t result = (scale32) ?
apply_scale_32(value, multiplier[c], shift[c], double_round) :
apply_scale_16(value, multiplier[c], shift[c]);