Date: 2026-05-01T06:12:07+00:00

Actual source code: fcopy.F90

      1: !
      2: !
      3: !    Fortran kernel for the copy vector routine
      4: !
      5: #include <petsc/finclude/petscsys.h>
      6: !
      7: pure subroutine FortranCopy(n, x, y)
      8:   use, intrinsic :: ISO_C_binding
      9:   implicit none(type, external)
     10:   PetscScalar, intent(in) :: x(*)
     11:   PetscScalar, intent(inout) :: y(*)
     12:   PetscInt, intent(in) :: n

     14:   PETSC_AssertAlignx(16, x(1))
     15:   PETSC_AssertAlignx(16, y(1))

     17:   y(1:n) = x(1:n)
     18: end subroutine FortranCopy

     20: pure subroutine FortranZero(n, x)
     21:   use, intrinsic :: ISO_C_binding
     22:   implicit none(type, external)
     23:   PetscScalar, intent(inout) :: x(*)
     24:   PetscInt, intent(in) :: n

     26:   PETSC_AssertAlignx(16, x(1))

     28:   x(1:n) = 0.0
     29: end subroutine FortranZero