aboutsummaryrefslogtreecommitdiff
path: root/chapters/ewise_ternary.adoc
diff options
context:
space:
mode:
authorDominic Symes <dominic.symes@arm.com>2023-03-06 17:14:15 +0000
committerDominic Symes <dominic.symes@arm.com>2023-03-20 10:39:56 +0000
commit67a6f7f26f092860a4e1b3f6ac0c2e5cde9bf685 (patch)
tree2be362915e3897118303ef34531db6b2b0200142 /chapters/ewise_ternary.adoc
parent18548921437ef60e5553a75517449918e5c42b1d (diff)
downloadspecification-67a6f7f26f092860a4e1b3f6ac0c2e5cde9bf685.tar.gz
Check the output shape of broadcast operations
For an operation that performs broadcast the output shape size must be the maximum of the input shape sizes in each dimension. Additionally, the input dimension size must be 1 whenever an input shape does not match the output shape size in a dimension. Signed-off-by: Dominic Symes <dominic.symes@arm.com> Change-Id: I89492f4ef22da76f84f12e720c79634ea42545bc
Diffstat (limited to 'chapters/ewise_ternary.adoc')
-rw-r--r--chapters/ewise_ternary.adoc1
1 files changed, 1 insertions, 0 deletions
diff --git a/chapters/ewise_ternary.adoc b/chapters/ewise_ternary.adoc
index 0b8097d..57cf599 100644
--- a/chapters/ewise_ternary.adoc
+++ b/chapters/ewise_ternary.adoc
@@ -17,6 +17,7 @@ include::{generated}/operators/SELECT.adoc[]
[source,c++]
----
+ERROR_IF(shape != broadcast_shape(broadcast_shape(shape1, shape2), shape3));
for_each(index in shape) {
dim_t index1 = apply_broadcast(shape, shape1, index);
dim_t index2 = apply_broadcast(shape, shape2, index);