6 use libxsmm,
only : libxsmm_available, libxsmm_dispatch, &
7 libxsmm_dmmcall_abc, libxsmm_dmmfunction, libxsmm_smmcall_abc, &
8 libxsmm_smmfunction, libxsmm_prefetch
30 subroutine mxm(a, n1, b, n2, c, n3)
31 integer,
intent(in) :: n1, n2, n3
32 real(kind=
rp),
intent(in) :: a(n1, n2)
33 real(kind=
rp),
intent(in) :: b(n2, n3)
34 real(kind=
rp),
intent(inout) :: c(n1, n3)
45 integer,
intent(in) :: n1, n2, n3
46 real(kind=
sp),
intent(in) :: a(n1, n2)
47 real(kind=
sp),
intent(in) :: b(n2, n3)
48 real(kind=
sp),
intent(inout) :: c(n1, n3)
50 call sgemm(
'N',
'N', n1, n3, n2, 1.0, a, n1, b, n2, 0.0, c, n1)
55 integer,
intent(in) :: n1, n2, n3
56 real(kind=
dp),
intent(in) :: a(n1, n2)
57 real(kind=
dp),
intent(in) :: b(n2, n3)
58 real(kind=
dp),
intent(inout) :: c(n1, n3)
60 call dgemm(
'N',
'N', n1, n3, n2, 1d0, a, n1, b, n2, 0d0, c, n1)
65 integer,
intent(in) :: n1, n2, n3
66 real(kind=
qp),
intent(in) :: a(n1, n2)
67 real(kind=
qp),
intent(in) :: b(n2, n3)
68 real(kind=
qp),
intent(inout) :: c(n1, n3)
75 integer,
intent(in) :: n1, n2, n3
76 real(kind=
sp),
intent(in) :: a(n1, n2)
77 real(kind=
sp),
intent(in) :: b(n2, n3)
78 real(kind=
sp),
intent(inout) :: c(n1, n3)
80 type(libxsmm_smmfunction) :: xmm
82 call libxsmm_dispatch(xmm, n1, n3, n2, &
83 alpha = 1.0, beta = 0.0, prefetch = libxsmm_prefetch)
84 if (libxsmm_available(xmm))
then
85 call libxsmm_smmcall_abc(xmm, a, b, c)
92 integer,
intent(in) :: n1, n2, n3
93 real(kind=
dp),
intent(in) :: a(n1, n2)
94 real(kind=
dp),
intent(in) :: b(n2, n3)
95 real(kind=
dp),
intent(inout) :: c(n1, n3)
97 type(libxsmm_dmmfunction) :: xmm
99 call libxsmm_dispatch(xmm, n1, n3, n2, &
100 alpha = 1d0, beta = 0d0, prefetch = libxsmm_prefetch)
101 if (libxsmm_available(xmm))
then
102 call libxsmm_dmmcall_abc(xmm, a, b, c)
109 integer,
intent(in) :: n1, n2, n3
110 real(kind=
qp),
intent(in) :: a(n1, n2)
111 real(kind=
qp),
intent(in) :: b(n2, n3)
112 real(kind=
qp),
intent(inout) :: c(n1, n3)
Wrapper for all matrix-matrix product implementations.
subroutine, private mxm_blas_sp(a, n1, b, n2, c, n3)
subroutine, private mxm_libxsmm_dp(a, n1, b, n2, c, n3)
subroutine, private mxm_blas_dp(a, n1, b, n2, c, n3)
subroutine, private mxm_libxsmm_sp(a, n1, b, n2, c, n3)
subroutine, private mxm_blas_qp(a, n1, b, n2, c, n3)
subroutine, public mxm(a, n1, b, n2, c, n3)
Compute matrix-matrix product for contiguously packed matrices A,B, and C.
subroutine, private mxm_libxsmm_qp(a, n1, b, n2, c, n3)
integer, parameter, public qp
integer, parameter, public dp
integer, parameter, public sp
integer, parameter, public rp
Global precision used in computations.