This repository aims to guide user through using the CLAW Language directive as well as the CLAW Compiler to transform their Fortran code.
Original code is here
- Merge all the 4 loops together to form only a single loop. [solution] [transformed]
- Merge the two first loops together and the two last ones together. [solution] [transformed]
clawfc -o transformed_code.f90 code.f90
Original code is here
- Reorder loop
i
withj
[solution] [transformed]
clawfc -o transformed_code.f90 code.f90
If you are still willing to learn about the CLAW Compiler and you want to implement your own transformation then you should keep going with this exercise section.