_mm_ceil_pd
Microsoft Specific
Emits the Streaming SIMD Extensions 4 (SSE4) instruction roundpd. This instruction rounds up a packed double precision floating point value.
__m128d _mm_ceil_pd( __m128d a );
r0, a0 are the low order 64 bits of return value r and parameter a.
r1, a1 are the high order 64 bits of return value r and parameter a.
This function is implemented as a macro that invokes intrinsic _mm_round_pd with appropriate rounding control.
Before using this intrinsic, software must ensure that the processor supports the instruction.
#include <stdio.h>
#include <smmintrin.h>
int main () {
__m128d a;
a.m128d_f64[1] = 10.4;
a.m128d_f64[0] = -6.5;
__m128d res = _mm_ceil_pd( a );
printf_s("Original a: %8f %8f\n",
a.m128d_f64[1], a.m128d_f64[0]);
printf_s("Result res: %8f %8f\n",
res.m128d_f64[1], res.m128d_f64[0]);
return 0;
}