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.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

OpenMP II

  • Raymond J. Spiteri,
  • Kyle Klenk

摘要

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.