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)
77 real(kind=
rp),
intent(in) :: u(nu*nu*nu,nelv)
78 real(kind=
rp),
intent(in) :: a(nv,nu), bt(nu, nv), ct(nu,nv)
80 if (nu .eq. 2 .and. nv .eq. 4)
then
82 else if (nu .eq. 4)
then
91 integer,
intent(in) :: nv, nu, nelv
92 real(kind=
rp),
intent(inout) :: v(nv*nv*nv,nelv)
93 real(kind=
rp),
intent(in) :: u(nu*nu*nu,nelv)
94 real(kind=
rp),
intent(in) :: a(nv,nu), bt(nu, nv), ct(nu,nv)
95 real(kind=
rp) :: work(nu**2*nv), work2(nu*nv**2), tmp
96 integer :: ie, i, j, k, l, ii, jj
97 integer :: nunu, nvnu, nvnv
106 ii = i + nv * (j - 1)
109 tmp = tmp + a(i,k) * u(k + nu * (j - 1), ie)
118 ii = l + nv * (j - 1) + nvnv * (i - 1)
121 jj = l + nv * (k - 1) + nvnu * (i - 1)
122 tmp = tmp + work(jj) * bt(k,j)
131 jj = i + nvnv * (j - 1)
134 ii = i + nvnv * (k - 1)
135 tmp = tmp + work2(ii) * ct(k, j)
145 integer,
parameter :: nu = 2
146 integer,
parameter :: nv = 4
147 integer,
parameter :: nunu = 4
148 integer,
parameter :: nvnu = 8
149 integer,
parameter :: nvnv = 16
150 integer,
intent(in) :: nelv
151 real(kind=
rp),
intent(inout) :: v(nv*nv*nv,nelv)
152 real(kind=
rp),
intent(in) :: u(nu*nu*nu,nelv)
153 real(kind=
rp),
intent(in) :: a(nv,nu), bt(nu, nv), ct(nu,nv)
154 real(kind=
rp) :: work(nu**2*nv,nelv), work2(nu*nv**2,nelv), tmp
155 integer :: ie, i, j, k, l, ii, jj
161 ii = i + nv * (j - 1)
162 work(ii, ie) = a(i,1) * u(1 + nu * (j - 1), ie) &
163 + a(i,2) * u(2 + nu * (j - 1), ie)
172 ii = l + nv * (j - 1) + nvnv * (i - 1)
176 jj = l + nv * (k - 1) + nvnu * (i - 1)
177 tmp = tmp + work(jj,ie) * bt(k,j)
188 jj = i + nvnv * (j - 1)
189 v(jj, ie) = work2(i + nvnv * (1 - 1),ie) * ct(1, j) &
190 + work2(i + nvnv * (2 - 1),ie) * ct(2, j)
198 integer,
parameter :: nu = 4
199 integer,
parameter :: nunu = 16
200 integer,
intent(in) :: nv, nelv
201 real(kind=
rp),
intent(inout) :: v(nv*nv*nv,nelv)
202 real(kind=
rp),
intent(in) :: u(nu*nu*nu,nelv)
203 real(kind=
rp),
intent(in) :: a(nv,nu), bt(nu, nv), ct(nu,nv)
204 real(kind=
rp) :: work(nu**2*nv, nelv), work2(nu*nv**2, nelv), tmp
205 integer :: ie, i, j, k, l, ii, jj
206 integer :: nvnu, nvnv
214 ii = i + nv * (j - 1)
215 work(ii, ie) = a(i,1) * u(1 + nu * (j - 1), ie) &
216 + a(i,2) * u(2 + nu * (j - 1), ie) &
217 + a(i,3) * u(3 + nu * (j - 1), ie) &
218 + a(i,4) * u(4 + nu * (j - 1), ie)
227 ii = l + nv * (j - 1) + nvnv * (i - 1)
231 jj = l + nv * (k - 1) + nvnu * (i - 1)
232 tmp = tmp + work(jj,ie) * bt(k,j)
243 jj = i + nvnv * (j - 1)
244 v(jj, ie) = work2(i + nvnv * (1 - 1),ie) * ct(1, j) &
245 + work2(i + nvnv * (2 - 1),ie) * ct(2, j) &
246 + work2(i + nvnv * (3 - 1),ie) * ct(3, j) &
247 + work2(i + nvnv * (4 - 1),ie) * ct(4, j)
255 integer,
intent(in) :: nv, nu, nelv
256 real(kind=
rp),
intent(inout) :: v(nv*nv*nv*nelv)
257 real(kind=
rp),
intent(inout) :: a(nv,nu), bt(nu, nv), ct(nu,nv)
260 if (nu .eq. 4 .and. nv .eq. 2)
then
269 integer,
intent(in) :: nv, nu, nelv
270 real(kind=
rp),
intent(inout) :: v(nv*nv*nv*nelv)
271 real(kind=
rp),
intent(inout) :: a(nv,nu), bt(nu, nv), ct(nu,nv)
272 real(kind=
rp) :: work(nu**2*nv), work2(nu*nv**2)
273 integer :: e, e0, ee, es, iu, iv, nu3, nv3
274 integer :: i, j, k, l, ii, jj, kk
275 integer :: nunu, nvnu, nvnv
301 ii = i + nv * (j - 1)
304 kk = k + nu * (j - 1) + iu
305 tmp = tmp + a(i,k) * v(kk)
314 ii = l + nv * (j - 1) + nvnv * (i - 1)
317 jj = l + nv * (k - 1) + nvnu * (i - 1)
318 tmp = tmp + work(jj) * bt(k,j)
327 jj = i + nvnv * (j - 1) + iv
330 ii = i + nvnv * (k - 1)
331 tmp = tmp + work2(ii) * ct(k, j)
341 integer,
parameter :: nu = 4
342 integer,
parameter :: nv = 2
343 integer,
parameter :: nunu = 16
344 integer,
parameter :: nvnu = 8
345 integer,
parameter :: nvnv = 4
346 integer,
parameter :: nununu = 64
347 integer,
parameter :: nvnvnv = 8
348 integer,
intent(in) :: nelv
349 real(kind=
rp),
intent(inout) :: v(nv*nv*nv*nelv)
350 real(kind=
rp),
intent(inout) :: a(nv,nu), bt(nu, nv), ct(nu,nv)
351 real(kind=
rp) :: work(nu**2*nv,nelv), work2(nu*nv**2,nelv)
352 integer :: ie, iu, iv
353 integer :: i, j, k, l, ii, jj
360 ii = i + nv * (j - 1)
361 work(ii, ie) = a(i,1) * v(1 + nu * (j - 1) + iu) &
362 + a(i,2) * v(2 + nu * (j - 1) + iu) &
363 + a(i,3) * v(3 + nu * (j - 1) + iu) &
364 + a(i,4) * v(4 + nu * (j - 1) + iu)
373 ii = l + nv * (j - 1) + nvnv * (i - 1)
377 jj = l + nv * (k - 1) + nvnu * (i - 1)
378 tmp = tmp + work(jj,ie) * bt(k,j)
390 jj = i + nvnv * (j - 1) + iv
391 v(jj) = work2(i + nvnv * (1 - 1),ie) * ct(1, j) &
392 + work2(i + nvnv * (2 - 1),ie) * ct(2, j) &
393 + work2(i + nvnv * (3 - 1),ie) * ct(3, j) &
394 + 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, public tnsr1_3d_sx(v, nv, nu, a, bt, ct, nelv)
subroutine tnsr3d_nvnu_sx(v, nv, u, nu, a, bt, ct, nelv)
subroutine, public tnsr3d_sx(v, nv, u, nu, a, bt, ct, nelv)
subroutine tnsr3d_nu2nv4_sx(v, u, a, bt, ct, nelv)
subroutine tnsr1_3d_nu4nv2_sx(v, a, bt, ct, nelv)
subroutine, public tnsr2d_el_sx(v, nv, u, nu, a, bt)
subroutine tnsr3d_nu4_sx(v, nv, u, a, bt, ct, nelv)
subroutine tnsr1_3d_nvnu_sx(v, nv, nu, a, bt, ct, nelv)
subroutine, public tnsr3d_el_sx(v, nv, u, nu, a, bt, ct)