34 use,
intrinsic :: iso_c_binding, only : c_ptr, c_int
38 use mpi_f08,
only : mpi_sum, mpi_min, mpi_max, mpi_in_place, mpi_allreduce
78 type(c_ptr) :: a_d, b_d
80 type(c_ptr),
optional :: strm
85 if (
present(strm))
then
100 call neko_error(
'no device backend configured')
107 type(c_ptr) :: a_d, b_d, mask_d
109 type(c_ptr),
optional :: strm
112 if (n .lt. 1 .or. n_mask .lt. 1)
return
114 if (
present(strm))
then
129 call neko_error(
'no device backend configured')
136 type(c_ptr) :: a_d, b_d, mask_d
138 type(c_ptr),
optional :: strm
141 if (n .lt. 1 .or. n_mask .lt. 1)
return
143 if (
present(strm))
then
156 call neko_error(
'no device backend configured')
162 type(c_ptr) :: a_d, b_d, mask_d
164 type(c_ptr),
optional :: strm
167 if (n .lt. 1 .or. n_mask .lt. 1)
return
169 if (
present(strm))
then
184 call neko_error(
'no device backend configured')
190 n2, lx, ly, lz, n_mask, strm)
191 type(c_ptr) :: a_d, b_d, mask_d, facet_d
192 integer :: n1, n2, lx, ly, lz, n_mask
193 type(c_ptr),
optional :: strm
196 if (n_mask .lt. 1)
return
198 if (
present(strm))
then
206 ly, lz, n_mask, strm_)
209 ly, lz, n_mask, strm_)
212 lx, ly, lz, n_mask, strm_)
215 lx, ly, lz, n_mask, strm_)
217 call neko_error(
'no device backend configured')
225 type(c_ptr) :: a_d, b_d, mask_d
227 type(c_ptr),
optional :: strm
230 if (n .lt. 1 .or. n_mask .lt. 1)
return
232 if (
present(strm))
then
247 call neko_error(
'no device backend configured')
253 type(c_ptr) :: a_d, b_d, mask_d
255 type(c_ptr),
optional :: strm
258 if (n .lt. 1 .or. n_mask .lt. 1)
return
260 if (
present(strm))
then
275 call neko_error(
'no device backend configured')
283 type(c_ptr) :: a_d, b_d, mask_d
285 type(c_ptr),
optional :: strm
288 if (n .lt. 1 .or. n_mask .lt. 1)
return
290 if (
present(strm))
then
305 call neko_error(
'no device backend configured')
310 type(c_ptr) :: a_d, b_d, mask_d
312 type(c_ptr),
optional :: strm
315 if (n .lt. 1 .or. n_mask .lt. 1)
return
317 if (
present(strm))
then
328 call neko_error(
'No OpenCL bcknd, masked atomic reduction')
332 call neko_error(
'no device backend configured')
340 real(kind=
rp),
intent(in) :: c
342 type(c_ptr) :: mask_d
344 type(c_ptr),
optional :: strm
347 if (n .lt. 1 .or. n_mask .lt. 1)
return
349 if (
present(strm))
then
364 call neko_error(
'No device backend configured')
372 type(c_ptr),
optional :: strm
377 if (
present(strm))
then
392 call neko_error(
'No device backend configured')
400 type(c_ptr),
optional :: strm
402 real(kind=
rp),
parameter :: one = 1.0_rp
406 if (
present(strm))
then
412#if HAVE_HIP || HAVE_CUDA || HAVE_OPENCL || HAVE_METAL
415 call neko_error(
'No device backend configured')
422 real(kind=
rp),
intent(in) :: c
424 type(c_ptr),
optional :: strm
429 if (
present(strm))
then
444 call neko_error(
'No device backend configured')
450 type(c_ptr) :: a_d, b_d
451 real(kind=
rp),
intent(in) :: c
453 type(c_ptr),
optional :: strm
458 if (
present(strm))
then
473 call neko_error(
'No device backend configured')
480 real(kind=
rp),
intent(in) :: c
482 type(c_ptr),
optional :: strm
485 if (
present(strm))
then
500 call neko_error(
'No device backend configured')
506 type(c_ptr) :: a_d, b_d
507 real(kind=
rp),
intent(in) :: c
509 type(c_ptr),
optional :: strm
512 if (
present(strm))
then
527 call neko_error(
'No device backend configured')
534 real(kind=
rp),
intent(in) :: c
536 type(c_ptr),
optional :: strm
541 if (
present(strm))
then
556 call neko_error(
'No device backend configured')
564 real(kind=
rp),
intent(in) :: c
566 type(c_ptr),
optional :: strm
571 if (
present(strm))
then
586 call neko_error(
'No device backend configured')
593 real(kind=
rp),
intent(in) :: min_val, max_val
595 type(c_ptr),
optional :: strm
598 if (n .lt. 1 .or. max_val .le. min_val)
return
600 if (
present(strm))
then
607 call hip_cwrap(a_d, min_val, max_val, n, strm_)
609 call cuda_cwrap(a_d, min_val, max_val, n, strm_)
615 call neko_error(
'No device backend configured')
623 type(c_ptr),
optional :: strm
628 if (
present(strm))
then
641 call neko_error(
'No device backend configured')
647 type(c_ptr) :: ap_d, a_d
648 real(kind=
rp),
intent(in) :: p
650 type(c_ptr),
optional :: strm
655 if (
present(strm))
then
668 call neko_error(
'No device backend configured')
675 real(kind=
rp),
intent(in) :: c
677 type(c_ptr),
optional ::strm
682 if (
present(strm))
then
697 call neko_error(
'No device backend configured')
703 type(c_ptr) :: a_d, b_d
705 type(c_ptr),
optional :: strm
710 if (
present(strm))
then
725 call neko_error(
'No device backend configured')
730 type(c_ptr) :: a_d, b_d, c_d, d_d
732 type(c_ptr),
optional :: strm
737 if (
present(strm))
then
744 call hip_add4(a_d, b_d, c_d, d_d, n, strm_)
746 call cuda_add4(a_d, b_d, c_d, d_d, n, strm_)
752 call neko_error(
'No device backend configured')
757 type(c_ptr) :: a_d, b_d
760 type(c_ptr),
optional :: strm
765 if (
present(strm))
then
780 call neko_error(
'No device backend configured')
787 type(c_ptr) :: a_d, b_d
790 type(c_ptr),
optional :: strm
795 if (
present(strm))
then
810 call neko_error(
'No device backend configured')
816 type(c_ptr) :: a_d, b_d
819 type(c_ptr),
optional :: strm
824 if (
present(strm))
then
839 call neko_error(
'No device backend configured')
845 type(c_ptr) :: a_d, b_d, c_d
847 type(c_ptr),
optional :: strm
852 if (
present(strm))
then
859 call hip_add3(a_d, b_d, c_d, n, strm_)
867 call neko_error(
'No device backend configured')
873 type(c_ptr) :: a_d, b_d, c_d
874 real(kind=
rp) :: c1, c2
876 type(c_ptr),
optional :: strm
881 if (
present(strm))
then
888 call hip_add3s2(a_d, b_d, c_d, c1, c2, n, strm_)
896 call neko_error(
'No device backend configured')
902 type(c_ptr) :: a_d, b_d, c_d, d_d
903 real(kind=
rp) :: c1, c2, c3
905 type(c_ptr),
optional :: strm
910 if (
present(strm))
then
917 call hip_add4s3(a_d, b_d, c_d, d_d, c1, c2, c3, n, strm_)
919 call cuda_add4s3(a_d, b_d, c_d, d_d, c1, c2, c3, n, strm_)
923 call metal_add4s3(a_d, b_d, c_d, d_d, c1, c2, c3, n, strm_)
925 call neko_error(
'No device backend configured')
930 subroutine device_add5s4(a_d, b_d, c_d, d_d, e_d, c1, c2 , c3, c4, n, strm)
931 type(c_ptr) :: a_d, b_d, c_d, d_d, e_d
932 real(kind=
rp) :: c1, c2, c3, c4
934 type(c_ptr),
optional :: strm
939 if (
present(strm))
then
946 call hip_add5s4(a_d, b_d, c_d, d_d, e_d, c1, c2, c3, c4, n, strm_)
948 call cuda_add5s4(a_d, b_d, c_d, d_d, e_d, c1, c2, c3, c4, n, strm_)
950 call opencl_add5s4(a_d, b_d, c_d, d_d, e_d, c1, c2, c3, c4, n, strm_)
952 call metal_add5s4(a_d, b_d, c_d, d_d, e_d, c1, c2, c3, c4, n, strm_)
954 call neko_error(
'No device backend configured')
962 type(c_ptr),
optional :: strm
967 if (
present(strm))
then
982 call neko_error(
'No device backend configured')
988 type(c_ptr) :: a_d, b_d
990 type(c_ptr),
optional :: strm
995 if (
present(strm))
then
1010 call neko_error(
'No device backend configured')
1016 type(c_ptr) :: a_d, b_d, c_d
1018 type(c_ptr),
optional :: strm
1019 type(c_ptr) :: strm_
1021 if (
present(strm))
then
1036 call neko_error(
'No device backend configured')
1042 type(c_ptr) :: a_d, b_d
1044 type(c_ptr),
optional :: strm
1045 type(c_ptr) :: strm_
1047 if (
present(strm))
then
1053 if (n .lt. 1)
return
1063 call neko_error(
'No device backend configured')
1069 type(c_ptr) :: a_d, b_d, c_d
1071 type(c_ptr),
optional :: strm
1072 type(c_ptr) :: strm_
1074 if (n .lt. 1)
return
1076 if (
present(strm))
then
1083 call hip_col3(a_d, b_d, c_d, n, strm_)
1091 call neko_error(
'No device backend configured')
1097 type(c_ptr) :: a_d, b_d, c_d
1099 type(c_ptr),
optional :: strm
1100 type(c_ptr) :: strm_
1102 if (n .lt. 1)
return
1104 if (
present(strm))
then
1119 call neko_error(
'No device backend configured')
1125 type(c_ptr) :: a_d, b_d
1127 type(c_ptr),
optional :: strm
1128 type(c_ptr) :: strm_
1130 if (n .lt. 1)
return
1132 if (
present(strm))
then
1147 call neko_error(
'No device backend configured')
1153 type(c_ptr) :: a_d, b_d, c_d
1155 type(c_ptr),
optional :: strm
1156 type(c_ptr) :: strm_
1158 if (n .lt. 1)
return
1160 if (
present(strm))
then
1167 call hip_sub3(a_d, b_d, c_d, n, strm_)
1175 call neko_error(
'No device backend configured')
1181 type(c_ptr) :: a_d, b_d, c_d
1183 type(c_ptr),
optional :: strm
1184 type(c_ptr) :: strm_
1186 if (n .lt. 1)
return
1188 if (
present(strm))
then
1203 call neko_error(
'No device backend configured')
1209 type(c_ptr) :: a_d, b_d, c_d, d_d
1211 type(c_ptr),
optional :: strm
1212 type(c_ptr) :: strm_
1214 if (n .lt. 1)
return
1216 if (
present(strm))
then
1231 call neko_error(
'No device backend configured')
1237 type(c_ptr) :: a_d, b_d, c_d
1240 type(c_ptr),
optional :: strm
1241 type(c_ptr) :: strm_
1243 if (n .lt. 1)
return
1245 if (
present(strm))
then
1260 call neko_error(
'No device backend configured')
1266 subroutine device_vdot3(dot_d, u1_d, u2_d, u3_d, v1_d, v2_d, v3_d, n, strm)
1267 type(c_ptr) :: dot_d, u1_d, u2_d, u3_d, v1_d, v2_d, v3_d
1269 type(c_ptr),
optional :: strm
1270 type(c_ptr) :: strm_
1272 if (n .lt. 1)
return
1274 if (
present(strm))
then
1281 call hip_vdot3(dot_d, u1_d, u2_d, u3_d, v1_d, v2_d, v3_d, n, strm_)
1283 call cuda_vdot3(dot_d, u1_d, u2_d, u3_d, v1_d, v2_d, v3_d, n, strm_)
1285 call opencl_vdot3(dot_d, u1_d, u2_d, u3_d, v1_d, v2_d, v3_d, n, strm_)
1287 call metal_vdot3(dot_d, u1_d, u2_d, u3_d, v1_d, v2_d, v3_d, n, strm_)
1289 call neko_error(
'No device backend configured')
1296 w1_d, w2_d, w3_d, n, strm)
1297 type(c_ptr) :: u1_d, u2_d, u3_d
1298 type(c_ptr) :: v1_d, v2_d, v3_d
1299 type(c_ptr) :: w1_d, w2_d, w3_d
1301 type(c_ptr),
optional :: strm
1302 type(c_ptr) :: strm_
1304 if (n .lt. 1)
return
1306 if (
present(strm))
then
1313 call hip_vcross(u1_d, u2_d, u3_d, v1_d, v2_d, v3_d, &
1314 w1_d, w2_d, w3_d, n, strm_)
1316 call cuda_vcross(u1_d, u2_d, u3_d, v1_d, v2_d, v3_d, &
1317 w1_d, w2_d, w3_d, n, strm_)
1320 w1_d, w2_d, w3_d, n, strm_)
1322 call metal_vcross(u1_d, u2_d, u3_d, v1_d, v2_d, v3_d, &
1323 w1_d, w2_d, w3_d, n, strm_)
1325 call neko_error(
'No device backend configured')
1332 type(c_ptr) :: u_d, v_d, w_d
1334 type(c_ptr),
optional :: strm
1335 type(c_ptr) :: strm_
1336 real(kind=
rp) :: res
1340 if (n .lt. 1)
return
1342 if (
present(strm))
then
1349 res =
hip_vlsc3(u_d, v_d, w_d, n, strm_)
1359 call neko_error(
'No device backend configured')
1365 type(c_ptr) :: a_d, b_d, c_d
1367 type(c_ptr),
optional :: strm
1368 type(c_ptr) :: strm_
1369 real(kind=
rp) :: res
1370 real(kind=
xp) :: res_xp
1372 if (
present(strm))
then
1380 res_xp =
hip_glsc3(a_d, b_d, c_d, n, strm_)
1387 res_xp =
real(res, kind=
xp)
1389 call neko_error(
'No device backend configured')
1392#ifndef HAVE_DEVICE_MPI
1394 call mpi_allreduce(mpi_in_place, res_xp, 1, &
1398 res =
real(res_xp, kind=
rp)
1402 type(c_ptr),
value :: w_d, v_d_d, mult_d
1403 integer(c_int) :: j, n
1405 real(
c_xp) :: h_xp(j)
1406 type(c_ptr),
optional :: strm
1407 type(c_ptr) :: strm_
1410 if (
present(strm))
then
1429 call neko_error(
'No device backend configured')
1432#ifndef HAVE_DEVICE_MPI
1434 call mpi_allreduce(mpi_in_place, h_xp, j, &
1442 type(c_ptr),
value :: y_d, x_d_d, a_d
1443 integer(c_int) :: j, n
1444 type(c_ptr),
optional :: strm
1445 type(c_ptr) :: strm_
1447 if (n .lt. 1)
return
1449 if (
present(strm))
then
1464 call neko_error(
'No device backend configured')
1470 type(c_ptr) :: a_d, b_d
1472 real(kind=
rp) :: res
1473 real(kind=
xp) :: res_xp
1474 type(c_ptr),
optional :: strm
1475 type(c_ptr) :: strm_
1477 if (
present(strm))
then
1492 res_xp =
real(res, kind=
xp)
1494 call neko_error(
'No device backend configured')
1497#ifndef HAVE_DEVICE_MPI
1499 call mpi_allreduce(mpi_in_place, res_xp, 1, &
1503 res =
real(res_xp, kind=
rp)
1509 type(c_ptr),
intent(in) :: a_d, b_d
1510 integer,
intent(in) :: n
1512 real(kind=
rp) :: res
1513 real(kind=
xp) :: res_xp
1514 type(c_ptr),
optional :: strm
1515 type(c_ptr) :: strm_
1517 if (
present(strm))
then
1532 res_xp =
real(res, kind=
xp)
1534 call neko_error(
'No device backend configured')
1537#ifndef HAVE_DEVICE_MPI
1539 call mpi_allreduce(mpi_in_place, res_xp, 1, &
1544 res =
real(sqrt(res_xp), kind=
rp)
1551 real(kind=
rp) :: res
1552 real(kind=
xp) :: res_xp
1553 type(c_ptr),
optional :: strm
1554 type(c_ptr) :: strm_
1556 if (
present(strm))
then
1571 res_xp =
real(res, kind=
xp)
1573 call neko_error(
'No device backend configured')
1576#ifndef HAVE_DEVICE_MPI
1578 call mpi_allreduce(mpi_in_place, res_xp, 1, &
1582 res =
real(res_xp, kind=
rp)
1589 real(kind=
rp) :: res, ninf
1590 type(c_ptr),
optional :: strm
1591 type(c_ptr) :: strm_
1598 if (
present(strm))
then
1604 ninf = -huge(0.0_rp)
1614 call neko_error(
'No device backend configured')
1617#ifndef HAVE_DEVICE_MPI
1619 call mpi_allreduce(mpi_in_place, res, 1, &
1629 real(kind=
rp) :: res, pinf
1630 type(c_ptr),
optional :: strm
1631 type(c_ptr) :: strm_
1638 if (
present(strm))
then
1654 call neko_error(
'No device backend configured')
1657#ifndef HAVE_DEVICE_MPI
1659 call mpi_allreduce(mpi_in_place, res, 1, &
1666 integer,
intent(in) :: n
1668 type(c_ptr),
optional :: strm
1669 type(c_ptr) :: strm_
1671 if (n .lt. 1)
return
1673 if (
present(strm))
then
1688 call neko_error(
'No device backend configured')
1699 type(c_ptr) :: a_d, b_d
1701 type(c_ptr),
optional :: strm
1702 type(c_ptr) :: strm_
1704 if (n .lt. 1)
return
1706 if (
present(strm))
then
1721 call neko_error(
'No device backend configured')
1728 type(c_ptr) :: a_d, b_d, c_d
1730 type(c_ptr),
optional :: strm
1731 type(c_ptr) :: strm_
1733 if (n .lt. 1)
return
1735 if (
present(strm))
then
1750 call neko_error(
'No device backend configured')
1759 real(kind=
rp),
intent(in) :: c
1761 type(c_ptr),
optional :: strm
1762 type(c_ptr) :: strm_
1764 if (n .lt. 1)
return
1766 if (
present(strm))
then
1781 call neko_error(
'No device backend configured')
1789 type(c_ptr) :: a_d, b_d
1790 real(kind=
rp),
intent(in) :: c
1792 type(c_ptr),
optional :: strm
1793 type(c_ptr) :: strm_
1795 if (n .lt. 1)
return
1797 if (
present(strm))
then
1812 call neko_error(
'No device backend configured')
1823 type(c_ptr) :: a_d, b_d
1825 type(c_ptr),
optional :: strm
1826 type(c_ptr) :: strm_
1828 if (n .lt. 1)
return
1830 if (
present(strm))
then
1845 call neko_error(
'No device backend configured')
1852 type(c_ptr) :: a_d, b_d, c_d
1854 type(c_ptr),
optional :: strm
1855 type(c_ptr) :: strm_
1857 if (n .lt. 1)
return
1859 if (
present(strm))
then
1874 call neko_error(
'No device backend configured')
1883 real(kind=
rp),
intent(in) :: c
1885 type(c_ptr),
optional :: strm
1886 type(c_ptr) :: strm_
1888 if (n .lt. 1)
return
1890 if (
present(strm))
then
1905 call neko_error(
'No device backend configured')
1913 type(c_ptr) :: a_d, b_d
1914 real(kind=
rp),
intent(in) :: c
1916 type(c_ptr),
optional :: strm
1917 type(c_ptr) :: strm_
1919 if (n .lt. 1)
return
1921 if (
present(strm))
then
1936 call neko_error(
'No device backend configured')
1946 type(c_ptr),
intent(inout) :: a_d
1947 integer,
intent(in) :: c
1948 integer,
intent(in) :: n
1949 type(c_ptr),
optional :: strm
1950 type(c_ptr) :: strm_
1951 if (n .lt. 1)
return
1953 if (
present(strm))
then
1968 call neko_error(
'No device backend configured')
type(mpi_datatype), public mpi_real_precision
MPI type for working precision of REAL types.
integer, public pe_size
MPI size of communicator.
type(mpi_comm), public neko_comm
MPI communicator.
type(mpi_datatype), public mpi_extra_precision
subroutine, public device_pwmin2(a_d, b_d, n, strm)
Compute the point-wise minimum of two vectors .
subroutine, public device_masked_scatter_copy_aligned(a_d, b_d, mask_d, n, n_mask, strm)
Scatter a masked vector .
subroutine, public device_add2s1(a_d, b_d, c1, n, strm)
subroutine, public device_add2s2_many(y_d, x_d_d, a_d, j, n, strm)
subroutine, public device_add4s3(a_d, b_d, c_d, d_d, c1, c2, c3, n, strm)
Returns .
subroutine, public device_sub3(a_d, b_d, c_d, n, strm)
Vector subtraction .
subroutine, public device_masked_scatter_copy_0(a_d, b_d, mask_d, n, n_mask, strm)
Scatter a masked vector .
subroutine, public device_add2s2(a_d, b_d, c1, n, strm)
Vector addition with scalar multiplication (multiplication on first argument)
real(kind=rp) function, public device_glmax(a_d, n, strm)
Max of a vector of length n.
subroutine, public device_add2(a_d, b_d, n, strm)
Vector addition .
subroutine, public device_addcol3(a_d, b_d, c_d, n, strm)
Returns .
real(kind=rp) function, public device_glsum(a_d, n, strm)
Sum a vector of length n.
subroutine, public device_pwmax3(a_d, b_d, c_d, n, strm)
Compute the point-wise maximum of two vectors .
subroutine, public device_invcol1(a_d, n, strm)
Invert a vector .
subroutine, public device_add3s2(a_d, b_d, c_d, c1, c2, n, strm)
Returns .
subroutine, public device_masked_atomic_reduction_0(a_d, b_d, mask_d, n, n_mask, strm)
subroutine, public device_cpwmax3(a_d, b_d, c, n, strm)
Compute the point-wise maximum of a vector and a scalar .
subroutine, public device_rzero(a_d, n, strm)
Zero a real vector.
subroutine, public device_rone(a_d, n, strm)
Set all elements to one.
subroutine, public device_vcross(u1_d, u2_d, u3_d, v1_d, v2_d, v3_d, w1_d, w2_d, w3_d, n, strm)
Compute a cross product (3-d version) assuming vector components etc.
subroutine, public device_cmult(a_d, c, n, strm)
Multiplication by constant c .
subroutine, public device_vdot3(dot_d, u1_d, u2_d, u3_d, v1_d, v2_d, v3_d, n, strm)
Compute a dot product (3-d version) assuming vector components etc.
real(kind=rp) function, public device_glsubnorm(a_d, b_d, n, strm)
Returns the norm of the difference of two vectors .
subroutine, public device_glsc3_many(h, w_d, v_d_d, mult_d, j, n, strm)
subroutine, public device_cfill_mask(a_d, c, n, mask_d, n_mask, strm)
Fill a constant to a masked vector. .
subroutine, public device_cadd2(a_d, b_d, c, n, strm)
Add a scalar to vector .
subroutine, public device_sub2(a_d, b_d, n, strm)
Vector substraction .
subroutine, public device_copy(a_d, b_d, n, strm)
Copy a vector .
subroutine, public device_invcol3(a_d, b_d, c_d, n, strm)
Vector division .
subroutine, public device_pwmin3(a_d, b_d, c_d, n, strm)
Compute the point-wise minimum of two vectors .
subroutine, public device_power(ap_d, a_d, p, n, strm)
Take the power of a vector .
subroutine, public device_col2(a_d, b_d, n, strm)
Vector multiplication .
subroutine, public device_masked_gather_copy_aligned(a_d, b_d, mask_d, n, n_mask, strm)
Gather a masked vector .
real(kind=rp) function, public device_vlsc3(u_d, v_d, w_d, n, strm)
Compute multiplication sum .
subroutine, public device_cdiv2(a_d, b_d, c, n, strm)
Division of constant c by array .
subroutine, public device_add5s4(a_d, b_d, c_d, d_d, e_d, c1, c2, c3, c4, n, strm)
Returns .
subroutine, public device_add4(a_d, b_d, c_d, d_d, n, strm)
subroutine, public device_cpwmax2(a_d, c, n, strm)
Compute the point-wise maximum of a vector and a scalar .
subroutine, public device_masked_copy_0(a_d, b_d, mask_d, n, n_mask, strm)
Copy a masked vector .
subroutine, public device_subcol3(a_d, b_d, c_d, n, strm)
Returns .
subroutine, public device_cdiv(a_d, c, n, strm)
Division of constant c by array .
subroutine, public device_absval(a_d, n, strm)
subroutine device_iadd(a_d, c, n, strm)
Add an integer scalar to vector .
subroutine, public device_masked_gather_copy_0(a_d, b_d, mask_d, n, n_mask, strm)
Gather a masked vector .
subroutine, public device_invcol2(a_d, b_d, n, strm)
Vector division .
subroutine, public device_addsqr2s2(a_d, b_d, c1, n, strm)
Returns .
real(kind=rp) function, public device_glsc3(a_d, b_d, c_d, n, strm)
Weighted inner product .
subroutine, public device_cpwmin3(a_d, b_d, c, n, strm)
Compute the point-wise minimum of a vector and a scalar .
subroutine, public device_cwrap(a_d, min_val, max_val, n, strm)
Wrap value around a range (min, max)
subroutine, public device_face_masked_gather_copy_0(a_d, b_d, mask_d, facet_d, n1, n2, lx, ly, lz, n_mask, strm)
Gather a face-local SEM field .
real(kind=rp) function, public device_glsc2(a_d, b_d, n, strm)
Weighted inner product .
subroutine, public device_cmult2(a_d, b_d, c, n, strm)
Multiplication by constant c .
subroutine, public device_masked_copy_aligned(a_d, b_d, mask_d, n, n_mask, strm)
Copy a masked vector .
subroutine, public device_col3(a_d, b_d, c_d, n, strm)
Vector multiplication with 3 vectors .
subroutine, public device_addcol4(a_d, b_d, c_d, d_d, n, strm)
Returns .
subroutine, public device_cfill(a_d, c, n, strm)
Set all elements to a constant c .
subroutine, public device_cpwmin2(a_d, c, n, strm)
Compute the point-wise minimum of a vector and a scalar .
subroutine, public device_add3(a_d, b_d, c_d, n, strm)
Vector addition .
subroutine, public device_sqrt_inplace(a_d, n, strm)
Sqrt a vector .
real(kind=rp) function, public device_glmin(a_d, n, strm)
Min of a vector of length n.
subroutine, public device_addcol3s2(a_d, b_d, c_d, s, n, strm)
Returns .
subroutine, public device_pwmax2(a_d, b_d, n, strm)
Compute the point-wise maximum of two vectors .
subroutine device_radd(a_d, c, n, strm)
Add a scalar to vector .
Device abstraction, common interface for various accelerators.
type(c_ptr), bind(C), public glb_cmd_queue
Global command queue.
integer, parameter, public c_xp
integer, parameter, public xp
integer, parameter, public c_rp
integer, parameter, public rp
Global precision used in computations.