This repository was archived by the owner on Apr 28, 2023. It is now read-only.
Commit d9eab4b
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 d9eab4b
2 files changed
+39
-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 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
440 | 464 | | |
441 | 465 | | |
442 | 466 | | |
443 | 467 | | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
| 468 | + | |
451 | 469 | | |
452 | 470 | | |
453 | 471 | | |
| |||
464 | 482 | | |
465 | 483 | | |
466 | 484 | | |
| 485 | + | |
467 | 486 | | |
468 | 487 | | |
469 | 488 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
349 | 362 | | |
350 | 363 | | |
351 | 364 | | |
| |||
0 commit comments