Skip to content

Commit 69b8d8e

Browse files
committed
Simplify blockwise broadcasting removing temporaries
1 parent bdd984e commit 69b8d8e

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

index.bs

+3-7
Original file line numberDiff line numberDiff line change
@@ -9722,13 +9722,9 @@ To <dfn data-lt="bidirectionally broadcasting">bidirectionally broadcast the sha
97229722
To <dfn data-lt="blockwise broadcasting">blockwise broadcast the shapes</dfn> |shapeFrom| and |shapeTo|, perform the following steps. |shapeFrom| and |shapeTo| are [=/lists=] of positive integers, representing the dimensions of tensors, and the steps return a new [=/list=] of positive integers, or failure.
97239723
</summary>
97249724

9725-
1. Let |sizeFrom| be |shapeFrom|'s [=list/size=].
9726-
1. Let |sizeTo| be |shapeTo|'s [=list/size=].
9727-
1. If |sizeFrom| is not equal to |sizeTo|, then return failure.
9728-
1. [=list/For each=] |index| in [=the range=] 0 to |sizeTo|, exclusive:
9729-
1. Let |dimFrom| be |shapeFrom|[|index|].
9730-
1. Let |dimTo| be |shapeTo|[|index|].
9731-
1. If |dimFrom| is not exactly divisible into |dimTo|, then return failure.
9725+
1. If |shapeFrom|'s [=list/size=] is not equal to |shapeTo|'s [=list/size=], then return failure.
9726+
1. [=list/For each=] |index| in [=the range=] 0 to |shapeTo|'s [=list/size=], exclusive:
9727+
1. If |shapeFrom|[|index|] is not exactly divisible into |shapeTo|[|index|], then return failure.
97329728
1. Return |shapeTo|.
97339729

97349730
</details>

0 commit comments

Comments
 (0)