- or download this
// rtoa-pgatram-openmp.cpp. Crude first attempt at an OpenMp version.
// Compile with:
...
return 0;
}
- or download this
$ time NUM_THREADS=1 ./rtoa-pgatram-openmp t1.txt t1.txt t1.txt t1.txt
+ >s.tmp
use OpenMP
...
real 0m1.278s
user 0m0.928s
sys 0m0.350s
- or download this
$ time NUM_THREADS=4 ./rtoa-pgatram-openmp t1.txt t1.txt t1.txt t1.txt
+ >s.tmp
use OpenMP
...
sys 0m0.539s
$ cmp f.tmp s.tmp