-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fully parallelise multi-dimensional scatters.
Closes #2035.
- Loading branch information
Showing
4 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
-- Scattering where elements are themselves arrays - see #2035. | ||
-- == | ||
-- input { [[1,2,3],[4,5,6]] [1i64,0i64,-1i64] [[9,8,7],[6,5,4],[9,8,7]] } | ||
-- output { [[6,5,4],[9,8,7]] } | ||
|
||
entry main (xss: *[][]i32) (is: []i64) (ys: [][]i32) = | ||
scatter xss is ys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-- Scattering where elements are themselves arrays - see #2035. This | ||
-- one also has a map part. | ||
-- == | ||
-- input { [[1,2,3],[4,5,6]] [1i64,0i64,-1i64] [[9,8,7],[6,5,4],[4,5,6]] } | ||
-- output { [[8,7,6],[11,10,9]] } | ||
-- structure gpu { SegMap 2 } | ||
|
||
entry main (xss: *[][]i32) (is: []i64) (ys: [][]i32) = | ||
scatter xss is (map (map (+2)) ys) |