Hi,
I have a programming problem and want to solve using OpenCL. The problem is computing moving average from matrices
For example: I have 1000 matrices: A, B, C, D, ... (for example each matrix has size 4x4 or bigger)
I want to compute the moving average from these 1000 matrix (for example take Window size=5)
The result I want is
result[0] = (A+B+C+D+E)/5
result[1] = (B+C+D+E+F)/5
...and so on.
Is this kind of problem can be solved using OpenCL?
Thank you very much for help
rolandman99,
Yeah, it can be implemented using OpenCL.Although there are a few suggestions which might help you to write a higher performance code.I will try to implement it myself if i had time.
1. If you are not able to fit in the arrays of size equal to your window in LDS it would not be a good idea to use LDS at all.As in this case you will be using one element only once.
2.Refer to chapter 4 of openCL programming guide to see what can help you to improve your performance.Memory access pattern being the most important if global memory has to be used.