Intel® C++ Compiler 16.0 User and Reference Guide

Conversion Functions for Intel® Graphics Technology

Convert a source operand to a destination type in saturating mode. This topic only applies to Intel® 64 and IA-32 architectures targeting Intel® Graphics Technology.

Syntax

Unsigned Conversion

unsigned char _cvtsu32_u8(unsigned int src);

unsigned char _cvtsf32_u8(float src);

unsigned short _cvtsu32_u16(unsigned int src);

unsigned short _cvtsf32_u16(float src);

unsigned int _cvtsf32_u32(float src);

Signed Conversion

char _cvtssi32_si8(int src);

char _cvtsf32_si8(float src);

short _cvtssi32_si16(int src);

short _cvtsf32_si16(float src);

int _cvtsf32_si32(float src);

Floating-point Conversion

float _clampz1_f32(float src);

Parameters

src

The source operand.

Description

These functions convert src to the destination type in saturating mode. If the result of the conversion is not representable by the destination type, the result will be clamped to the nearest boundary of the destination type’s range.

float _clampz1_f32 clamps src to the range [-1, 1] range, meaning that if the result of the conversion exceeds the range, the result is clamped to the nearest range boundary.

Return Values

The result of the operation.