1.4. Multi-Threaded Host Application
Parallel threads are launched one thread every clock cycle in a pipelined manner where as loop pipelining enables pipeline parallelism and communication of state information between loop iterations. Loop dependencies may not be resolved in one clock cycle.
The figure below illustrates how a single-threaded host application processes parallel, independent data paths between kernel executions:
With a single-threaded host application, you need to build an external synchronization mechanism around the OpenCL™ host function calls. Using a multi-threaded host application in a thread-safe runtime environment allows you to simplify the host code. In addition, processing multiple sets of data in the host simultaneously can speed up kernel execution.
The figure below illustrates how a multi-threaded host application processes parallel, independent data paths between kernel executions:
Did you find the information on this page useful?