Skip to content

Loop over arbitrary buffer in a Func #7191

Answered by abadams
Doubl3MD asked this question in Q&A
Discussion options

You must be logged in to vote

You want an RDom and an update definition for this, something like:

toRealize(x, y) = 0; // base case
RDom r(p_pattern);
toRealize(x, y) = some function of p_image(x, y) and p_pattern(r.x, r.y);

toRealize.in().realize(...);

The .in() call is optional, but it gets a slightly better schedule for this sort of code. It puts the base case inside the loop over x, y.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Doubl3MD
Comment options

Answer selected by Doubl3MD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants