This repository was archived by the owner on Apr 28, 2023. It is now read-only.
Commit 2f9871d
committed
teach sema to extract iteration variables from LHS subtrees
Sema needs the list of iteration variables on the Comprehension LHS to
differentiate between reduction and non-reduction variables, the former
appearing only on the RHS. Original implementation assumes
Comprehension LHS is a tensor whose indices are Idents and ignores more
complex constructs. With indirection support, comprehensions like
O(A(i)) = B(i) are possible but i is interpreted as a reduction
dimension by Sema.
Traverse indices of the LHS Tensor in Comprehension recursively,
inspecting subtrees of Access and Apply trees and collecting all Idents.1 parent e9d1dc4 commit 2f9871d
1 file changed
+22
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
437 | 437 | | |
438 | 438 | | |
439 | 439 | | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
440 | 460 | | |
441 | 461 | | |
442 | 462 | | |
443 | 463 | | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
| 464 | + | |
451 | 465 | | |
452 | 466 | | |
453 | 467 | | |
| |||
464 | 478 | | |
465 | 479 | | |
466 | 480 | | |
| 481 | + | |
467 | 482 | | |
468 | 483 | | |
469 | 484 | | |
| |||
0 commit comments