vector_scal_fortran.F 1.1 KB

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