Quantcast
Channel: Intel® Software - Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
Viewing all articles
Browse latest Browse all 3005

Matrix product with MKL

$
0
0

Hi,

I want to do a complicated matrix product which is defined as

C[i,j]  = \sum_{n,m} A[i,n]*A[j,n]* B[n,m] *A[i,m]*A[j,m] 

 Where A and B are two matrix with size of NxN, (N~1000).

To accomplish this task I just run four loops to creat the matrix C .

for(int i=0;i<ndim;i++)

for(int j=0;j<ndim;j++)

for(int n=0;n<ndim;n++)

for(int m=0;m<ndim;m++)

C[i,j]  +=  A[i,n]*A[j,n]* B[n,m] *A[i,m]*A[j,m]

 

Can anyone suggest any better implementation using MKL matrix product function?

Thanks in advance.

 

 


Viewing all articles
Browse latest Browse all 3005

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>