-
I've been using ElementWiseKernel for fractal zooms. I decided to shuffle the input, a flattened 2d array of complex numbers, in the hope that it would more evenly distribute values that need longer to resolve. If someone could explain what's happening here it would be much appreciated.
paired with this preamble and ElementWiseKernel, though I imagine it isn't specific
preamble=""" StabilityFractalNoCycle=
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Memory access patterns matter. |
Beta Was this translation helpful? Give feedback.
-
Hey, |
Beta Was this translation helpful? Give feedback.
Hey,
It makes sense to me now. Going to leave my explanation to encase it helps someone else. There's only 1 instruction reader per workgroup, so within a kernel, it's disadvantageous for branching unless each item in the workgroup will follow the same branch. While the input was ordered it meant items in the same workgroup were likely to follow the same branch. This saves much more time than splitting the more expensive branches across work groups.