How to Use This Document

This User's Guide explains how you can use the Intel® C++ Compiler. It provides information on how to get started with the Intel C++ Compiler, how this compiler operates and what capabilities it offers for high performance. You learn how to use the standard and advanced compiler optimizations to gain maximum performance for your application.

This documentation assumes that you are familiar with the C and C++ programming languages and with the Intel processor architecture. You should also be familiar with the host computer's operating system.

Note

This document explains how information and instructions apply differently to each targeted architecture. If there is no specific indication to either architecture, the description is applicable to both architectures.

Conventions

This documentation uses the following conventions:

This type style Indicates an element of syntax, reserved word, keyword, filename, computer output, or part of a program example. The text appears in lowercase unless uppercase is significant.
This type style Indicates the exact characters you type as input.
This type style Indicates a placeholder for an identifier, an expression, a string, a symbol, or a value. Substitute one of these items for the placeholder.
[ items ] Indicates that the items enclosed in brackets are optional.
{ item1 | item2 |... } Used for option's version; for example, option -x{K|W|B|N|P} has these versions: -xK, -xW, -xB, -xN and -xP.
... (ellipses) Indicate that you can repeat the preceding item.

Naming Syntax for the Intrinsics

Most intrinsic names use a notational convention as follows:

_mm_<intrin_op>_<suffix>

<intrin_op> Indicates the intrinsics basic operation; for example, add for addition and sub for subtraction.
<suffix> Denotes the type of data operated on by the instruction. The first one or two letters of each suffix denotes whether the data is packed (p), extended packed (ep), or scalar (s). The remaining letters denote the type:
  • __s single-precision floating point
  • __d double-precision floating point
  • __i128 signed 128-bit integer
  • __i64 signed 64-bit integer
  • __u64 unsigned 64-bit integer
  • __i32 signed 32-bit integer
  • __u32 unsigned 32-bit integer
  • __i16 signed 16-bit integer
  • __u16 unsigned 16-bit integer
  • __i8 signed 8-bit integer
  • __u8 unsigned 8-bit integer 

A number appended to a variable name indicates the element of a packed object. For example, r0 is the lowest word of r. Some intrinsics are "composites" because they require more than one instruction to implement them.

The packed values are represented in right-to-left order, with the lowest value being used for scalar operations. Consider the following example operation:

double a[2] = {1.0, 2.0}; __m128d t = _mm_load_pd(a);

The result is the same as either of the following:

__m128d t = _mm_set_pd(2.0, 1.0); __m128d t = _mm_setr_pd(1.0, 2.0);

In other words, the xmm register that holds the value t will look as follows:

The "scalar" element is 1.0. Due to the nature of the instruction, some intrinsics require their arguments to be immediates (constant integer literals).

See Also Naming Syntax and Usage for intrinsics.

Naming Syntax for the Class Libraries

The name of each class denotes the data type, signedness, bit size, number of elements using the following generic format:

<type><signedness><bits>vec<elements>

{ F | I } { s | u } { 64 | 32 | 16 | 8 } vec { 8 | 4 | 2 | 1 }

where

<type> Indicates floating point ( F ) or integer ( I )
<signedness> Indicates signed ( s ) or unsigned ( u ). For the Ivec class, leaving this field blank indicates an intermediate class. There are no unsigned Fvec classes, therefore for the Fvec classes, this field is blank.
<bits> Specifies the number of bits per element
<elements> Specifies the number of elements