TI E2E Community
Digital Signal Processors (DSP)
C6000 Multicore DSP
Keystone Multicore Forum (C66, 66A, AM5)
DSPlib - Matrix mul
For my project, I have to make lot of matrix operation (mul, transpose, inverse). Concerning matrix mul, rather than develop my own function, I trying to use DSPlib function (DSPF_sp_mat_mul). But this function work only with : "All r1, c1, c2 are assumed to be multiple of 2 and >=2".
I need to make some (4x3 * 3x1) or (3x3 * 3x3) matrix mul for exemple. Can I use some optimize functions from DSPlib ? Or I need to develop my own function ?
I work on 6678 DSP.
Thanking you in advance
you need to modify original code of DSPF_sp_mat_mul (use it for example).
1. make decomposition of matrix-multiply (3x3) A*B = a01*b01+a02*b02+a03*b03,........ , then look for elements of matrix A and B, which are being used at same time in different operands (main focus - one load from memory == few computations, due to limitations of block .D)
for example: max. performance of complex dotp is about 1.03 cycles per 1 complex multiply
max. performance of complex mat_mul is about 0.58 cycles per 1 complex multiply
2. in the loop perform computations for your sub-matrix
i suggest it gonna take (theory) about 3-4 dsp cycles per one matrix mul 3x3 x 3x3 (3*3*3=27 multiplications, 18 additions)
DSP can perform 8 float mults and 8 float adds => 27/8 = 3.375
Thank you for your answer.
So I can't use some DSPlib, I must write my own code ?
I am going to looking for DSPF_sp_mat_mul source code.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.