aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Petit <kevin.petit@arm.com>2023-04-18 10:39:32 +0100
committerKevin Petit <kevin.petit@arm.com>2023-04-18 10:39:32 +0100
commite0fee3d30085a6d07b104447f5b128e81126445e (patch)
treeb9cb51515bf44741dd85ae0a31ae16032bfbb91d
parent544227ef40dc226707d2c97b41cf0ee0b6111d39 (diff)
downloadspecification-e0fee3d30085a6d07b104447f5b128e81126445e.tar.gz
Fix description of tensor size limit
Also replace all instances of "co-ordinate" with "coordinate" for consistency. Signed-off-by: Kevin Petit <kevin.petit@arm.com> Change-Id: Idff73092711d3ff85bf4db33df92924c754cf451
-rw-r--r--chapters/introduction.adoc3
-rw-r--r--chapters/pseudocode.adoc4
2 files changed, 4 insertions, 3 deletions
diff --git a/chapters/introduction.adoc b/chapters/introduction.adoc
index cae23d4..eecdbc7 100644
--- a/chapters/introduction.adoc
+++ b/chapters/introduction.adoc
@@ -337,8 +337,9 @@ Tensor elements are addressed using dim_t values, where each element of the vect
The tensor overall size in elements is limited by the data type size_t.
In this version of the specification, size_t is defined as an unsigned 32-bit integer representing size from 1 to (1<<32) - 1.
-A tensor dimension co-ordinate is limited by the data type index_t.
+The size of tensors along each of their dimensions is limited by the data type index_t.
In this version of the specification, index_t is defined as a signed 32-bit integer.
+This means that the maximum size of a tensor along each dimension is (1<<31) - 1 and therefore the maximum coordinate value is (1<<31) - 2.
Indices used to access tensors must be non-negative.
==== Data Layouts
diff --git a/chapters/pseudocode.adoc b/chapters/pseudocode.adoc
index 42f123b..422188a 100644
--- a/chapters/pseudocode.adoc
+++ b/chapters/pseudocode.adoc
@@ -62,7 +62,7 @@ void LEVEL_CHECK(condition) {
[source,c++]
----
-// Convert tensor index co-ordinates to an element offset
+// Convert tensor index coordinates to an element offset
size_t tensor_index_to_offset(dim_t shape, dim_t index) {
size_t size = tensor_size(shape); // check tensor shape is valid
size_t offset = 0;
@@ -73,7 +73,7 @@ size_t tensor_index_to_offset(dim_t shape, dim_t index) {
return offset;
}
-// Convert an element offset to tensor index co-ordinates
+// Convert an element offset to tensor index coordinates
dim_t tensor_offset_to_index(dim_t shape, size_t offset) {
size_t size = tensor_size(shape); // check tensor shape is valid
REQUIRE(offset < size);