13 integer,
intent(in) :: nv, nu
14 real(kind=
rp),
intent(inout) :: v(nv*nv), u(nu*nu)
15 real(kind=
rp),
intent(inout) :: a(nv,nu), bt(nu,nv)
16 real(kind=
rp) :: work(0:nu**2*nv)
18 call mxm(a, nv, u, nu, work, nu)
19 call mxm(work, nv, bt, nu, v, nv)
24 integer,
intent(in) :: nv, nu
25 real(kind=
rp),
intent(inout) :: v(nv*nv*nv), u(nu*nu*nu)
26 real(kind=
rp),
intent(inout) :: a(nv,nu),bt(nu, nv),ct(nu,nv)
27 real(kind=
rp) :: work(nu**2*nv), work2(nu*nv**2)
29 integer :: i, j, k, l, nunu, nvnu, nvnv
40 tmp = tmp + a(i,k) * u(k + nu * (j - 1))
49 ii = l + nv * (j - 1) + nvnv * (i - 1)
52 jj = l + nv * (k - 1) + nvnu * (i - 1)
53 tmp = tmp + work(jj) * bt(k,j)
62 jj = i + nvnv * (j - 1)
65 ii = i + nvnv * (k - 1)
66 tmp = tmp + work2(ii) * ct(k, j)
75 integer,
intent(in) :: nv, nu, nelv
76 real(kind=
rp),
intent(inout) :: v(nv*nv*nv,nelv), u(nu*nu*nu,nelv)
77 real(kind=
rp),
intent(inout) :: a(nv,nu), bt(nu, nv), ct(nu,nv)
79 if (nu .eq. 2 .and. nv .eq. 4)
then
81 else if (nu .eq. 4)
then
90 integer,
intent(in) :: nv, nu, nelv
91 real(kind=
rp),
intent(inout) :: v(nv*nv*nv,nelv), u(nu*nu*nu,nelv)
92 real(kind=
rp),
intent(inout) :: a(nv,nu), bt(nu, nv), ct(nu,nv)
93 real(kind=
rp) :: work(nu**2*nv), work2(nu*nv**2), tmp
94 integer :: ie, i, j, k, l, ii, jj
95 integer :: nunu, nvnu, nvnv
104 ii = i + nv * (j - 1)
107 tmp = tmp + a(i,k) * u(k + nu * (j - 1), ie)
116 ii = l + nv * (j - 1) + nvnv * (i - 1)
119 jj = l + nv * (k - 1) + nvnu * (i - 1)
120 tmp = tmp + work(jj) * bt(k,j)
129 jj = i + nvnv * (j - 1)
132 ii = i + nvnv * (k - 1)
133 tmp = tmp + work2(ii) * ct(k, j)
143 integer,
parameter :: nu = 2
144 integer,
parameter :: nv = 4
145 integer,
parameter :: nunu = 4
146 integer,
parameter :: nvnu = 8
147 integer,
parameter :: nvnv = 16
148 integer,
intent(in) :: nelv
149 real(kind=
rp),
intent(inout) :: v(nv*nv*nv,nelv), u(nu*nu*nu,nelv)
150 real(kind=
rp),
intent(inout) :: a(nv,nu), bt(nu, nv), ct(nu,nv)
151 real(kind=
rp) :: work(nu**2*nv,nelv), work2(nu*nv**2,nelv), tmp
152 integer :: ie, i, j, k, l, ii, jj
158 ii = i + nv * (j - 1)
159 work(ii, ie) = a(i,1) * u(1 + nu * (j - 1), ie) &
160 + a(i,2) * u(2 + nu * (j - 1), ie)
169 ii = l + nv * (j - 1) + nvnv * (i - 1)
173 jj = l + nv * (k - 1) + nvnu * (i - 1)
174 tmp = tmp + work(jj,ie) * bt(k,j)
185 jj = i + nvnv * (j - 1)
186 v(jj, ie) = work2(i + nvnv * (1 - 1),ie) * ct(1, j) &
187 + work2(i + nvnv * (2 - 1),ie) * ct(2, j)
195 integer,
parameter :: nu = 4
196 integer,
parameter :: nunu = 16
197 integer,
intent(in) :: nv, nelv
198 real(kind=
rp),
intent(inout) :: v(nv*nv*nv,nelv), u(nu*nu*nu,nelv)
199 real(kind=
rp),
intent(inout) :: a(nv,nu), bt(nu, nv), ct(nu,nv)
200 real(kind=
rp) :: work(nu**2*nv, nelv), work2(nu*nv**2, nelv), tmp
201 integer :: ie, i, j, k, l, ii, jj
202 integer :: nvnu, nvnv
210 ii = i + nv * (j - 1)
211 work(ii, ie) = a(i,1) * u(1 + nu * (j - 1), ie) &
212 + a(i,2) * u(2 + nu * (j - 1), ie) &
213 + a(i,3) * u(3 + nu * (j - 1), ie) &
214 + a(i,4) * u(4 + nu * (j - 1), ie)
223 ii = l + nv * (j - 1) + nvnv * (i - 1)
227 jj = l + nv * (k - 1) + nvnu * (i - 1)
228 tmp = tmp + work(jj,ie) * bt(k,j)
239 jj = i + nvnv * (j - 1)
240 v(jj, ie) = work2(i + nvnv * (1 - 1),ie) * ct(1, j) &
241 + work2(i + nvnv * (2 - 1),ie) * ct(2, j) &
242 + work2(i + nvnv * (3 - 1),ie) * ct(3, j) &
243 + work2(i + nvnv * (4 - 1),ie) * ct(4, j)
251 integer,
intent(in) :: nv, nu, nelv
252 real(kind=
rp),
intent(inout) :: v(nv*nv*nv*nelv)
253 real(kind=
rp),
intent(inout) :: a(nv,nu), bt(nu, nv), ct(nu,nv)
256 if (nu .eq. 4 .and. nv .eq. 2)
then
265 integer,
intent(in) :: nv, nu, nelv
266 real(kind=
rp),
intent(inout) :: v(nv*nv*nv*nelv)
267 real(kind=
rp),
intent(inout) :: a(nv,nu), bt(nu, nv), ct(nu,nv)
268 real(kind=
rp) :: work(nu**2*nv), work2(nu*nv**2)
269 integer :: e, e0, ee, es, iu, iv, nu3, nv3
270 integer :: i, j, k, l, ii, jj, kk
271 integer :: nunu, nvnu, nvnv
297 ii = i + nv * (j - 1)
300 kk = k + nu * (j - 1) + iu
301 tmp = tmp + a(i,k) * v(kk)
310 ii = l + nv * (j - 1) + nvnv * (i - 1)
313 jj = l + nv * (k - 1) + nvnu * (i - 1)
314 tmp = tmp + work(jj) * bt(k,j)
323 jj = i + nvnv * (j - 1) + iv
326 ii = i + nvnv * (k - 1)
327 tmp = tmp + work2(ii) * ct(k, j)
337 integer,
parameter :: nu = 4
338 integer,
parameter :: nv = 2
339 integer,
parameter :: nunu = 16
340 integer,
parameter :: nvnu = 8
341 integer,
parameter :: nvnv = 4
342 integer,
parameter :: nununu = 64
343 integer,
parameter :: nvnvnv = 8
344 integer,
intent(in) :: nelv
345 real(kind=
rp),
intent(inout) :: v(nv*nv*nv*nelv)
346 real(kind=
rp),
intent(inout) :: a(nv,nu), bt(nu, nv), ct(nu,nv)
347 real(kind=
rp) :: work(nu**2*nv,nelv), work2(nu*nv**2,nelv)
348 integer :: ie, iu, iv
349 integer :: i, j, k, l, ii, jj
356 ii = i + nv * (j - 1)
357 work(ii, ie) = a(i,1) * v(1 + nu * (j - 1) + iu) &
358 + a(i,2) * v(2 + nu * (j - 1) + iu) &
359 + a(i,3) * v(3 + nu * (j - 1) + iu) &
360 + a(i,4) * v(4 + nu * (j - 1) + iu)
369 ii = l + nv * (j - 1) + nvnv * (i - 1)
373 jj = l + nv * (k - 1) + nvnu * (i - 1)
374 tmp = tmp + work(jj,ie) * bt(k,j)
386 jj = i + nvnv * (j - 1) + iv
387 v(jj) = work2(i + nvnv * (1 - 1),ie) * ct(1, j) &
388 + work2(i + nvnv * (2 - 1),ie) * ct(2, j) &
389 + work2(i + nvnv * (3 - 1),ie) * ct(3, j) &
390 + work2(i + nvnv * (4 - 1),ie) * ct(4, j)
Wrapper for all matrix-matrix product implementations.
subroutine, public mxm(a, n1, b, n2, c, n3)
Compute matrix-matrix product for contiguously packed matrices A,B, and C.
integer, parameter, public rp
Global precision used in computations.
Tensor operations SX-Aurora backend.
subroutine tnsr3d_nu2nv4_sx(v, u, A, Bt, Ct, nelv)
subroutine, public tnsr2d_el_sx(v, nv, u, nu, A, Bt)
subroutine tnsr3d_nvnu_sx(v, nv, u, nu, A, Bt, Ct, nelv)
subroutine, public tnsr1_3d_sx(v, nv, nu, A, Bt, Ct, nelv)
subroutine tnsr1_3d_nvnu_sx(v, nv, nu, A, Bt, Ct, nelv)
subroutine tnsr1_3d_nu4nv2_sx(v, A, Bt, Ct, nelv)
subroutine, public tnsr3d_el_sx(v, nv, u, nu, A, Bt, Ct)
subroutine, public tnsr3d_sx(v, nv, u, nu, A, Bt, Ct, nelv)
subroutine tnsr3d_nu4_sx(v, nv, u, A, Bt, Ct, nelv)