Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.
6621 Discussions

Best way to mulitply matrices nxm times mxp where n,m small & p is large?


Dear Folks,

For a computer vision operation, I need to multiply about 700,000 3-element vectors by a 3 x 3 matrix. I.e. Q is 3 rows by 3 columns. My 700k 3-vectors are arranged in a list that is, essentially a 3 row by 700000 column matrix, V. I want to compute U = QV where U is likewise 3 x 700k. Using the small matrix library I could do this in a loop that multiplies each vector independently. Since V is, essentially, a vector-valued signal, would it make sense to use the signal processing library? There does not appear to be a matrix multiply defined in the lib, but it could be done, perhaps, using a filter. Another approach might be to use the color conversion routines. That is I could define the V matrix as a 3-channel image (in fact the vectors are taken from an image) and use the matrix Q as the color conversion matrix. It does not look like there is, however, a color converter that allows one to supply their own matrix.

What do you think is the fastest way to do the calculations?

0 Kudos
1 Reply
our expert recommend you to take a look on ippmMul_mva_32f function which may do tha task you described (Ipp32f data type)