Hello!
I wrote this routine that takes two 3D arrays and performs a multiplication.......
function matmull(a,b)
! This in-line function performs array muliplication of two 3-D arrays
double precision :: a,:,,b,:,
double precision :: matmull(size(a,1),size(b,3))
integer i
matmull=0.0
do i=1,size(b,2)
matmull=matmull + matmul(a,:,i),b,i,)
enddo
end function matmull
I'd like to use the BLAS routine DGEMM that should be faster than the previous one, but it doesn't works:
function matmull(a,b)
! This in-line function performs array multiplication of two 3-D arrays
double precision :: a,:,,b,:,
double precision :: matmull(size(a,1),size(b,3))
integer :: M,N,K
M=size(a,1)
N=size(b,3)
K=size(a,3)*size(a,3)
CALL DGEMM('N','N',M,N,K,1.0,a,M,b,K,0.0,matmull,M)
end function matmull
Where is the mistake? I think there is a problem with the index of a but I'm not shure......
Thank you for the help.
I
I wrote this routine that takes two 3D arrays and performs a multiplication.......
function matmull(a,b)
! This in-line function performs array muliplication of two 3-D arrays
double precision :: a,:,,b,:,
double precision :: matmull(size(a,1),size(b,3))
integer i
matmull=0.0
do i=1,size(b,2)
matmull=matmull + matmul(a,:,i),b,i,)
enddo
end function matmull
I'd like to use the BLAS routine DGEMM that should be faster than the previous one, but it doesn't works:
function matmull(a,b)
! This in-line function performs array multiplication of two 3-D arrays
double precision :: a,:,,b,:,
double precision :: matmull(size(a,1),size(b,3))
integer :: M,N,K
M=size(a,1)
N=size(b,3)
K=size(a,3)*size(a,3)
CALL DGEMM('N','N',M,N,K,1.0,a,M,b,K,0.0,matmull,M)
end function matmull
Where is the mistake? I think there is a problem with the index of a but I'm not shure......
Thank you for the help.
I