Télécharger ddotpv.eso

Retour à la liste

Numérotation des lignes :

ddotpv
  1. C DDOTPV SOURCE PV090527 24/04/16 21:15:03 11902
  2. function ddotpv(lon,val1,val2)
  3. *
  4. * unrolling pour ameliorer la performance
  5. * et ameliorer la precision
  6. *
  7.  
  8. IMPLICIT INTEGER(I-N)
  9. IMPLICIT REAL*8 (A-H,O-Z)
  10. dimension val1(*),val2(*),resu(8)
  11. if (lon.eq.0) then
  12. ddotpv=0.d0
  13. return
  14. endif
  15. resu(1)=0.d0
  16. resu(2)=0.d0
  17. resu(3)=0.d0
  18. resu(4)=0.d0
  19. resu(5)=0.d0
  20. resu(6)=0.d0
  21. resu(7)=0.d0
  22. resu(8)=0.d0
  23. do i=0,lon-8,8
  24. resu(1)=resu(1)+val1(i+1)*val2(i+1)
  25. resu(2)=resu(2)+val1(i+2)*val2(i+2)
  26. resu(3)=resu(3)+val1(i+3)*val2(i+3)
  27. resu(4)=resu(4)+val1(i+4)*val2(i+4)
  28. resu(5)=resu(5)+val1(i+5)*val2(i+5)
  29. resu(6)=resu(6)+val1(i+6)*val2(i+6)
  30. resu(7)=resu(7)+val1(i+7)*val2(i+7)
  31. resu(8)=resu(8)+val1(i+8)*val2(i+8)
  32. enddo
  33. if (i.le.lon-4) then
  34. resu(1)=resu(1)+val1(i+1)*val2(i+1)
  35. resu(2)=resu(2)+val1(i+2)*val2(i+2)
  36. resu(3)=resu(3)+val1(i+3)*val2(i+3)
  37. resu(4)=resu(4)+val1(i+4)*val2(i+4)
  38. i=i+4
  39. endif
  40. if (i.le.lon-2) then
  41. resu(1)=resu(1)+val1(i+1)*val2(i+1)
  42. resu(2)=resu(2)+val1(i+2)*val2(i+2)
  43. i=i+2
  44. endif
  45. if (i.le.lon-1) then
  46. resu(1)=resu(1)+val1(i+1)*val2(i+1)
  47. endif
  48. ddotpv=resu(1)+resu(2)+resu(3)+resu(4)+
  49. > resu(5)+resu(6)+resu(7)+resu(8)
  50. return
  51. end
  52.  
  53.  
  54.  
  55.  
  56.  

© Cast3M 2003 - Tous droits réservés.
Mentions légales