65 use math,
only :
rzero,
rone,
copy,
cmult,
cadd,
cfill,
invcol1,
vdot3,
add2, &
81 use,
intrinsic :: iso_c_binding, only : c_ptr
101 integer,
intent(in),
optional :: n
102 type(
field_t),
intent(inout) :: a
114 call rzero(a%x, size)
120 integer,
intent(in),
optional :: n
121 type(
field_t),
intent(inout) :: a
139 integer,
intent(in),
optional :: n
141 type(
field_t),
intent(inout) :: a
153 call copy(a%x, b%x, size)
159 integer,
intent(in),
optional :: n
160 type(
field_t),
intent(inout) :: a
161 real(kind=
rp),
intent(in) :: c
173 call cmult(a%x, c, size)
179 integer,
intent(in),
optional :: n
180 type(
field_t),
intent(inout) :: a
181 real(kind=
rp),
intent(in) :: s
193 call cadd(a%x, s, size)
199 integer,
intent(in),
optional :: n
200 type(
field_t),
intent(inout) :: a
201 real(kind=
rp),
intent(in) :: c
213 call cfill(a%x, c, size)
219 integer,
intent(in),
optional :: n
220 type(
field_t),
intent(inout) :: a
239 integer,
intent(in),
optional :: n
240 type(
field_t),
intent(inout) :: a
254 call invcol3(a%x, b%x, c%x, size)
262 integer,
intent(in),
optional :: n
263 type(
field_t),
intent(in) :: u1, u2, u3
264 type(
field_t),
intent(in) :: v1, v2, v3
265 type(
field_t),
intent(out) :: dot
276 u1%x_d, u2%x_d, u3%x_d, &
277 v1%x_d, v2%x_d, v3%x_d, &
290 integer,
intent(in),
optional :: n
291 type(
field_t),
intent(inout) :: a
304 call add2(a%x, b%x, size)
311 integer,
intent(in),
optional :: n
312 type(
field_t),
intent(inout) :: a
313 type(
field_t),
intent(in) :: b, c
325 call add3(a%x, b%x, c%x, size)
332 integer,
intent(in),
optional :: n
333 type(
field_t),
intent(inout) :: a
334 type(
field_t),
intent(in) :: b, c, d
346 call add4(a%x, b%x, c%x, d%x, size)
353 integer,
intent(in),
optional :: n
354 type(
field_t),
intent(inout) :: a
355 type(
field_t),
intent(inout) :: b
367 call sub2(a%x, b%x, size)
374 integer,
intent(in),
optional :: n
375 type(
field_t),
intent(inout) :: a
389 call sub3(a%x, b%x, c%x, size)
398 integer,
intent(in),
optional :: n
399 type(
field_t),
intent(inout) :: a
400 type(
field_t),
intent(inout) :: b
401 real(kind=
rp),
intent(in) :: c1
413 call add2s1(a%x, b%x, c1, size)
421 integer,
intent(in),
optional :: n
422 type(
field_t),
intent(inout) :: a
423 type(
field_t),
intent(inout) :: b
424 real(kind=
rp),
intent(in) :: c1
436 call add2s2(a%x, b%x, c1, size)
443 integer,
intent(in),
optional :: n
444 type(
field_t),
intent(inout) :: a
446 real(kind=
rp),
intent(in) :: c1
465 integer,
intent(in),
optional :: n
466 type(
field_t),
intent(inout) :: a
468 real(kind=
rp),
intent(in) :: c
480 call cmult2(a%x, b%x, c, size)
487 integer,
intent(in),
optional :: n
488 type(
field_t),
intent(inout) :: a
509 integer,
intent(in),
optional :: n
510 type(
field_t),
intent(inout) :: a
523 call col2(a%x, b%x, size)
530 integer,
intent(in),
optional :: n
531 type(
field_t),
intent(inout) :: a
545 call col3(a%x, b%x, c%x, size)
552 integer,
intent(in),
optional :: n
553 type(
field_t),
intent(inout) :: a
567 call subcol3(a%x, b%x, c%x, size)
574 integer,
intent(in),
optional :: n
575 type(
field_t),
intent(inout) :: a
578 real(kind=
rp),
intent(in) :: c1, c2
590 call add3s2(a%x, b%x, c%x, c1, c2, size)
597 integer,
intent(in),
optional :: n
598 type(
field_t),
intent(inout) :: a
612 call addcol3(a%x, b%x, c%x, size)
619 integer,
intent(in),
optional :: n
620 type(
field_t),
intent(inout) :: a
635 call addcol4(a%x, b%x, c%x, d%x, size)
641 integer,
intent(in),
optional :: n
655 sum =
glsum(a%x, size)
662 integer,
intent(in),
optional :: n
676 val =
glmax(a%x, size)
683 integer,
intent(in),
optional :: n
697 val =
glmin(a%x, size)
703 integer,
intent(in),
optional :: n
704 type(
field_t),
intent(in) :: a, b
705 real(kind=
rp) :: norm
717 norm =
glsc2(a%x, b%x, size)
723 integer,
intent(in),
optional :: n
724 type(
field_t),
intent(in) :: a, b, c
725 real(kind=
rp) :: norm
737 norm =
glsc3(a%x, b%x, c%x, size)
743 integer,
intent(in),
optional :: n
744 type(
field_t),
intent(in) :: a, b
745 real(kind=
rp) :: norm
771 integer,
intent(in) :: n, n_mask
772 real(kind=
rp),
dimension(n_mask),
intent(inout) :: a
774 integer,
dimension(0:n_mask) ::
mask
775 type(c_ptr) :: mask_d, a_d
796 integer,
intent(in) :: n, n_mask
797 real(kind=
rp),
dimension(n_mask),
intent(in) :: b
798 type(
field_t),
intent(inout) :: a
799 integer,
dimension(0:n_mask) ::
mask
800 type(c_ptr) :: mask_d, b_d
815 integer,
intent(in),
optional :: n
816 type(
field_t),
intent(inout) :: a
829 call pwmax2(a%x, b%x, size)
837 integer,
intent(in),
optional :: n
838 type(
field_t),
intent(inout) :: a
852 call pwmax3(a%x, b%x, c%x, size)
859 integer,
intent(in),
optional :: n
860 type(
field_t),
intent(inout) :: a
861 real(kind=
rp),
intent(in) :: b
881 integer,
intent(in),
optional :: n
882 type(
field_t),
intent(inout) :: a
884 real(kind=
rp),
intent(in) :: c
896 call cpwmax3(a%x, b%x, c, size)
904 integer,
intent(in),
optional :: n
905 type(
field_t),
intent(inout) :: a
918 call pwmin2(a%x, b%x, size)
926 integer,
intent(in),
optional :: n
927 type(
field_t),
intent(inout) :: a
941 call pwmin3(a%x, b%x, c%x, size)
948 integer,
intent(in),
optional :: n
949 type(
field_t),
intent(inout) :: a
950 real(kind=
rp),
intent(in) :: b
970 integer,
intent(in),
optional :: n
971 type(
field_t),
intent(inout) :: a
973 real(kind=
rp),
intent(in) :: c
985 call cpwmin3(a%x, b%x, c, size)
Return the device pointer for an associated Fortran array.
subroutine, public device_pwmin2(a_d, b_d, n, strm)
Compute the point-wise minimum of two vectors .
subroutine, public device_add2s1(a_d, b_d, c1, n, strm)
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_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_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_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_col2(a_d, b_d, n, strm)
Vector multiplication .
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_subcol3(a_d, b_d, c_d, n, strm)
Returns .
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 .
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_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 .
real(kind=rp) function, public device_glmin(a_d, n, strm)
Min of a vector of length n.
subroutine, public device_pwmax2(a_d, b_d, n, strm)
Compute the point-wise maximum of two vectors .
Device abstraction, common interface for various accelerators.
subroutine, public field_cpwmax2(a, b, n)
Point-wise max operation for field and constant .
subroutine, public field_add2s1(a, b, c1, n)
Vector addition with scalar multiplication (multiplication on first argument)
subroutine, public field_cpwmin3(a, b, c, n)
Point-wise min operation for field and constant .
subroutine, public field_invcol2(a, b, n)
Vector division .
subroutine field_add4(a, b, c, d, n)
Vector addition .
subroutine, public field_cadd(a, s, n)
Add a scalar to vector .
subroutine, public field_invcol1(a, n)
Invert a vector .
subroutine, public field_col2(a, b, n)
Vector multiplication .
subroutine, public field_sub2(a, b, n)
Vector substraction .
subroutine, public field_sub3(a, b, c, n)
Vector subtraction .
real(kind=rp) function, public field_glmin(a, n)
Global minimum of all elements in a field .
subroutine, public field_cmult2(a, b, c, n)
Multiplication by constant c .
real(kind=rp) function, public field_glsc2(a, b, n)
subroutine, public field_cfill(a, c, n)
Set all elements to a constant c .
subroutine, public field_add2s2(a, b, c1, n)
Vector addition with scalar multiplication (multiplication on second argument)
real(kind=rp) function, public field_glmax(a, n)
Global maximum of all elements in a field .
real(kind=rp) function, public field_glsum(a, n)
subroutine, public field_rzero(a, n)
Zero a real vector.
subroutine, public field_addcol3(a, b, c, n)
Returns .
real(kind=rp) function, public field_glsubnorm(a, b, n)
subroutine, public field_rone(a, n)
Set all elements to one.
subroutine, public field_invcol3(a, b, c, n)
Invert a vector .
subroutine, public field_add3s2(a, b, c, c1, c2, n)
Returns .
subroutine, public field_add2(a, b, n)
Vector addition .
subroutine, public field_cpwmin2(a, b, n)
Point-wise min operation for field and constant .
subroutine, public field_pwmax2(a, b, n)
Point-wise max operation .
subroutine, public field_pwmin3(a, b, c, n)
Point-wise min operation .
subroutine, public field_col3(a, b, c, n)
Vector multiplication with 3 vectors .
subroutine, public field_copy(a, b, n)
Copy a vector .
subroutine, public field_subcol3(a, b, c, n)
Returns .
subroutine, public field_add3(a, b, c, n)
Vector addition .
subroutine, public field_pwmax3(a, b, c, n)
Point-wise max operation .
subroutine, public field_cpwmax3(a, b, c, n)
Point-wise max operation for field and constant .
subroutine, public field_cmult(a, c, n)
Multiplication by constant c .
real(kind=rp) function, public field_glsc3(a, b, c, n)
subroutine, public field_addcol4(a, b, c, d, n)
Returns .
subroutine, public field_addsqr2s2(a, b, c1, n)
Returns .
subroutine, public field_vdot3(dot, u1, u2, u3, v1, v2, v3, n)
Compute a dot product (3-d version) assuming vector components etc.
subroutine, public field_pwmin2(a, b, n)
Point-wise min operation .
subroutine, public field_masked_scatter_copy_0(a, b, mask, n, n_mask)
Gather a contigous array into a field .
subroutine, public field_masked_gather_copy_0(a, b, mask, n, n_mask)
Gather a field to reduced contigous array .
Object for handling masks in Neko.
subroutine, public cmult(a, c, n)
Multiplication by constant c .
subroutine, public cmult2(a, b, c, n)
Multiplication by constant c .
subroutine, public invcol2(a, b, n)
Vector division .
real(kind=rp) function, public glsc3(a, b, c, n)
Weighted inner product .
subroutine, public cadd(a, s, n)
Add a scalar to vector .
subroutine, public addsqr2s2(a, b, c1, n)
Returns .
subroutine, public add2s1(a, b, c1, n)
Vector addition with scalar multiplication (multiplication on first argument)
subroutine, public cpwmin2(a, b, n)
Point-wise minimum of scalar and vector .
real(kind=rp) function, public glsc2(a, b, n)
Weighted inner product .
subroutine, public masked_scatter_copy_0(a, b, mask, n, n_mask)
Scatter a contigous vector to masked positions in a target array .
subroutine, public subcol3(a, b, c, n)
Returns .
subroutine, public rone(a, n)
Set all elements to one.
subroutine, public cpwmin3(a, b, c, n)
Point-wise minimum of scalar and vector .
subroutine, public pwmax3(a, b, c, n)
Point-wise maximum of two vectors .
subroutine, public add3(a, b, c, n)
Vector addition .
real(kind=rp) function, public glsum(a, n)
Sum a vector of length n.
subroutine, public sub3(a, b, c, n)
Vector subtraction .
subroutine, public addcol4(a, b, c, d, n)
Returns .
subroutine, public add2(a, b, n)
Vector addition .
subroutine, public cfill(a, c, n)
Set all elements to a constant c .
subroutine, public invcol3(a, b, c, n)
Invert a vector .
subroutine, public add3s2(a, b, c, c1, c2, n)
Returns .
subroutine, public pwmax2(a, b, n)
Point-wise maximum of two vectors .
subroutine, public pwmin2(a, b, n)
Point-wise minimum of two vectors .
subroutine, public masked_gather_copy_0(a, b, mask, n, n_mask)
Gather a masked vector to reduced contigous vector .
subroutine, public addcol3(a, b, c, n)
Returns .
subroutine, public invcol1(a, n)
Invert a vector .
subroutine, public cpwmax3(a, b, c, n)
Point-wise maximum of scalar and vector .
subroutine, public col2(a, b, n)
Vector multiplication .
real(kind=rp) function, public glmax(a, n)
Max of a vector of length n.
subroutine, public copy(a, b, n)
Copy a vector .
subroutine, public add4(a, b, c, d, n)
Vector addition .
subroutine, public col3(a, b, c, n)
Vector multiplication with 3 vectors .
subroutine, public vdot3(dot, u1, u2, u3, v1, v2, v3, n)
Compute a dot product (3-d version) assuming vector components etc.
subroutine, public rzero(a, n)
Zero a real vector.
real(kind=rp) function, public glsubnorm(a, b, n)
Returns the norm of the difference of two vectors .
subroutine, public cpwmax2(a, b, n)
Point-wise maximum of scalar and vector .
subroutine, public sub2(a, b, n)
Vector substraction .
subroutine, public pwmin3(a, b, c, n)
Point-wise minimum of two vectors .
subroutine, public add2s2(a, b, c1, n)
Vector addition with scalar multiplication (multiplication on second argument)
real(kind=rp) function, public glmin(a, n)
Min of a vector of length n.
integer, parameter neko_bcknd_device
integer, parameter, public rp
Global precision used in computations.