cancel
Showing results for 
Search instead for 
Did you mean: 

OpenCL

arunad
Journeyman III

matrix convolution

Hello,

How to do matrix convolution for data elements using OpenCL with C.

0 Kudos
Reply
5 Replies
himanshu_gautam
Grandmaster

Re: matrix convolution

Hi

I am not clear whether you know Convolution and just asking for opencl implemention or vice versa

Any ways

Here is a link for matrix convolution. you can go through this to get to know about matrix convolution

http://www.r2labs.org/references/Convolution.pdf

If you wanted to know opencl implementation

you can go through opencl programming guide and samples form the installed folder.

http://developer.amd.com/wordpress/media/2013/07/AMD_Accelerated_Parallel_Processing_OpenCL_Programm...

0 Kudos
Reply
arunad
Journeyman III

Re: matrix convolution

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.

0 Kudos
Reply
himanshu_gautam
Grandmaster

Re: matrix convolution


Hi,

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

arunad
Journeyman III

Re: matrix convolution

Thanks Himanshu for the links and info, it is much appreciated and  hope you'll help me if any problem incur.

0 Kudos
Reply
himanshu_gautam
Grandmaster

Re: matrix convolution

You are welcome. shall i mark this thread as answered. Or yourself can only do that.

0 Kudos
Reply