Actual source code: fmdot.F

  1: !
  2: !
  3: !    Fortran kernel for the MDot() vector routine
  4: !
 5:  #include include/finclude/petscdef.h
  6: !
  7:       subroutine FortranMDot4(x,y1,y2,y3,y4,n,sum1,sum2,sum3,sum4)
  8:       implicit none
  9:       PetscScalar  sum1,sum2,sum3,sum4
 10:       PetscScalar  x(*),y1(*),y2(*)
 11:       PetscScalar  y3(*),y4(*)
 12:       PetscInt n

 14:       PetscInt i

 16:       do 10,i=1,n
 17:         sum1 = sum1 + x(i)*PetscConj(y1(i))
 18:         sum2 = sum2 + x(i)*PetscConj(y2(i))
 19:         sum3 = sum3 + x(i)*PetscConj(y3(i))
 20:         sum4 = sum4 + x(i)*PetscConj(y4(i))
 21:  10   continue

 23:       return
 24:       end

 26:       subroutine FortranMDot3(x,y1,y2,y3,n,sum1,sum2,sum3)
 27:       implicit none
 28:       PetscScalar  sum1,sum2,sum3
 29:       PetscScalar  x(*),y1(*),y2(*),y3(*)
 30:       PetscInt n

 32:       PetscInt i

 34:       do 10,i=1,n
 35:         sum1 = sum1 + x(i)*PetscConj(y1(i))
 36:         sum2 = sum2 + x(i)*PetscConj(y2(i))
 37:         sum3 = sum3 + x(i)*PetscConj(y3(i))
 38:  10   continue

 40:       return
 41:       end

 43:       subroutine FortranMDot2(x,y1,y2,n,sum1,sum2)
 44:       implicit none
 45:       PetscScalar  sum1,sum2,x(*),y1(*),y2(*)
 46:       PetscInt n

 48:       PetscInt i

 50:       do 10,i=1,n
 51:         sum1 = sum1 + x(i)*PetscConj(y1(i))
 52:         sum2 = sum2 + x(i)*PetscConj(y2(i))
 53:  10   continue

 55:       return
 56:       end


 59:       subroutine FortranMDot1(x,y1,n,sum1)
 60:       implicit none
 61:       PetscScalar  sum1,x(*),y1(*)
 62:       PetscInt n

 64:       PetscInt i

 66:       do 10,i=1,n
 67:         sum1 = sum1 + x(i)*PetscConj(y1(i))
 68:  10   continue

 70:       return
 71:       end