Developer Guide

Contents

Multi-Threaded Host Application

When there are parallel, independent datapaths and the host must process the data between kernel executions, consider using a multi-threaded host application.
The following figure illustrates how a single-threaded host application might process parallel, independent datapaths between kernel executions:
Kernel Execution by a Single-Threaded Host Application
Kernel Execution by a Single-Threaded Host Application
The DPC++ runtime is thread safe and supports multithreaded applications. Thus, you can perform tasks on the host in parallel threads while still allowing those threads to access the DPC++ APIs in a thread-safe way.
The following figure illustrates how a multi-threaded host application processes parallel, independent datapaths between kernel executions:
Kernel Execution by a Multi-Threaded Host Application in a Thread-Safe Runtime Environment
Kernel Execution by a Multi-Threaded Host Application in a Thread-Safe Runtime Environment

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.