aboutsummaryrefslogtreecommitdiff
path: root/chapters/reduction.adoc
diff options
context:
space:
mode:
authorDominic Symes <dominic.symes@arm.com>2020-10-22 15:36:24 +0100
committerDominic Symes <dominic.symes@arm.com>2020-10-22 15:39:46 +0100
commit298a029348e07903b1f78eb9994230fa205e869e (patch)
treeaeb3f2c39949992c172f56f3f30140a716990314 /chapters/reduction.adoc
parent1d84a1e8269b3f61aaa12219221e3bbf68a61fc6 (diff)
downloadspecification-298a029348e07903b1f78eb9994230fa205e869e.tar.gz
Make rank() consistent across files
Complete the function naming change from dimensions() to rank(). Fix MATMUL to use apply_add() for additions, consistent with the other operations. Signed-off-by: Dominic Symes <dominic.symes@arm.com> Change-Id: I6ba84cf8b016505e8477b04dd00f2a2bf3194492
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 af44ab6..0739dfd 100644
--- a/chapters/reduction.adoc
+++ b/chapters/reduction.adoc
@@ -27,7 +27,7 @@ Reduce a tensor along the given axis with a logical AND operation
[source,c]
----
-assert(0<=axis && axis<dimensions(in_shape))
+assert(0<=axis && axis<rank(in_shape))
assert(out_shape[axis]==1)
for_each (index in out_shape) {
tensor_write<in_t>(output, out_shape, index, true)
@@ -68,7 +68,7 @@ Reduce a tensor along the given axis with a logical OR operation
[source,c]
----
-assert(0<=axis && axis<dimensions(in_shape))
+assert(0<=axis && axis<rank(in_shape))
assert(out_shape[axis]==1)
for_each (index in out_shape) {
tensor_write<in_t>(output, out_shape, index, false)
@@ -109,7 +109,7 @@ Reduce a tensor along the given axis with a maximum operation
[source,c]
----
-assert(0<=axis && axis<dimensions(in_shape))
+assert(0<=axis && axis<rank(in_shape))
assert(out_shape[axis]==1)
for_each (index in out_shape) {
tensor_write<in_t>(output, out_shape, index, minimum<in_t>)
@@ -156,7 +156,7 @@ Quantization is ignored when doing the REDUCE_MIN operation. The input and outpu
[source,c]
----
-assert(0<=axis && axis<dimensions(in_shape))
+assert(0<=axis && axis<rank(in_shape))
assert(out_shape[axis]==1)
for_each (index in out_shape) {
tensor_write<in_t>(output, out_shape, index, maximum<in_t>)
@@ -200,7 +200,7 @@ Reduce a tensor along the given axis by computing the product of the axis.
[source,c]
----
-assert(0<=axis && axis<dimensions(in_shape))
+assert(0<=axis && axis<rank(in_shape))
assert(out_shape[axis]==1)
for_each (index in out_shape) {
tensor_write<in_t>(output, out_shape, index, 1.0)
@@ -241,7 +241,7 @@ Reduce a tensor along the given axis by computing the sum of the axis.
[source,c]
----
-assert(0<=axis && axis<dimensions(in_shape))
+assert(0<=axis && axis<rank(in_shape))
assert(out_shape[axis]==1)
for_each (index in out_shape) {
tensor_write<in_t>(output, out_shape, index, 0)