Intel® oneAPI DPC++/C++ Compiler Developer Guide and Reference

ID 767253
Date 3/31/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Conversions between Fvec and Ivec

  • Convert the lower double-precision floating-point value of A to a 32-bit integer with truncation:
    int F64vec2ToInt(F64vec42 A);
    r := (int)A0;
    
  • Convert the four floating-point values of A to two the two least significant double-precision floating-point values:
    F64vec2 F32vec4ToF64vec2(F32vec4 A);
    r0 := (double)A0;
    r1 := (double)A1;
    
  • Convert the two double-precision floating-point values of A to two single-precision floating-point values:
    F32vec4 F64vec2ToF32vec4(F64vec2 A);
    r0 := (float)A0;
    r1 := (float)A1;
    
  • Convert the signed int in B to a double-precision floating-point value and pass the upper double-precision value from A through to the result:
    F64vec2 InttoF64vec2(F64vec2 A, int B);
    r0 := (double)B;
    r1 := A1;
    
  • Convert the lower floating-point value of A to a 32-bit integer with truncation:
    int F32vec4ToInt(F32vec4 A);
    r := (int)A0;
    
  • Convert the two lower floating-point values of A to two 32-bit integer with truncation, returning the integers in packed form:
    Is32vec2 F32vec4ToIs32vec2 (F32vec4 A);
    r0 := (int)A0;
    r1 := (int)A1;
    
  • Convert the 32-bit integer value B to a floating-point value; the upper three floating-point values are passed through from A:
    F32vec4 IntToF32vec4(F32vec4 A, int B);
    r0 := (float)B;
    r1 := A1;
    r2 := A2;
    r3 := A3;
    
  • Convert the two 32-bit integer values in packed form in B to two floating-point values; the upper two floating-point values are passed through from A:
    F32vec4 Is32vec2ToF32vec4(F32vec4 A, Is32vec2 B);
    r0 := (float)B0;
    r1 := (float)B1;
    r2 := A2;
    r3 := A3;