-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid duplicating first-order code in defunctionalisation.
This is done by eta-expanding uses of function-typed variables. We will still generate a wrapper function, but it will always be small, while previously we would duplicate the entire first order code, which can be enormous. This will be particularly important once we stop inlining so much. Closes #1968.
- Loading branch information
Showing
5 changed files
with
30 additions
and
17 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
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,8 @@ | ||
-- == | ||
-- input { [1,2,3] [4,5,6] } output { [5, 6, 7] [7, 9, 11] } | ||
-- structure gpu { SegMap/Apply 2 } | ||
|
||
#[noinline] | ||
def f y x = x + y + 2i32 | ||
|
||
def main xs ys = (map (f 2) xs, map2 f xs 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