Quantcast
Channel: Intel Developer Zone Articles
Viewing all articles
Browse latest Browse all 3384

Using Intel(R) C++ Compiler with Intel(R) Processor Graphics

$
0
0

Authors: Konstantin Bobrovsky, Vyacheslav Shakin and Knud Kirkegaard

Introduction

Intel processor products are built around central processing units (CPU), also known as cores.  Most of the processors also include Intel® HD Graphics or Intel® Iris Pro, which are general purpose graphics (GFX) processing units (GPGPU).  The total computational power may exceed that of all CPU cores included in the same processor package. This gives software engineers searching for better application performance a strong incentive to investigate software development tools, such as the Intel® C+ + compiler, that support them whether for graphics-related work or general compute-intensive workloads. 

To take advantage of GPGPUs, software developers write their code so that parts of their application run on available CPUs while other parts are offloaded to the GPGPU.  Intel® HD Graphics and Intel® Iris Pro support such offloading.  Unlike other GPGPUs, they can share physical memory with the CPU and avoid data transfer penalties, which can add to application performance and simplify tuning and maintenance.  Intel® HD Graphics and Intel® Iris Pro also impose minimal restrictions on the offloaded code, which further simplifies tuning and maintenance. Other interesting useful features supported in the Intel platform include a large register file (GRF) with flexible addressing modes, which can be used for very efficient gather/scatter operations, and hardware acceleration of video/graphics functions, among others. 

Offloading parts of applications to discrete graphics cards is usually associated with significant software development efforts. Careful manual parallelization of offloaded loops, preparations of data buffers, setting up arguments for GPU functions, among other things, must be implemented and, of course, debugged, tuned and tested before use. Until recently, software development tools offered limited help, were tedious to use, presented challenges in preserving existing software code bases, or even compelled developers to re-write code using new and unfamiliar or platform-specific tools. All of this took time to master, cutting into productivity, and which may make code hard to maintain as hardware architectures scale. 

In contrast, the programming models offered in the Intel® C++ compiler enables offloading of existing C/C++ data-parallel code with very few source code changes.  This article provides an overview of programming models offered in the compiler, illustrated by several classic examples, and discusses best programming practices for processor graphics code. Click here for full text article.


Viewing all articles
Browse latest Browse all 3384

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>