OpenMP II
摘要
This chapter is concerned with the subdivision of iterations in a for loop using OpenMP. Algorithms implemented by looping over the contents of containers are a common occurrence in computational code. OpenMP provides specific directives that are targeted at subdividing C/C++ and Fortran fforloops such that multiple threads can handle different iterations. This construct of course assumes that the different iterations of a for loop are independent, and care needs to be taken when this is not the case.