aboutsummaryrefslogtreecommitdiff
path: root/chapters/reduction.adoc
diff options
context:
space:
mode:
authorDominic Symes <dominic.symes@arm.com>2022-10-07 15:03:01 +0100
committerEric Kunze <eric.kunze@arm.com>2022-10-19 15:18:09 +0000
commit0205d99cbff58797bf6602ee5718d50c00d8309b (patch)
treef0dac55564e41bdb0a38a7c335a41c5dcf8b43ce /chapters/reduction.adoc
parent2ceeaa24618c3499636182cc9a89265e0d70717f (diff)
downloadspecification-0205d99cbff58797bf6602ee5718d50c00d8309b.tar.gz
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
Diffstat (limited to 'chapters/reduction.adoc')
-rw-r--r--chapters/reduction.adoc12
1 files changed, 6 insertions, 6 deletions
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);