Developer Guide and Reference

Contents

Floating Point Rounding Intrinsics

These Intel® Streaming SIMD Extensions 4 (Intel® SSE4) rounding intrinsics cover scalar and packed single-precision and double-precision floating-point operands. The prototypes for these intrinsics are in the
smmintrin.h
file.
To use these intrinsics, include the
immintrin.h
file as follows:
#include <immintrin.h>
The
floor
and
ceil
intrinsics correspond to the definitions of
floor
and
ceil
in the ISO 9899:1999 standard for the C programming language.
Intrinsic Syntax
Operation
Corresponding
Intel® SSE4 Instruction
__m128d _mm_round_pd(__m128d s1, int iRoundMode)
__m128d _mm_floor_pd(__m128d s1)
__m128d _mm_ceil_pd(__m128d s1)
Packed double-precision float rounding
ROUNDPD
__m128 _mm_round_ps(__m128 s1, int iRoundMode)
__m128 _mm_floor_ps(__m128 s1)
__m128 _mm_ceil_ps(__m128 s1)
Packed single-precision float rounding
ROUNDPS
__m128d _mm_round_sd(__m128d dst, __m128d s1, int iRoundMode)
__m128d _mm_floor_sd(__m128d dst, __m128d s1)
__m128d _mm_ceil_sd(__m128d dst, __m128d s1)
Single double-precision float rounding
ROUNDSD
__m128 _mm_round_ss(__m128 dst, __m128d s1, int iRoundMode)
__m128 _mm_floor_ss(__m128d dst, __m128 s1)
__m128 _mm_ceil_ss(__m128d dst, __m128 s1)
Single single-precision float rounding
ROUNDSS

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804