Skip to content

Instantly share code, notes, and snippets.

@Iainmon
Last active August 29, 2023 06:26
Show Gist options
  • Save Iainmon/4a4aafdab61f86327d8dcef8a0c57fd4 to your computer and use it in GitHub Desktop.
Save Iainmon/4a4aafdab61f86327d8dcef8a0c57fd4 to your computer and use it in GitHub Desktop.
proc convShape() {}
iter regions(dom: domain(2,int), k: int, stride: int) {
const (h,w) = convShape(dom.shape,k,stride,padding=0);
for (i,j) in {0..#h,0..#w} {
yield dom[i * k * stride..#k,j * k * stride..#k];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment