Auto-parallelizer: #pragma loop
I just discovered that MSVC++ can automatically run each iteration of a loop in parallel in separate threads. Add "#pragma loop(hint_parallel(8))" and "#pragma loop(ivdep)" before the loop, and compile with the /Qpar option. This simple change sped up my cryoablation simulation code by 4x.
3 comments
[ 3.3 ms ] story [ 16.7 ms ] thread