Building an Application to Run on the Host Only

In this step, you will compile the same code into an application that runs only on the host. You can use the steps in this section to compile an early version of your code where the offload language extensions are ignored by the compiler. When you ignore the extensions, you can make sure that the application runs correctly on just the host. Once you have your application running on the host correctly, you can compile the same code into an application that runs on both the host and target.

  1. Click Build > Solution.

  2. Click Project > LEO_tutorial Properties > C/C++ > Code Generation > Intel specific > Offload Constructs > None (/Qoffload:none) and then click the OK button.

    The /Qoffload:none option sets the compiler to ignore the offload language extensions and not define the __INTEL_OFFLOAD macro.

  3. Click Build > Build Solution.

  4. Click Debug > Start Without Debugging.

Just as before, the application displays the first 20 values in ascending order and the first ten even, odd, and prime numbers. However, this version does not display the quantity of targets because the compiler ignored the code block for the #ifdef pragma with the __INTEL_OFFLOAD macro.

This step is the last step in the tutorial.


Submit feedback on this help topic