Intel® C++ Compiler XE 13.1 User and Reference Guides
For Intel legacy tasking, specifies an environment for the while loop in which to enqueue the units of work specified by the enclosed task pragma.
#pragma intel_omp_taskq[clause[[,]clause]...] |
structured-block |
clause |
clause can be any of the following:
|
The intel_omp_taskq/taskq pragma specifies the environment within which the enclosed units of work (tasks) are to be executed. From among all the threads that encounter a taskq pragma, one is chosen to execute it initially.
Conceptually, the taskq pragma causes an empty queue to be created by the chosen thread, and then the code inside the taskq block is executed single-threaded. All the other threads wait for work to be enqueued on the conceptual queue.
The task pragma specifies a unit of work, potentially executed by a different thread. When a task pragma is encountered lexically within a taskq block, the code inside the task block is conceptually enqueued on the queue associated with the taskq. The conceptual queue is disbanded when all work enqueued on it finishes, and when the end of the taskq block is reached.