davidb
Joined: 17 Jul 2009 Posts: 560 Location: UK
|
Posted: Sun Mar 08, 2015 4:34 pm Post subject: |
|
|
It is difficult to know what is being asked here. Help with the maths or help with code?
MATMUL can be used in 3 ways (using numeric data).
(1) If A has shape (M,K) and B has shape (K,N), C will have shape (M,N)
(2) If A has shape (K) and B has shape (K,M), C will have shape (M)
(3) If A has shape (N, K) and B has shape (K), C will have shape (N)
(1) C(i,j) has the value SUM(A(i,:)*B(:,j)
(2) C(j) has the value SUM(A(:)*B(:,j))
(3) C(i) has the value SUM(A(i,:)*B(:)) _________________ Programmer in: Fortran 77/95/2003/2008, C, C++ (& OpenMP), java, Python, Perl |
|