The Intel® Xeon Phi™ coprocessor allows you to offload sections of your code to run on both the host and target. While the Intel compiler by default compiles your code to run on both the host and target, writing an application for this architecture is different from writing an application for a host in the following ways:
The instruction sets used by the host and target are similar, but not identical.
The host and the target do not share common system memory.
In order to account for these differences, the Intel compiler includes language extensions to handle the similar instruction sets and memory management. The code used in this tutorial contains these language extensions to specify the sections that can be offloaded to the coprocessor and transfer data between the host and target. By default, the compiler compiles the code into an application that runs on both the host and target. Through the use of a compiler option, you can also compile the same code into an application that runs only on the host.
In this tutorial, you will:
Compile the code into an application that runs on both the host and the target.
Examine the code that counts the number of targets.
Examine the code section that is offloaded to the coprocessor.
Compile the same code into an application that runs only on the host.
This tutorial is available in Linux* and Windows* versions.