aboutsummaryrefslogtreecommitdiff
path: root/chapters/pseudocode.adoc
diff options
context:
space:
mode:
authorEric Kunze <eric.kunze@arm.com>2021-08-17 14:57:46 -0700
committerEric Kunze <eric.kunze@arm.com>2021-09-16 10:59:28 -0700
commit173fc16f46b2938ff49a39fb2dad31c54161a874 (patch)
tree0e17d2d391353fab462fa78e854538a9f2e4a629 /chapters/pseudocode.adoc
parent32de3912884dc2dc1425b61c419bbd30f2adbbbd (diff)
downloadspecification-173fc16f46b2938ff49a39fb2dad31c54161a874.tar.gz
Clarify range limitations for tensors
Catch zero and negative sized tensors. Clarify configuration of bool_t in the reference model. int4_t limitations on -8 to stay symmetric around 0. Pad values must be >= 0. Stride,dilation values must be >= 1. Change-Id: Idb6ef740f855912a8340475ba319816f90c9b051 Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Diffstat (limited to 'chapters/pseudocode.adoc')
-rw-r--r--chapters/pseudocode.adoc10
1 files changed, 9 insertions, 1 deletions
diff --git a/chapters/pseudocode.adoc b/chapters/pseudocode.adoc
index d9d8836..e6b7604 100644
--- a/chapters/pseudocode.adoc
+++ b/chapters/pseudocode.adoc
@@ -120,7 +120,7 @@ float_t round_to_nearest_float(in_t f)
The behavior for ties is implementation dependent.
out_t sign_extend(in_t input)
- Only valid for twos complement integer values where out_t has more bits than in_t.
+ Only valid for two's complement integer values where out_t has more bits than in_t.
Output = input
Replicate the top bit of input for all bits between the top bit of input and the top bit of output.
@@ -141,3 +141,11 @@ in_t* flatten(in_t lists[]) {
}
}
----
+
+The following helper function returns the length of a list
+
+[source,c++]
+----
+int length(in_t input)
+ return number of elements in input
+----