Exportar (0) Imprimir
Expandir todo
Expandir Minimizar

_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
);

[in] a

A 128-bit parameter that contains two 64-bit floating point values.

The result can be expressed with the following equations:

r0 := FLOOR(a0)
r1 := FLOOR(a1)

Intrinsic

Architecture

_mm_floor_pd

x86, x64

Header file <smmintrin.h>

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;
}
Original a: 3.900000    -0.125000
Result res: 3.000000    -1.000000

Adiciones de comunidad

AGREGAR
Mostrar:
© 2014 Microsoft