mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-12-22 20:36:01 +01:00
Fixed DGEMM
This commit is contained in:
parent
b3e3b0b6dc
commit
1a713455f8
@ -23,7 +23,8 @@ int main() {
|
||||
|
||||
** ~qmckl_dgemm~
|
||||
|
||||
Matrix multiply l$C_{ij} = \beta C_{ij} + \alpha \sum_{k} A_{ik} \cdot B_{kj}$ using Fortran ~matmul~ function.
|
||||
Matrix multiply: $C_{ij} = \beta C_{ij} + \alpha \sum_{k} A_{ik} \cdot B_{kj}$ using Fortran ~matmul~ function.
|
||||
|
||||
TODO: Add description about the external library dependence.
|
||||
|
||||
#+NAME: qmckl_dgemm_args
|
||||
@ -161,11 +162,23 @@ integer function qmckl_dgemm_f(context, TransA, TransB, m, n, k, alpha, A, LDA,
|
||||
endif
|
||||
|
||||
if (TransA) then
|
||||
C = matmul(AT,B)
|
||||
if (alpha == 1.d0 && beta == 0.d0) then
|
||||
C = matmul(AT,B)
|
||||
else
|
||||
C = beta*C + alpha*matmul(AT,B)
|
||||
endif
|
||||
else if (TransB) then
|
||||
C = matmul(A,BT)
|
||||
if (alpha == 1.d0 && beta == 0.d0) then
|
||||
C = matmul(A,BT)
|
||||
else
|
||||
C = beta*C + alpha*matmul(A,BT)
|
||||
endif
|
||||
else
|
||||
C = matmul(A,B)
|
||||
if (alpha == 1.d0 && beta == 0.d0) then
|
||||
C = matmul(A,B)
|
||||
else
|
||||
C = beta*C + alpha*matmul(A,B)
|
||||
endif
|
||||
endif
|
||||
end function qmckl_dgemm_f
|
||||
#+end_src
|
||||
|
Loading…
Reference in New Issue
Block a user