Intel® C++ Compiler 16.0 User and Reference Guide

Shift Functions for Intel® Graphics Technology

Logically shift bits in src to the left by the lowest five bits in count. This topic only applies to Intel® 64 and IA-32 architectures targeting Intel® Graphics Technology.

Syntax

Integer Shift

char _gfx_slli_i8(char src, unsigned int count, unsigned int flags);

short _gfx_slli_i16(short src, unsigned int count, unsigned int flags);

int _gfx_slli_i32(int src, unsigned int count, unsigned int flags);

Vector Shift

char _gfx_sllv_i8(char src, char count, unsigned int flags);

short _gfx_sllv_i16(short src, short count, unsigned int flags);

int _gfx_sllv_i32(int src, int count, unsigned int flags);

Parameters

src

The source operand.

count

The number of bits by which to shift src to the left. The lowest five bits in count are considered.

flags

A flag indicating the additional semantic of the operation. Possible values are:

GFX_SAT

Performs the operation in saturating mode.

0

Performs the operation in non-saturating mode.

Description

These functions logically shift bits in src to the left by the count specified in the lowest five bits of the count operand, inserting zero bits to the right. Higher bits of count are ignored.

You can perform the operations in saturating or non-saturating modes by specifying the value of flags.

In saturating mode, if the result of the operation is not representable by the destination type, the result is clamped to the nearest boundary of the destination type's range, as long as the shifted result is within 33 bits. Otherwise, the result is undefined. In non-saturating mode, the result is the lower 8, 16 or 32 bits of the shifted result, depending on the operand size of the intrinsic.

Return Values

The result of the operation.