Multiplication and Addition

Hi,

I have a linear array of float2 of size (m * n) and a linear array of float2 of size (m). For every m elements of the first array, they have to multiply with the m elements of the second array. The output array will be a linear array of float2 of size (m * n).

Next, every m elements of the output array will have to be added together. The final output array will be a linear array of size (n).

m and n may or may not be multiples of 2 or 32 or 64.

I have looked at the multiplication example in the programming guide, but it don’t really fit into my question.

Is there any examples or guides out there that I can take reference to? Or maybe some of you guys have some ideas or code?

Thanks alot!