- Install OpenCilk from here
- Compile with
clang++ ./bitonic_sort.cpp -O3 -march=native -fopencilkif you want parallel code orclang++ ./bitonic_sort.cpp -O3 -march=native -DNPARALLELfor serial code. - Run
./a.out [n]where n is the size of array you want generated and tested
CilkScale can measure the parallelism this code exhibits in practice.
- Compile with
clang++ ./bitonic_sort.cpp -O3 -march=native -fopencilk -fcilktool=cilkscale - Run
./a.out [n]where n is the size of array you want generated and tested