How to sample 2x2 neighbor points of a given point, like textureGather() in openGL #6852
Answered
by
abadams
zhouwangpei123
asked this question in
Q&A
-
Given a point (x, y) in an image, let intx = floor(x), inty = floor(y), can halide gather its four corner points (intx, inty), (intx+1, inty), (intx, inty+1), (intx+1, inty+1) in one time. |
Beta Was this translation helpful? Give feedback.
Answered by
abadams
Jul 13, 2022
Replies: 2 comments 1 reply
-
In Halide that has to be expressed as four separate loads. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
zhouwangpei123
-
If I generate 4 loads dors Halide would be able to have intrinsic for gather4 on GPU? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In Halide that has to be expressed as four separate loads.