Created
January 3, 2020 01:12
-
-
Save ryanstout/5a6d2ab8bbcf3191f476a1e35966ebc4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
producer[x, y] = hl.sin(x * y) | |
consumer[x, y] = (producer[x, y] + | |
producer[x, y+1] + | |
producer[x+1, y] + | |
producer[x+1, y+1])/4 | |
xo, yo, xi, yi = hl.Var("xo"), hl.Var("yo"), hl.Var("xi"), hl.Var("yi") | |
consumer.tile(x, y, xo, yo, xi, yi, 4, 4) | |
producer.compute_at(consumer, xo) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment