The Intel® Many Integrated Core (Intel® MIC) Architecture allows you to offload sections of your code to run on both the host CPU and a coprocessor. While the Intel compiler by default compiles your code to run on both the host CPU and coprocessor, writing an application for this architecture is different from writing an application for a CPU in the following ways:
The instruction sets used by the CPU and coprocessor are similar, but not identical.
The host CPU and the coprocessor do not share common system memory.
In order to account for these differences, the Intel® Composer XE includes language extensions to handle the similar instruction sets and memory management. The source 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 CPU and coprocessor. The compiler compiles code to run on both the host CPU and coprocessor. Through the use of a compiler option, you can also compile the same source code to run on just the CPU.
In this tutorial, you will:
Compile the source code into an application that runs on both the host CPU and the coprocessor.
Examine the source code that determines if the coprocessor is running and counts the number of running coprocessors.
Compile the same source code into an application that runs only on the host CPU.