Date: 2026-03-31T05:46:19+00:00

Actual source code: fmultcrl.F90

      1: !
      2: !
      3: !    Fortran kernel for sparse matrix-vector product in the AIJ/CRL format
      4: !
      5: #include <petsc/finclude/petscsys.h>
      6: !
      7: pure subroutine FortranMultCRL(m, rmax, x, y, icols, acols)
      8:   use, intrinsic :: ISO_C_binding
      9:   implicit none(type, external)
     10:   PetscInt, intent(in) :: m, rmax, icols(m, rmax)
     11:   PetscScalar, intent(in) :: x(0:m - 1), acols(m, rmax)
     12:   PetscScalar, intent(out) :: y(m)

     14:   PetscInt :: i

     16:   y(1:m) = acols(1:m, 1)*x(icols(1:m, 1))
     17:   do i = 2, rmax
     18:     y(1:m) = y(1:m) + acols(1:m, i)*x(icols(1:m, i))
     19:   end do
     20: end subroutine FortranMultCRL