From 0205d99cbff58797bf6602ee5718d50c00d8309b Mon Sep 17 00:00:00 2001
From: Dominic Symes <dominic.symes@arm.com>
Date: Fri, 7 Oct 2022 15:03:01 +0100
Subject: Define the index type for tensor co-ordinates

Tensor co-ordinate indices are signed 32-bit values
in this version of the specification.

Signed-off-by: Dominic Symes <dominic.symes@arm.com>
Change-Id: I6b8dde500ef9c4c4c5688c1a43f8d658863e4a49
---
 chapters/reduction.adoc | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

(limited to 'chapters/reduction.adoc')

diff --git a/chapters/reduction.adoc b/chapters/reduction.adoc
index cd1db7b..3746460 100644
--- a/chapters/reduction.adoc
+++ b/chapters/reduction.adoc
@@ -27,7 +27,7 @@ for_each(index in shape) {
     tensor_write<in_out_t>(output, shape, index, true);
 }
 for_each(index in shape1) {
-    out_index = index;
+    dim_t out_index = index;
     out_index[axis] = 0;
     in_out_t value = tensor_read<in_out_t>(input, shape1, index);
     in_out_t state = tensor_read<in_out_t>(output, shape, out_index);
@@ -54,7 +54,7 @@ for_each(index in shape) {
     tensor_write<in_out_t>(output, shape, index, false);
 }
 for_each(index in shape1) {
-    out_index = index;
+    dim_t out_index = index;
     out_index[axis] = 0;
     in_out_t value = tensor_read<in_out_t>(input, shape1, index);
     in_out_t state = tensor_read<in_out_t>(output, shape, out_index);
@@ -79,7 +79,7 @@ for_each(index in shape) {
     tensor_write<in_out_t>(output, shape, index, minimum<in_out_t>);
 }
 for_each(index in shape1) {
-    out_index = index;
+    dim_t out_index = index;
     out_index[axis] = 0;
     in_out_t value = tensor_read<in_out_t>(input, shape1, index);
     in_out_t state = tensor_read<in_out_t>(output, shape, out_index);
@@ -104,7 +104,7 @@ for_each(index in shape) {
     tensor_write<in_out_t>(output, shape, index, maximum<in_out_t>);
 }
 for_each(index in shape1) {
-    out_index = index;
+    dim_t out_index = index;
     out_index[axis] = 0;
     in_out_t value = tensor_read<in_out_t>(input, shape1, index);
     in_out_t state = tensor_read<in_out_t>(output, shape, out_index);
@@ -129,7 +129,7 @@ for_each(index in shape) {
     tensor_write<in_out_t>(output, shape, index, 1.0);
 }
 for_each(index in shape1) {
-    out_index = index;
+    dim_t out_index = index;
     out_index[axis] = 0;
     in_out_t value = tensor_read<in_out_t>(input, shape1, index);
     in_out_t state = tensor_read<in_out_t>(output, shape, out_index);
@@ -154,7 +154,7 @@ for_each(index in shape) {
     tensor_write<in_out_t>(output, shape, index, 0);
 }
 for_each(index in shape1) {
-    out_index = index;
+    dim_t out_index = index;
     out_index[axis] = 0;
     in_out_t value = tensor_read<in_out_t>(input, shape1, index);
     in_out_t state = tensor_read<in_out_t>(output, shape, out_index);
-- 
cgit v1.2.1

