65  use math, 
only: 
rzero, 
rone, 
copy, 
cmult, 
cadd, 
cfill, 
invcol1, 
vdot3, 
add2, &
 
   80  use, 
intrinsic :: iso_c_binding, only: c_ptr
 
   99    integer, 
intent(in), 
optional :: n
 
  100    type(
field_t), 
intent(inout) :: a
 
  112       call rzero(a%x, size)
 
 
  118    integer, 
intent(in), 
optional :: n
 
  119    type(
field_t), 
intent(inout) :: a
 
 
  137    integer, 
intent(in), 
optional :: n
 
  139    type(
field_t), 
intent(inout) :: a
 
  151       call copy(a%x, b%x, size)
 
 
  157    integer, 
intent(in), 
optional :: n
 
  158    type(
field_t), 
intent(inout) :: a
 
  159    real(kind=
rp), 
intent(in) :: c
 
  171       call cmult(a%x, c, size)
 
 
  177    integer, 
intent(in), 
optional :: n
 
  178    type(
field_t), 
intent(inout) :: a
 
  179    real(kind=
rp), 
intent(in) :: s
 
  191       call cadd(a%x, s, size)
 
 
  197    integer, 
intent(in), 
optional :: n
 
  198    type(
field_t), 
intent(inout) :: a
 
  199    real(kind=
rp), 
intent(in) :: c
 
  211       call cfill(a%x, c, size)
 
 
  217    integer, 
intent(in), 
optional :: n
 
  218    type(
field_t), 
intent(inout) :: a
 
 
  237    integer, 
intent(in), 
optional :: n
 
  238    type(
field_t), 
intent(inout) :: a
 
  252       call invcol3(a%x, b%x, c%x, size)
 
 
  260    integer, 
intent(in), 
optional :: n
 
  261    type(
field_t), 
intent(in) :: u1, u2, u3
 
  262    type(
field_t), 
intent(in) :: v1, v2, v3
 
  263    type(
field_t), 
intent(out) :: dot
 
  274            u1%x_d, u2%x_d, u3%x_d, &
 
  275            v1%x_d, v2%x_d, v3%x_d, &
 
 
  288    integer, 
intent(in), 
optional :: n
 
  289    type(
field_t), 
intent(inout) :: a
 
  302       call add2(a%x, b%x, size)
 
 
  309    integer, 
intent(in), 
optional :: n
 
  310    type(
field_t), 
intent(inout) :: a
 
  311    type(
field_t), 
intent(in) :: b, c
 
  323       call add3(a%x, b%x, c%x, size)
 
 
  330    integer, 
intent(in), 
optional :: n
 
  331    type(
field_t), 
intent(inout) :: a
 
  332    type(
field_t), 
intent(in) :: b, c, d
 
  344       call add4(a%x, b%x, c%x, d%x, size)
 
 
  351    integer, 
intent(in), 
optional :: n
 
  352    type(
field_t), 
intent(inout) :: a
 
  353    type(
field_t), 
intent(inout) :: b
 
  365       call sub2(a%x, b%x, size)
 
 
  372    integer, 
intent(in), 
optional :: n
 
  373    type(
field_t), 
intent(inout) :: a
 
  387       call sub3(a%x, b%x, c%x, size)
 
 
  396    integer, 
intent(in), 
optional :: n
 
  397    type(
field_t), 
intent(inout) :: a
 
  398    type(
field_t), 
intent(inout) :: b
 
  399    real(kind=
rp), 
intent(in) :: c1
 
  411       call add2s1(a%x, b%x, c1, size)
 
 
  419    integer, 
intent(in), 
optional :: n
 
  420    type(
field_t), 
intent(inout) :: a
 
  421    type(
field_t), 
intent(inout) :: b
 
  422    real(kind=
rp), 
intent(in) :: c1
 
  434       call add2s2(a%x, b%x, c1, size)
 
 
  441    integer, 
intent(in), 
optional :: n
 
  442    type(
field_t), 
intent(inout) :: a
 
  444    real(kind=
rp), 
intent(in) :: c1
 
 
  463    integer, 
intent(in), 
optional :: n
 
  464    type(
field_t), 
intent(inout) :: a
 
  466    real(kind=
rp), 
intent(in) :: c
 
  478       call cmult2(a%x, b%x, c, size)
 
 
  485    integer, 
intent(in), 
optional :: n
 
  486    type(
field_t), 
intent(inout) :: a
 
 
  507    integer, 
