Replies: 1 comment 4 replies
-
A good default schedule for this sort of code is:
And I'd write blendLayers as:
select is a branchless ternary operator |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi fellow Haliders,
I'm trying to make a very simple layer blending pipeline.
It works like expected but when i try to add scheduling it is in fact slower than no scheduling at all.
The code is simple and should be self explanatory but to be sure:
I have 2 planar rgba input images(layers), bottom & top.
I loop over x y check if there is an alpha and use this in a branchless fashion to compute if the pixel of top is to be draw or otherwise the bottom pixel.
I was anticipating a boost in performance with scheduling when testing this on 1000*1000(1 MP) pixel layers.
But it is in fact slower, there probably is a logical explanation...?
Any hint on why and maybe how to get it to run faster would be more then welcome. :)
Thx in advance!
(Interleaving comes to mind for blending operations, but dono...)
Beta Was this translation helpful? Give feedback.
All reactions