vector_scal_fortran.F 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. C
  2. C StarPU --- Runtime system for heterogeneous multicore architectures.
  3. C
  4. C Copyright (C) 2010 Centre National de la Recherche Scientifique
  5. C Copyright (C) 2010 Institut National de Recherche en Informatique et Automatique
  6. C
  7. C StarPU is free software; you can redistribute it and/or modify
  8. C it under the terms of the GNU Lesser General Public License as published by
  9. C the Free Software Foundation; either version 2.1 of the License, or (at
  10. C your option) any later version.
  11. C
  12. C StarPU is distributed in the hope that it will be useful, but
  13. C WITHOUT ANY WARRANTY; without even the implied warranty of
  14. C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  15. C
  16. C See the GNU Lesser General Public License in COPYING.LGPL for more details.
  17. C
  18. PROGRAM VECTOR_SCAL
  19. INTEGER,PARAMETER :: F_NX=2048
  20. REAL,DIMENSION(F_NX) :: VECTOR
  21. INTEGER :: I
  22. DO I=1,F_NX,1
  23. VECTOR(I)=1.0
  24. ENDDO
  25. WRITE (*,*) ' BEFORE : First element was ', VECTOR(1)
  26. WRITE (*,*) ' BEFORE : Last element was ', VECTOR(F_NX)
  27. CALL COMPUTE(F_NX, VECTOR)
  28. WRITE (*,*) ' AFTER : First element is ', VECTOR(1)
  29. WRITE (*,*) ' AFTER : Last element is ', VECTOR(F_NX)
  30. END PROGRAM