intent(in), 
optional :: n
 
  508    type(
field_t), 
intent(inout) :: a
 
  521       call col2(a%x, b%x, size)
 
 
  528    integer, 
intent(in), 
optional :: n
 
  529    type(
field_t), 
intent(inout) :: a
 
  543       call col3(a%x, b%x, c%x, size)
 
 
  550    integer, 
intent(in), 
optional :: n
 
  551    type(
field_t), 
intent(inout) :: a
 
  565       call subcol3(a%x, b%x, c%x, size)
 
 
  572    integer, 
intent(in), 
optional :: n
 
  573    type(
field_t), 
intent(inout) :: a
 
  576    real(kind=
rp), 
intent(in) :: c1, c2
 
  588       call add3s2(a%x, b%x, c%x, c1, c2, size)
 
 
  595    integer, 
intent(in), 
optional :: n
 
  596    type(
field_t), 
intent(inout) :: a
 
  610       call addcol3(a%x, b%x, c%x, size)
 
 
  617    integer, 
intent(in), 
optional :: n
 
  618    type(
field_t), 
intent(inout) :: a
 
  633       call addcol4(a%x, b%x, c%x, d%x, size)
 
 
  639    integer, 
intent(in), 
optional :: n
 
  653       sum = 
glsum(a%x, size)
 
 
  659    integer, 
intent(in), 
optional :: n
 
  660    type(
field_t), 
intent(in) :: a, b
 
  661    real(kind=
rp) :: norm
 
  673       norm = 
glsc2(a%x, b%x, size)
 
 
  679    integer, 
intent(in), 
optional :: n
 
  680    type(
field_t), 
intent(in) :: a, b, c
 
  681    real(kind=
rp) :: norm
 
  693       norm = 
glsc3(a%x, b%x, c%x, size)
 
 
  699    integer, 
intent(in), 
optional :: n
 
  700    type(
field_t), 
intent(in) :: a, b
 
  701    real(kind=
rp) :: norm
 
 
  727    integer, 
intent(in) :: n, n_mask
 
  728    real(kind=
rp), 
dimension(n_mask), 
intent(inout) :: a
 
  730    integer, 
dimension(0:n_mask) :: 
mask 
  731    type(c_ptr) :: mask_d, a_d
 
 
  752    integer, 
intent(in) :: n, n_mask
 
  753    real(kind=
rp), 
dimension(n_mask), 
intent(in) :: b
 
  754    type(
field_t), 
intent(inout) :: a
 
  755    integer, 
dimension(0:n_mask) :: 
mask 
  756    type(c_ptr) :: mask_d, b_d
 
 
  771    integer, 
intent(in), 
optional :: n
 
  772    type(
field_t), 
intent(inout) :: a
 
  785       call pwmax2(a%x, b%x, size)
 
 
  793    integer, 
intent(in), 
optional :: n
 
  794    type(
field_t), 
intent(inout) :: a
 
  808       call pwmax3(a%x, b%x, c%x, size)
 
 
  815    integer, 
intent(in), 
optional :: n
 
  816    type(
field_t), 
intent(inout) :: a
 
  817    real(kind=
rp), 
intent(in) :: b
 
 
  837    integer, 
intent(in), 
optional :: n
 
  838    type(
field_t), 
intent(inout) :: a
 
  840    real(kind=
rp), 
intent(in) :: c
 
  852       call cpwmax3(a%x, b%x, c, size)
 
 
  860    integer, 
intent(in), 
optional :: n
 
  861    type(
field_t), 
intent(inout) :: a
 
  874       call pwmin2(a%x, b%x, size)
 
 
  882    integer, 
intent(in), 
optional :: n
 
  883    type(
field_t), 
intent(inout) :: a
 
  897       call pwmin3(a%x, b%x, c%x, size)
 
 
  904    integer, 
intent(in), 
optional :: n
 
  905    type(
field_t), 
intent(inout) :: a
 
  906    real(kind=
rp), 
intent(in) :: b
 
 
  926    integer, 
intent(in), 
optional :: n
 
  927    type(
field_t), 
intent(inout) :: a
 
  929    real(kind=
rp), 
intent(in) :: c
 
  941       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)
 
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 .
 
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 .
 
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_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 .
 
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)
 
integer, parameter neko_bcknd_device
 
integer, parameter, public rp
Global precision used in computations.