Newbi: add two matrices

Hi,
I’m very new to OpenCL. I tried some examples like the vectoradd-program. But how could I pass two matrices to the kernel to add these two and write them in a third matrix?

Best regards!

Hi,
or does someone have an implementation of the SAD (sum of absolute differences) algorithm?

Best regards!

SAD is not an algorithm but a cost function.
As you said, it’s just the sum of the absolute differences.
So we can’t give you this implementation since this function is used in hundreds of different algorithms.

Vincent