AnsweredAssumed Answered

Matrix Multiplication in TS201

Question asked by Mahendran on Oct 6, 2009
Latest reply on Oct 8, 2009 by AndyM

Hi

 

Iam trying to use the In-built function cmatmmltf  matrix multiplication in TS201

I need to pass the matix values from memory (tiger sharc internal memory) and perform

matrix multiplication and result should be stored in memory

The code is shown below

 

#include <Tigersharc.h>
#include <signal.h>
#include <matrix.h>

void main()

{  
    const complex_float *a = (complex_float *) 0x140000; /* Pointer to input matrix a[][] */
    int n = 2; /* Number of rows in matrix a[][] */
    int k =2; /* Number of columns in matrix a[][] */
    const complex_float *b  = (complex_float *) 0x140004;; /* Pointer to input matrix b[][] */
    int m = 2;  /* Number of columns in matrix b[][] */
    complex_float *c = (complex_float *) 0x140008; /* Pointer to matrix c[][] */

    cmatmmltf (a,n,k,b,m,c);

 

}

 

I need to pass  a[2][2] = {1.0  1.0      and b[2][2] = { 1.0  1.0

                                     1.0  1.0 }                          1.0  1.0 }

 

Is the above method of using the matrix function is correct ? Becaz Iam not getting the expected result at 0x140008

 

Mahendran

Outcomes