aboutsummaryrefslogtreecommitdiff
path: root/chapters/type_conversion.adoc
diff options
context:
space:
mode:
authorEric Kunze <eric.kunze@arm.com>2021-03-11 15:38:22 -0800
committerEric Kunze <eric.kunze@arm.com>2021-03-11 15:39:53 -0800
commit839830a72ebb27c4a818e15d3334e79085906dc8 (patch)
tree9999a6fc050d75122eb0a46a215558c0665d6e91 /chapters/type_conversion.adoc
parent8e4a9d33f0527107fda724fc0f7b6b7c1f42bf79 (diff)
downloadspecification-839830a72ebb27c4a818e15d3334e79085906dc8.tar.gz
Make pseudocode block tags consistent
They are all now [source,c++] and use ---- as the delimiter. Also made the pseudocode indentation consistent (4 spaces) in the introduction sections. Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I1287a60cfeae8b7e3c63b9fc8885b1ebf3d3386d
Diffstat (limited to 'chapters/type_conversion.adoc')
-rw-r--r--chapters/type_conversion.adoc12
1 files changed, 6 insertions, 6 deletions
diff --git a/chapters/type_conversion.adoc b/chapters/type_conversion.adoc
index 6701297..2ca505e 100644
--- a/chapters/type_conversion.adoc
+++ b/chapters/type_conversion.adoc
@@ -24,8 +24,8 @@ Casts a tensor from one data type to another.
*Operation Function:*
-[source,c]
-....
+[source,c++]
+----
for_each(index in shape) {
in_t in = tensor_read<in_t>(input, shape, index);
out_t out;
@@ -44,7 +44,7 @@ for_each(index in shape) {
}
tensor_write<out_t>(output, shape, index, out)
}
-....
+----
*Supported Data Types:*
@@ -100,8 +100,8 @@ Rescale quantized values into a new domain. This function scales by factor: mult
*Operation Function:*
-[source,c]
-....
+[source,c++]
+----
for_each(index in shape) {
assert(in_t == int8_t || in_t == uint8_t || input_zp == 0);
assert(out_t == int8_t || out_t == uint8_t || output_zp == 0);
@@ -114,7 +114,7 @@ for_each(index in shape) {
result = (out_t)apply_clip<int32_t>(result + output_zp, minimum<out_t>, maximum<out_t>);
tensor_write<out_t>(output, shape, index, result);
}
-....
+----
*Supported Data Types:*