aboutsummaryrefslogtreecommitdiff
path: root/chapters/operators.adoc
diff options
context:
space:
mode:
authorEric Kunze <eric.kunze@arm.com>2021-06-17 18:01:09 -0700
committerEric Kunze <eric.kunze@arm.com>2021-06-24 12:18:14 -0700
commita9101530d8ea7a3cb470b722bc6cf8745ab283ac (patch)
tree2918f0c0e16515295ef6d112c279902fdddd44fb /chapters/operators.adoc
parentf19e594f71e04c72ecf937419333b57dc7dcb873 (diff)
downloadspecification-a9101530d8ea7a3cb470b722bc6cf8745ab283ac.tar.gz
Replace assert with REQUIRE()
REQUIRE is a direct replacement for the asserts, and uses the unpredictable() function in pseudocode to describe the required conditions for operators Change-Id: I35dc81e083d8e41f16728d992bdb8b06b0271226 Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Diffstat (limited to 'chapters/operators.adoc')
-rw-r--r--chapters/operators.adoc8
1 files changed, 6 insertions, 2 deletions
diff --git a/chapters/operators.adoc b/chapters/operators.adoc
index 896931a..75084d1 100644
--- a/chapters/operators.adoc
+++ b/chapters/operators.adoc
@@ -38,9 +38,13 @@ The following function denotes the execution of a TOSA graph, on an input tensor
[source,c++]
----
tosa_execute_graph(tosa_graph_t graph, tosa_list_t input_list, tosa_list_t output_list) {
- assert(tensor_list_shape(input_list)==tosa_input_shape(graph));
- assert(tensor_list_shape(output_list)==tosa_output_shape(graph));
+ REQUIRE(tensor_list_shape(input_list)==tosa_input_shape(graph));
+ REQUIRE(tensor_list_shape(output_list)==tosa_output_shape(graph));
<Execute TOSA graph operators as defined in this specification>
+ if (tosa_graph_result_unpredictable == true) {
+ // Result of TOSA graph execution is unpredictable due to calling
+ // the unpredictable() function during execution.
+ }
}
----