Exportar (0) Imprimir
Expandir todo
Expandir Minimizar

_mm_cvtsi128_si64

Microsoft Specific

Emits the Streaming SIMD Extensions 2 (SSE2) instruction movq. This instruction extracts the low order 64-bit integer from the parameter.


__int64 _mm_cvtsi128_si64( 
   __m128i a
);

[in] a

A 128-bit parameter that contains a 64-signed integer in the lowest 64 bits.

The result can be expressed with the following equation:

r := a0

Intrinsic

Architecture

_mm_cvtsi128_si64

x64

Header file <emmintrin.h>

r is the 64-bit signed integer result.a0 is the lower 64 bits of parameter a. The upper 64 bits of parameter a are ignored.

Before you use this intrinsic, software must ensure that the processor supports the instruction.

#include <stdio.h>
#include <emmintrin.h>

int main ()
{
    __m128i a;

    a.m128i_i64[0] = -65535;
    a.m128i_i64[1] = 1;

    __int64 res = _mm_cvtsi128_si64(a);

    printf_s("Original a: %I64d\t%I64d\n", a.m128i_i64[1], a.m128i_i64[0]);
    printf_s("Result res: %I64d\n", res);

    return 0;
}
Original a: 1   -65535
Result res: -65535

Adiciones de comunidad

AGREGAR
Mostrar:
© 2015 Microsoft