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

Pack Operators

  • Pack the eight 32-bit values found in A and B into eight 16-bit values with signed saturation:
    Is16vec8 pack_sat(Is32vec2 A,Is32vec2 B);
    
    Corresponding intrinsic: _mm_packs_epi32
  • Pack the four 32-bit values found in A and B into eight 16-bit values with signed saturation:
    Is16vec4 pack_sat(Is32vec2 A,Is32vec2 B);
    
    Corresponding intrinsic: _mm_packs_pi32
  • Pack the sixteen 16-bit values found in A and B into sixteen 8-bit values with signed saturation:
    Is8vec16 pack_sat(Is16vec4 A,Is16vec4 B);
    
    Corresponding intrinsic: _mm_packs_epi16
  • Pack the eight 16-bit values found in A and B into eight 8-bit values with signed saturation:
    Is8vec8 pack_sat(Is16vec4 A,Is16vec4 B);
    
    Corresponding intrinsic: _mm_packs_pi16
  • Pack the sixteen 16-bit values found in A and B into sixteen 8-bit values with unsigned saturation:
    Iu8vec16 packu_sat(Is16vec4 A,Is16vec4 B);
    
    Corresponding intrinsic: _mm_packus_epi16
  • Pack the eight 16-bit values found in A and B into eight 8-bit values with unsigned saturation:
    Iu8vec8 packu_sat(Is16vec4 A,Is16vec4 B);
    
    Corresponding intrinsic: _mm_packs_pu16