I am not clear whether you know Convolution and just asking for opencl implemention or vice versa
Here is a link for matrix convolution. you can go through this to get to know about matrix convolution
If you wanted to know opencl implementation
you can go through opencl programming guide and samples form the installed folder.
I am electronics student,quiet new to OpenCL and in most of the example convolution is used for image but
i am trying to multiply an n*n matrix with an m*m matrix
using convolution theorem.
If you analyse image convolution code, you will understand that even the image is 2D array. So in the place of reading image you can fill you 2D array and can follow as it is.
Its basically reading two array which are 2D and pass it as kernel arguments. Perform convolution that Sum of Product of Mask pixels/Array. then take average of it.
Do let me know in case if you need any more help