diff options
author | Dominic Symes <dominic.symes@arm.com> | 2022-04-29 16:15:56 +0100 |
---|---|---|
committer | Dominic Symes <dominic.symes@arm.com> | 2022-05-03 13:36:22 +0000 |
commit | cb6c6b33cc85d6c40d46b1ee78bcbd6a049017d5 (patch) | |
tree | 94988082f976e28f25cc13c0331efd119f83b3f2 /chapters/pseudocode.adoc | |
parent | 5de08d1db3c1de4fddf3f4bb7a286db35cb9f9d1 (diff) | |
download | specification-cb6c6b33cc85d6c40d46b1ee78bcbd6a049017d5.tar.gz |
Specify width of integer types
Clarify for types previously definded as int
the width assumed by the specification.
Signed-off-by: Dominic Symes <dominic.symes@arm.com>
Change-Id: Ied62d4803a4323a600d33cff09752a76ca48f18d
Diffstat (limited to 'chapters/pseudocode.adoc')
-rw-r--r-- | chapters/pseudocode.adoc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/chapters/pseudocode.adoc b/chapters/pseudocode.adoc index 3f885c7..a370880 100644 --- a/chapters/pseudocode.adoc +++ b/chapters/pseudocode.adoc @@ -181,24 +181,24 @@ Generic helper functions used to keep the pseudocode concise. [source,c++] ---- -int idiv(int input1, int input2) { +int32_t idiv(int32_t input1, int32_t input2) { return input1 / input2; // Integer divide that truncates towards zero } // Integer division that checks input1 is a multiple of input2 -int idiv_check(int input1, int input2) { +int32_t idiv_check(int32_t input1, int32_t input2) { ERROR_IF(input1 % input2 != 0); // input1 must be a multiple of input2 return input1 / input2; // exact quotient without rounding } -int length(in_t input) +int32_t length(in_t input) return number of elements in input list -int rank(in_t input) +int32_t rank(in_t input) return rank of an input tensor -int sum(in_t input[]) +int32_t sum(in_t input[]) return the sum of values of an input list bool isNaN(float input) |