aboutsummaryrefslogtreecommitdiff
path: root/pseudocode/operators
diff options
context:
space:
mode:
Diffstat (limited to 'pseudocode/operators')
-rw-r--r--pseudocode/operators/EQUAL.tosac4
-rw-r--r--pseudocode/operators/GREATER.tosac4
-rw-r--r--pseudocode/operators/GREATER_EQUAL.tosac4
-rw-r--r--pseudocode/operators/RESCALE.tosac8
4 files changed, 10 insertions, 10 deletions
diff --git a/pseudocode/operators/EQUAL.tosac b/pseudocode/operators/EQUAL.tosac
index 67e0b64..3445e27 100644
--- a/pseudocode/operators/EQUAL.tosac
+++ b/pseudocode/operators/EQUAL.tosac
@@ -15,8 +15,8 @@ for_each(index in shape) {
in_t value2 = tensor_read<in_t>(input2, shape2, index2);
out_t result;
if (isNaN(value1) || isNaN(value2))
- result = False;
+ result = false;
else
- result = (value1 == value2) ? True : False;
+ result = (value1 == value2) ? true : false;
tensor_write<out_t>(output, shape, index, result);
}
diff --git a/pseudocode/operators/GREATER.tosac b/pseudocode/operators/GREATER.tosac
index af8b4c9..3155f23 100644
--- a/pseudocode/operators/GREATER.tosac
+++ b/pseudocode/operators/GREATER.tosac
@@ -15,8 +15,8 @@ for_each(index in shape) {
in_t value2 = tensor_read<in_t>(input2, shape2, index2);
out_t result;
if (isNaN(value1) || isNaN(value2))
- result = False;
+ result = false;
else
- result = (value1 > value2) ? True : False;
+ result = (value1 > value2) ? true : false;
tensor_write<out_t>(output, shape, index, result);
}
diff --git a/pseudocode/operators/GREATER_EQUAL.tosac b/pseudocode/operators/GREATER_EQUAL.tosac
index e45990d..2f43d40 100644
--- a/pseudocode/operators/GREATER_EQUAL.tosac
+++ b/pseudocode/operators/GREATER_EQUAL.tosac
@@ -15,8 +15,8 @@ for_each(index in shape) {
in_t value2 = tensor_read<in_t>(input2, shape2, index2);
out_t result;
if (isNaN(value1) || isNaN(value2))
- result = False;
+ result = false;
else
- result = (value1 >= value2) ? True : False;
+ result = (value1 >= value2) ? true : false;
tensor_write<out_t>(output, shape, index, result);
}
diff --git a/pseudocode/operators/RESCALE.tosac b/pseudocode/operators/RESCALE.tosac
index 86a939b..c29bddd 100644
--- a/pseudocode/operators/RESCALE.tosac
+++ b/pseudocode/operators/RESCALE.tosac
@@ -12,11 +12,11 @@ for_each(index in shape) {
// int8/uint8 can have zero point within their valid range
// No other types can have zero point != 0
ERROR_IF(in_t != i8_t &&
- (in_t != i16_t || input_unsigned == False) && input_zp != 0);
+ (in_t != i16_t || input_unsigned == false) && input_zp != 0);
ERROR_IF(out_t != i8_t &&
- (out_t != i16_t || output_unsigned == False) && output_zp != 0);
- ERROR_IF(in_t == i16_t && input_unsigned == True && input_zp != 0 && input_zp != 32768);
- ERROR_IF(out_t == i16_t && output_unsigned == True && output_zp != 0 && output_zp != 32768);
+ (out_t != i16_t || output_unsigned == false) && output_zp != 0);
+ ERROR_IF(in_t == i16_t && input_unsigned == true && input_zp != 0 && input_zp != 32768);
+ ERROR_IF(out_t == i16_t && output_unsigned == true && output_zp != 0 && output_zp != 32768);
ERROR_IF(scale32 && in_t == i48_t);
ERROR_IF(!scale32 && double_round);
ERROR_IF(in_t == i16_t && out_t == i32_t && input_unsigned);