This documentation is archived and is not being maintained.


Microsoft Specific

Provides a way to initialize the two 64-bit elements of the __m128i structure with two identical integers.

__m128i _mm_set1_epi64x( 
   __int64 i 


[in] i

A 64-bit integer to use to initialize the result.

An __m128i structure whose two 64-bit integer members are initialized with the input parameter.

Intrinsic Architecture



Header file <intrin.h>

Because the __m128i structure represents an XMM register, this intrinsic provides a way of writing values from system memory to the XMM registers.

This routine is only available as an intrinsic.

// _mm_set1_epi64x.cpp
// processor: x64
#include <intrin.h>
#include <stdio.h>

#pragma intrinsic(_mm_set1_epi64x)

int main()
    __m128i c;
    __int64 a = 2;

    c = _mm_set1_epi64x(a);

    printf_s("%I64d %I64d\n", c.m128i_i64[0], c.m128i_i64[1]);


2 2