Intel® Advisor User Guide

ID 766448
Date 7/13/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Enable Task Chunking

Chunking means that the parallel framework will merge several tasks into a single task, with little or no overhead between them. For instance, if tasks are loop iterations, chunking would mean that several iterations are executed together (as a chunk) before heavyweight task control is performed.

Chunking is typically implemented when you convert to a parallel framework:

  • With Intel® oneAPI Threading Building Blocks, by using a parallel_for() instance.

  • With OpenMP*, by using the C/C++ pragma #pragma omp parallel for or the Fortran directive !$omp parallel do.

You can also restructure your code to enable chunking. This can be done by modifying a single loop to create a new outer loop where the two loops cover the same