Function core::arch::x86::_mm_loadh_pi [] [src]

pub unsafe fn _mm_loadh_pi(a: __m128, p: *const __m64) -> __m128
🔬 This is a nightly-only experimental API. (stdsimd #48556)
This is supported on x86 and target feature sse only.

Set the upper two single-precision floating-point values with 64 bits of data loaded from the address p; the lower two values are passed through from a.

This corresponds to the MOVHPS / MOVHPD / VMOVHPD instructions.

#[cfg(target_arch = "x86")]
use std::arch::x86::*;
#[cfg(target_arch = "x86_64")]
use std::arch::x86_64::*;

let a = _mm_setr_ps(1.0, 2.0, 3.0, 4.0);
let data: [f32; 4] = [5.0, 6.0, 7.0, 8.0];
let r = _mm_loadh_pi(a, data[..].as_ptr() as *const _) ;
// assert_eq!(r, _mm_setr_ps(1.0, 2.0, 5.0, 6.0));Run