_mm_floor_pd
Microsoft Specific
Emits the Streaming SIMD Extensions 4 (SSE4) instruction roundpd. This instruction rounds the parameter down.
__m128d _mm_floor_pd( __m128d a );
r0 and a0 are the lower 64 bits of return value r and parameter a. r1 and a1 are the higher 64 bits of return value r and parameter a.
This function is implemented as a macro that invokes _mm_round_pd.
Before you use this intrinsic, software must ensure that the processor supports the instruction.
#include <stdio.h>
#include <smmintrin.h>
int main ()
{
__m128d a;
a.m128d_f64[0] = 3.9;
a.m128d_f64[1] = -0.125;
__m128d res = _mm_floor_pd(a);
printf_s("Original a: %I64f\t%I64f\n",
a.m128d_f64[0], a.m128d_f64[1]);
printf_s("Result res: %I64f\t%I64f\n",
res.m128d_f64[0], res.m128d_f64[1]);
return 0;
}