Exportar (0) Imprimir
Expandir todo
Expandir Minimizar

_mm_movedup_pd

Microsoft Specific

Generates the movddup instruction.

__m128d _mm_movedup_pd( 
   __m128d value
);

[in] value

The source data.

Intrinsic

Architecture

_mm_movedup_pd

Intel SSE3

Header file <intrin.h>

The _mm_movedup_pd intrinsic moves the double-precision 64-bit value in the lower half of the source operand (memory or XMM register) value into the lower and upper halves of an XMM register, duplicating the value in both halves of the destination register.

// processor: x86 with SSE3
// Execute the moveduppd instruction using the intrinsic
// _mm_movedup_pd 

#include <stdio.h>
#include <intrin.h>

#pragma intrinsic ( _mm_movedup_pd )

int main( )
{
    __m128d u, w;
    __declspec(align(16)) double a[2] = { 0.1, 0.2 };

    // Load the array a into an XMM register.
    u = _mm_load_pd( a );
  
    printf_s("Calling _mm_movedup_pd to load the value.\n");
    w = _mm_movedup_pd ( u );

    printf_s("Result: %e %e \n", w.m128d_f64[0], w.m128d_f64[1]);
}
Calling _mm_movedup_pd to load the value.
Result: 1.000000e-001 1.000000e-001

Adiciones de comunidad

AGREGAR
Mostrar:
© 2014 Microsoft