Replies: 3 comments 13 replies
|
ISPC is widely used for image processing workloads, so it's definitely the right tool for this task. However, it would be very helpful if you could share some code so we can provide more targeted assistance. |
|
Thank you very much for the reply. Here is some of the code: This yields: |
|
Look into either sorting networks or the odd-even transposition sort or a combination of the two. These can support data parallel sorting that properly leverages the SIMD capabilities of ISPC. |
Uh oh!
There was an error while loading. Please reload this page.
I am sorry of this is not the right forum for this question:
I am working on an image processing feature, where I need to sort a variable number of 32bit float values for every pixel ( the number of values is not constant over the image and there are between 2-100 values ).
Currently I implemented this by computing multiple pixels at once, but the perf is not as good as I expected and ispc complains left and right about gathers and scatters during the sorting swaps.
Do you think the perf would be better if try to map the values for 1 pixel to the simd lanes ? For pixel with low number of values, I would get very low simd usage since I cannot guarantee 64 values / pixel for avx512.
Is ISPC the correct tool achieve this ?
I am targeting avx2 and avx512 capable cpus
All reactions