Intel® C++ Compiler 16.0 User and Reference Guide

Allocating Variables and Arrays Efficiently

This topic only applies to Intel® 64 and IA-32 architectures targeting Intel® Graphics Technology.

The Intel® Graphics Technology Register File (GRF) is a register file with flexible addressing modes, allowing for both direct register naming and indirect access of GRF sub-regions.

During compile time, the compiler tries to allocate variables and arrays with automatic storage, within a function or block scope, on the GRF when possible.

The following conditions must be true to enable GRF allocation of a variable, including arrays:

If any of these conditions are not true, the variable or array is allocated in the stack memory area.

GRF access is very efficient because of its low access latency and short instruction sequences. GRF-allocated arrays may be particularly useful for caching uniform data. But consider the following:

Note

By default, the compiler generates an intermediate form of code for Intel® Graphics Technology. At application runtime, the Intel® Graphics Technology driver's just-in-time (JIT) compiler produces executable code from the intermediate form.

You can also compile executable code directly using the compiler option mgpu-arch (Linux*) or Qgpu-arch (Windows*).

See Also