01_processor-core/02_simd-if

Hands-on: SIMD in loops with if statements

C/C++

How to compile and how to execute

1. Run a script of creating working space

$ cd cpp $ bash create_project.sh $ ls Obj_clang Obj_clang.novec

2. Run program

## To run as a batch job $ cd Obj_clang/results $ pjsub task.sh ## Or, to run in an interactive job $ cd Obj_clang/results $ bash task.sh

Exercises A

Exercises B (advanced)

Note

Makefile.clang #Clang mode. Auto-vectorization with scalable vector length and interleaving are allowed. Makefile.clang.512 #Clang mode. Auto-vectorization with 512-bit is allowed. Makefile.clang.novec #Clang mode, without vectorization. Makefile.trad.nosimd #Trad mode, without vectorization. Makefile.trad.simd #Trad mode. Auto-vectorization with -Ksimd=auto is allowed. Makefile.trad.simd2 #Trad mode. Auto-vectorization with -Ksimd=2 is allowed.

Fortran

1. Run a script of creating working space

$ cd fortran $ bash create_project.sh $ ls Obj_nosimd Obj_simd Obj_simd2

2. Run program

## To run as a batch job $ cd Obj_simd/results $ pjsub task.sh ## Or, to run in an interactive job $ cd Obj_simd/results $ bash task.sh

Exercises A

Exercises B (advanced)

Note

Makefile.nosimd #Auto-vectorization is not allowed. Makefile.simd #Auto-vectorization with -Ksimd=auto is allowed. Makefile.simd2 #Auto-vectorization with -Ksimd=2 is allowed.