Actual source code: fwaxpy.F90
1: !
2: !
3: ! Fortran kernel for the WAXPY() vector routine
4: !
5: #include <petsc/finclude/petscsys.h>
6: !
7: pure subroutine FortranWAXPY(n, a, x, y, w)
8: use, intrinsic :: ISO_C_binding
9: implicit none(type, external)
10: PetscScalar, intent(in) :: a
11: PetscScalar, intent(in) :: x(*), y(*)
12: PetscScalar, intent(inout) :: w(*)
13: PetscInt, intent(in) :: n
15: PETSC_AssertAlignx(16, x(1))
16: PETSC_AssertAlignx(16, y(1))
17: PETSC_AssertAlignx(16, w(1))
19: w(1:n) = a*x(1:n) + y(1:n)
20: end subroutine FortranWAXPY