From 839830a72ebb27c4a818e15d3334e79085906dc8 Mon Sep 17 00:00:00 2001 From: Eric Kunze Date: Thu, 11 Mar 2021 15:38:22 -0800 Subject: 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 Change-Id: I1287a60cfeae8b7e3c63b9fc8885b1ebf3d3386d --- chapters/type_conversion.adoc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'chapters/type_conversion.adoc') 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(input, shape, index); out_t out; @@ -44,7 +44,7 @@ for_each(index in shape) { } tensor_write(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(result + output_zp, minimum, maximum); tensor_write(output, shape, index, result); } -.... +---- *Supported Data Types:* -- cgit v1.2.1