65  use math, 
only: 
rzero, 
rone, 
copy, 
cmult, 
cadd, 
cfill, 
invcol1, 
vdot3, 
add2, &
 
   77  use, 
intrinsic :: iso_c_binding, only: c_ptr
 
   95    integer, 
intent(in), 
optional :: n
 
  107       call rzero(a%x, size)
 
 
  114    integer, 
intent(in), 
optional :: n
 
 
  134    integer, 
intent(in), 
optional :: n
 
  146       call copy(a%x, b%x, size)
 
 
  153    real(kind=
rp), 
intent(in) :: c
 
  154    integer, 
intent(in), 
optional :: n
 
  166       call cmult(a%x, c, size)
 
 
  173    real(kind=
rp), 
intent(in) :: s
 
  174    integer, 
intent(in), 
optional :: n
 
  186       call cadd(a%x, s, size)
 
 
  193    real(kind=
rp), 
intent(in) :: c
 
  194    integer, 
intent(in), 
optional :: n
 
  206       call cfill(a%x, c, size)
 
 
  213    integer, 
intent(in), 
optional :: n
 
 
  235    integer, 
intent(in), 
optional :: n
 
  247       call invcol3(a%x, b%x, c%x, size)
 
 
  256    integer, 
intent(in), 
optional :: n
 
  268       call add2(a%x, b%x, size)
 
 
  277    integer, 
intent(in), 
optional :: n
 
  289       call add3(a%x, b%x, c%x, size)
 
 
  297    type(
matrix_t), 
intent(in) :: b, c, d
 
  298    integer, 
intent(in), 
optional :: n
 
  310       call add4(a%x, b%x, c%x, d%x, size)
 
 
  319    integer, 
intent(in), 
optional :: n
 
  331       call sub2(a%x, b%x, size)
 
 
  341    integer, 
intent(in), 
optional :: n
 
  353       call sub3(a%x, b%x, c%x, size)
 
 
  364    real(kind=
rp), 
intent(in) :: c1
 
  365    integer, 
intent(in), 
optional :: n
 
  377       call add2s1(a%x, b%x, c1, size)
 
 
  387    real(kind=
rp), 
intent(in) :: c1
 
  388    integer, 
intent(in), 
optional :: n
 
  400       call add2s2(a%x, b%x, c1, size)
 
 
  409    real(kind=
rp), 
intent(in) :: c1
 
  410    integer, 
intent(in), 
optional :: n
 
 
  431    real(kind=
rp), 
intent(in) :: c
 
  432    integer, 
intent(in), 
optional :: n
 
  444       call cmult2(a%x, b%x, c, size)
 
 
  453    integer, 
intent(in), 
optional :: n
 
 
  475    integer, 
intent(in), 
optional :: n
 
  487       call col2(a%x, b%x, size)
 
 
  497    integer, 
intent(in), 
optional :: n
 
  509       call col3(a%x, b%x, c%x, size)
 
 
  519    integer, 
intent(in), 
optional :: n
 
  531       call subcol3(a%x, b%x, c%x, size)
 
 
  541    real(kind=
rp), 
intent(in) :: c1, c2
 
  542    integer, 
intent(in), 
optional :: n
 
  554       call add3s2(a%x, b%x, c%x, c1, c2, size)
 
 
  564    integer, 
intent(in), 
optional :: n
 
  576       call addcol3(a%x, b%x, c%x, size)
 
 
  587    integer, 
intent(in), 
optional :: n
 
  599       call addcol4(a%x, b%x, c%x, d%x, size)
 
 
  606    integer, 
intent(in), 
optional :: n
 
  620       sum = 
glsum(a%x, size)
 
 
  627    integer, 
intent(in), 
optional :: n
 
  641       ip = 
glsc2(a%x, b%x, size)
 
 
  648    integer, 
intent(in), 
optional :: n
 
  649    type(
matrix_t), 
intent(in) :: a, b, c
 
  662       ip = 
glsc3(a%x, b%x, c%x, size)
 
 
  670    integer, 
intent(in), 
optional :: n
 
  672    real(kind=
rp) :: norm
 
 
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_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_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_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_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 .
 
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_add3(a_d, b_d, c_d, n, strm)
Vector addition .
 
Device abstraction, common interface for various accelerators.
 
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)
 
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 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 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 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 sub2(a, b, n)
Vector substraction .
 
subroutine, public add2s2(a, b, c1, n)
Vector addition with scalar multiplication  (multiplication on second argument)
 
real(kind=rp) function, public matrix_glsum(a, n)
Global sum of all elements in a matrix .
 
subroutine, public matrix_copy(a, b, n)
Copy a matrix .
 
subroutine, public matrix_invcol2(a, b, n)
Vector division .
 
subroutine, public matrix_add2(a, b, n)
Vector addition .
 
subroutine, public matrix_addcol4(a, b, c, d, n)
Returns .
 
subroutine, public matrix_cadd(a, s, n)
Add a scalar to matrix .
 
subroutine, public matrix_cmult(a, c, n)
Multiplication by constant c .
 
subroutine, public matrix_add3s2(a, b, c, c1, c2, n)
Returns .
 
subroutine, public matrix_cmult2(a, b, c, n)
Multiplication by constant c .
 
subroutine matrix_add4(a, b, c, d, n)
Vector addition .
 
subroutine, public matrix_col3(a, b, c, n)
Vector multiplication with 3 vectors .
 
subroutine, public matrix_cfill(a, c, n)
Set all elements to a constant c .
 
subroutine, public matrix_invcol1(a, n)
Invert elements of a matrix .
 
real(kind=rp) function, public matrix_glsc3(a, b, c, n)
Global inner product of three matrices .
 
subroutine, public matrix_sub2(a, b, n)
Vector substraction .
 
subroutine, public matrix_subcol3(a, b, c, n)
Returns .
 
subroutine, public matrix_addsqr2s2(a, b, c1, n)
Returns .
 
subroutine, public matrix_add3(a, b, c, n)
Vector addition .
 
subroutine, public matrix_rzero(a, n)
Zero a real matrix .
 
real(kind=rp) function, public matrix_glsc2(a, b, n)
Global inner product of two matrices .
 
subroutine, public matrix_add2s2(a, b, c1, n)
Vector addition with scalar multiplication  (multiplication on second argument)
 
subroutine, public matrix_addcol3(a, b, c, n)
Returns .
 
subroutine, public matrix_add2s1(a, b, c1, n)
Vector addition with scalar multiplication  (multiplication on first argument)
 
subroutine, public matrix_invcol3(a, b, c, n)
Element division of two matrices .
 
real(kind=rp) function, public matrix_glsubnorm(a, b, n)
Global subtracted norm of two matrices .
 
subroutine, public matrix_col2(a, b, n)
Vector multiplication .
 
subroutine, public matrix_rone(a, n)
Set all elements to one.
 
subroutine, public matrix_sub3(a, b, c, n)
Vector subtraction .
 
integer, parameter neko_bcknd_device
 
integer, parameter, public rp
Global precision used in computations.