use crate::core_arch::{simd::*, x86::*};
use crate::intrinsics::simd::*;
#[cfg(test)]
use stdarch_test::assert_instr;
#[inline]
#[target_feature(enable = "avx512vnni")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpwssd))]
pub unsafe fn _mm512_dpwssd_epi32(src: __m512i, a: __m512i, b: __m512i) -> __m512i {
transmute(vpdpwssd(src.as_i32x16(), a.as_i32x16(), b.as_i32x16()))
}
#[inline]
#[target_feature(enable = "avx512vnni")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpwssd))]
pub unsafe fn _mm512_mask_dpwssd_epi32(
src: __m512i,
k: __mmask16,
a: __m512i,
b: __m512i,
) -> __m512i {
let r = _mm512_dpwssd_epi32(src, a, b).as_i32x16();
transmute(simd_select_bitmask(k, r, src.as_i32x16()))
}
#[inline]
#[target_feature(enable = "avx512vnni")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpwssd))]
pub unsafe fn _mm512_maskz_dpwssd_epi32(
k: __mmask16,
src: __m512i,
a: __m512i,
b: __m512i,
) -> __m512i {
let r = _mm512_dpwssd_epi32(src, a, b).as_i32x16();
let zero = _mm512_setzero_si512().as_i32x16();
transmute(simd_select_bitmask(k, r, zero))
}
#[inline]
#[target_feature(enable = "avxvnni")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(
all(test, any(target_os = "linux", target_env = "msvc")),
assert_instr(vpdpwssd)
)]
pub unsafe fn _mm256_dpwssd_avx_epi32(src: __m256i, a: __m256i, b: __m256i) -> __m256i {
transmute(vpdpwssd256(src.as_i32x8(), a.as_i32x8(), b.as_i32x8()))
}
#[inline]
#[target_feature(enable = "avx512vnni,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpwssd))]
pub unsafe fn _mm256_dpwssd_epi32(src: __m256i, a: __m256i, b: __m256i) -> __m256i {
transmute(vpdpwssd256(src.as_i32x8(), a.as_i32x8(), b.as_i32x8()))
}
#[inline]
#[target_feature(enable = "avx512vnni,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpwssd))]
pub unsafe fn _mm256_mask_dpwssd_epi32(
src: __m256i,
k: __mmask8,
a: __m256i,
b: __m256i,
) -> __m256i {
let r = _mm256_dpwssd_epi32(src, a, b).as_i32x8();
transmute(simd_select_bitmask(k, r, src.as_i32x8()))
}
#[inline]
#[target_feature(enable = "avx512vnni,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpwssd))]
pub unsafe fn _mm256_maskz_dpwssd_epi32(
k: __mmask8,
src: __m256i,
a: __m256i,
b: __m256i,
) -> __m256i {
let r = _mm256_dpwssd_epi32(src, a, b).as_i32x8();
let zero = _mm256_setzero_si256().as_i32x8();
transmute(simd_select_bitmask(k, r, zero))
}
#[inline]
#[target_feature(enable = "avxvnni")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(
all(test, any(target_os = "linux", target_env = "msvc")),
assert_instr(vpdpwssd)
)]
pub unsafe fn _mm_dpwssd_avx_epi32(src: __m128i, a: __m128i, b: __m128i) -> __m128i {
transmute(vpdpwssd128(src.as_i32x4(), a.as_i32x4(), b.as_i32x4()))
}
#[inline]
#[target_feature(enable = "avx512vnni,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpwssd))]
pub unsafe fn _mm_dpwssd_epi32(src: __m128i, a: __m128i, b: __m128i) -> __m128i {
transmute(vpdpwssd128(src.as_i32x4(), a.as_i32x4(), b.as_i32x4()))
}
#[inline]
#[target_feature(enable = "avx512vnni,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpwssd))]
pub unsafe fn _mm_mask_dpwssd_epi32(src: __m128i, k: __mmask8, a: __m128i, b: __m128i) -> __m128i {
let r = _mm_dpwssd_epi32(src, a, b).as_i32x4();
transmute(simd_select_bitmask(k, r, src.as_i32x4()))
}
#[inline]
#[target_feature(enable = "avx512vnni,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpwssd))]
pub unsafe fn _mm_maskz_dpwssd_epi32(k: __mmask8, src: __m128i, a: __m128i, b: __m128i) -> __m128i {
let r = _mm_dpwssd_epi32(src, a, b).as_i32x4();
let zero = _mm_setzero_si128().as_i32x4();
transmute(simd_select_bitmask(k, r, zero))
}
#[inline]
#[target_feature(enable = "avx512vnni")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpwssds))]
pub unsafe fn _mm512_dpwssds_epi32(src: __m512i, a: __m512i, b: __m512i) -> __m512i {
transmute(vpdpwssds(src.as_i32x16(), a.as_i32x16(), b.as_i32x16()))
}
#[inline]
#[target_feature(enable = "avx512vnni")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpwssds))]
pub unsafe fn _mm512_mask_dpwssds_epi32(
src: __m512i,
k: __mmask16,
a: __m512i,
b: __m512i,
) -> __m512i {
let r = _mm512_dpwssds_epi32(src, a, b).as_i32x16();
transmute(simd_select_bitmask(k, r, src.as_i32x16()))
}
#[inline]
#[target_feature(enable = "avx512vnni")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpwssds))]
pub unsafe fn _mm512_maskz_dpwssds_epi32(
k: __mmask16,
src: __m512i,
a: __m512i,
b: __m512i,
) -> __m512i {
let r = _mm512_dpwssds_epi32(src, a, b).as_i32x16();
let zero = _mm512_setzero_si512().as_i32x16();
transmute(simd_select_bitmask(k, r, zero))
}
#[inline]
#[target_feature(enable = "avxvnni")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(
all(test, any(target_os = "linux", target_env = "msvc")),
assert_instr(vpdpwssds)
)]
pub unsafe fn _mm256_dpwssds_avx_epi32(src: __m256i, a: __m256i, b: __m256i) -> __m256i {
transmute(vpdpwssds256(src.as_i32x8(), a.as_i32x8(), b.as_i32x8()))
}
#[inline]
#[target_feature(enable = "avx512vnni,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpwssds))]
pub unsafe fn _mm256_dpwssds_epi32(src: __m256i, a: __m256i, b: __m256i) -> __m256i {
transmute(vpdpwssds256(src.as_i32x8(), a.as_i32x8(), b.as_i32x8()))
}
#[inline]
#[target_feature(enable = "avx512vnni,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpwssds))]
pub unsafe fn _mm256_mask_dpwssds_epi32(
src: __m256i,
k: __mmask8,
a: __m256i,
b: __m256i,
) -> __m256i {
let r = _mm256_dpwssds_epi32(src, a, b).as_i32x8();
transmute(simd_select_bitmask(k, r, src.as_i32x8()))
}
#[inline]
#[target_feature(enable = "avx512vnni,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpwssds))]
pub unsafe fn _mm256_maskz_dpwssds_epi32(
k: __mmask8,
src: __m256i,
a: __m256i,
b: __m256i,
) -> __m256i {
let r = _mm256_dpwssds_epi32(src, a, b).as_i32x8();
let zero = _mm256_setzero_si256().as_i32x8();
transmute(simd_select_bitmask(k, r, zero))
}
#[inline]
#[target_feature(enable = "avxvnni")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(
all(test, any(target_os = "linux", target_env = "msvc")),
assert_instr(vpdpwssds)
)]
pub unsafe fn _mm_dpwssds_avx_epi32(src: __m128i, a: __m128i, b: __m128i) -> __m128i {
transmute(vpdpwssds128(src.as_i32x4(), a.as_i32x4(), b.as_i32x4()))
}
#[inline]
#[target_feature(enable = "avx512vnni,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpwssds))]
pub unsafe fn _mm_dpwssds_epi32(src: __m128i, a: __m128i, b: __m128i) -> __m128i {
transmute(vpdpwssds128(src.as_i32x4(), a.as_i32x4(), b.as_i32x4()))
}
#[inline]
#[target_feature(enable = "avx512vnni,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpwssds))]
pub unsafe fn _mm_mask_dpwssds_epi32(src: __m128i, k: __mmask8, a: __m128i, b: __m128i) -> __m128i {
let r = _mm_dpwssds_epi32(src, a, b).as_i32x4();
transmute(simd_select_bitmask(k, r, src.as_i32x4()))
}
#[inline]
#[target_feature(enable = "avx512vnni,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpwssds))]
pub unsafe fn _mm_maskz_dpwssds_epi32(
k: __mmask8,
src: __m128i,
a: __m128i,
b: __m128i,
) -> __m128i {
let r = _mm_dpwssds_epi32(src, a, b).as_i32x4();
let zero = _mm_setzero_si128().as_i32x4();
transmute(simd_select_bitmask(k, r, zero))
}
#[inline]
#[target_feature(enable = "avx512vnni")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpbusd))]
pub unsafe fn _mm512_dpbusd_epi32(src: __m512i, a: __m512i, b: __m512i) -> __m512i {
transmute(vpdpbusd(src.as_i32x16(), a.as_i32x16(), b.as_i32x16()))
}
#[inline]
#[target_feature(enable = "avx512vnni")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpbusd))]
pub unsafe fn _mm512_mask_dpbusd_epi32(
src: __m512i,
k: __mmask16,
a: __m512i,
b: __m512i,
) -> __m512i {
let r = _mm512_dpbusd_epi32(src, a, b).as_i32x16();
transmute(simd_select_bitmask(k, r, src.as_i32x16()))
}
#[inline]
#[target_feature(enable = "avx512vnni")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpbusd))]
pub unsafe fn _mm512_maskz_dpbusd_epi32(
k: __mmask16,
src: __m512i,
a: __m512i,
b: __m512i,
) -> __m512i {
let r = _mm512_dpbusd_epi32(src, a, b).as_i32x16();
let zero = _mm512_setzero_si512().as_i32x16();
transmute(simd_select_bitmask(k, r, zero))
}
#[inline]
#[target_feature(enable = "avxvnni")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(
all(test, any(target_os = "linux", target_env = "msvc")),
assert_instr(vpdpbusd)
)]
pub unsafe fn _mm256_dpbusd_avx_epi32(src: __m256i, a: __m256i, b: __m256i) -> __m256i {
transmute(vpdpbusd256(src.as_i32x8(), a.as_i32x8(), b.as_i32x8()))
}
#[inline]
#[target_feature(enable = "avx512vnni,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpbusd))]
pub unsafe fn _mm256_dpbusd_epi32(src: __m256i, a: __m256i, b: __m256i) -> __m256i {
transmute(vpdpbusd256(src.as_i32x8(), a.as_i32x8(), b.as_i32x8()))
}
#[inline]
#[target_feature(enable = "avx512vnni,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpbusd))]
pub unsafe fn _mm256_mask_dpbusd_epi32(
src: __m256i,
k: __mmask8,
a: __m256i,
b: __m256i,
) -> __m256i {
let r = _mm256_dpbusd_epi32(src, a, b).as_i32x8();
transmute(simd_select_bitmask(k, r, src.as_i32x8()))
}
#[inline]
#[target_feature(enable = "avx512vnni,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpbusd))]
pub unsafe fn _mm256_maskz_dpbusd_epi32(
k: __mmask8,
src: __m256i,
a: __m256i,
b: __m256i,
) -> __m256i {
let r = _mm256_dpbusd_epi32(src, a, b).as_i32x8();
let zero = _mm256_setzero_si256().as_i32x8();
transmute(simd_select_bitmask(k, r, zero))
}
#[inline]
#[target_feature(enable = "avxvnni")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(
all(test, any(target_os = "linux", target_env = "msvc")),
assert_instr(vpdpbusd)
)]
pub unsafe fn _mm_dpbusd_avx_epi32(src: __m128i, a: __m128i, b: __m128i) -> __m128i {
transmute(vpdpbusd128(src.as_i32x4(), a.as_i32x4(), b.as_i32x4()))
}
#[inline]
#[target_feature(enable = "avx512vnni,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpbusd))]
pub unsafe fn _mm_dpbusd_epi32(src: __m128i, a: __m128i, b: __m128i) -> __m128i {
transmute(vpdpbusd128(src.as_i32x4(), a.as_i32x4(), b.as_i32x4()))
}
#[inline]
#[target_feature(enable = "avx512vnni,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpbusd))]
pub unsafe fn _mm_mask_dpbusd_epi32(src: __m128i, k: __mmask8, a: __m128i, b: __m128i) -> __m128i {
let r = _mm_dpbusd_epi32(src, a, b).as_i32x4();
transmute(simd_select_bitmask(k, r, src.as_i32x4()))
}
#[inline]
#[target_feature(enable = "avx512vnni,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpbusd))]
pub unsafe fn _mm_maskz_dpbusd_epi32(k: __mmask8, src: __m128i, a: __m128i, b: __m128i) -> __m128i {
let r = _mm_dpbusd_epi32(src, a, b).as_i32x4();
let zero = _mm_setzero_si128().as_i32x4();
transmute(simd_select_bitmask(k, r, zero))
}
#[inline]
#[target_feature(enable = "avx512vnni")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpbusds))]
pub unsafe fn _mm512_dpbusds_epi32(src: __m512i, a: __m512i, b: __m512i) -> __m512i {
transmute(vpdpbusds(src.as_i32x16(), a.as_i32x16(), b.as_i32x16()))
}
#[inline]
#[target_feature(enable = "avx512vnni")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpbusds))]
pub unsafe fn _mm512_mask_dpbusds_epi32(
src: __m512i,
k: __mmask16,
a: __m512i,
b: __m512i,
) -> __m512i {
let r = _mm512_dpbusds_epi32(src, a, b).as_i32x16();
transmute(simd_select_bitmask(k, r, src.as_i32x16()))
}
#[inline]
#[target_feature(enable = "avx512vnni")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpbusds))]
pub unsafe fn _mm512_maskz_dpbusds_epi32(
k: __mmask16,
src: __m512i,
a: __m512i,
b: __m512i,
) -> __m512i {
let r = _mm512_dpbusds_epi32(src, a, b).as_i32x16();
let zero = _mm512_setzero_si512().as_i32x16();
transmute(simd_select_bitmask(k, r, zero))
}
#[inline]
#[target_feature(enable = "avxvnni")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(
all(test, any(target_os = "linux", target_env = "msvc")),
assert_instr(vpdpbusds)
)]
pub unsafe fn _mm256_dpbusds_avx_epi32(src: __m256i, a: __m256i, b: __m256i) -> __m256i {
transmute(vpdpbusds256(src.as_i32x8(), a.as_i32x8(), b.as_i32x8()))
}
#[inline]
#[target_feature(enable = "avx512vnni,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpbusds))]
pub unsafe fn _mm256_dpbusds_epi32(src: __m256i, a: __m256i, b: __m256i) -> __m256i {
transmute(vpdpbusds256(src.as_i32x8(), a.as_i32x8(), b.as_i32x8()))
}
#[inline]
#[target_feature(enable = "avx512vnni,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpbusds))]
pub unsafe fn _mm256_mask_dpbusds_epi32(
src: __m256i,
k: __mmask8,
a: __m256i,
b: __m256i,
) -> __m256i {
let r = _mm256_dpbusds_epi32(src, a, b).as_i32x8();
transmute(simd_select_bitmask(k, r, src.as_i32x8()))
}
#[inline]
#[target_feature(enable = "avx512vnni,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpbusds))]
pub unsafe fn _mm256_maskz_dpbusds_epi32(
k: __mmask8,
src: __m256i,
a: __m256i,
b: __m256i,
) -> __m256i {
let r = _mm256_dpbusds_epi32(src, a, b).as_i32x8();
let zero = _mm256_setzero_si256().as_i32x8();
transmute(simd_select_bitmask(k, r, zero))
}
#[inline]
#[target_feature(enable = "avxvnni")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(
all(test, any(target_os = "linux", target_env = "msvc")),
assert_instr(vpdpbusds)
)]
pub unsafe fn _mm_dpbusds_avx_epi32(src: __m128i, a: __m128i, b: __m128i) -> __m128i {
transmute(vpdpbusds128(src.as_i32x4(), a.as_i32x4(), b.as_i32x4()))
}
#[inline]
#[target_feature(enable = "avx512vnni,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpbusds))]
pub unsafe fn _mm_dpbusds_epi32(src: __m128i, a: __m128i, b: __m128i) -> __m128i {
transmute(vpdpbusds128(src.as_i32x4(), a.as_i32x4(), b.as_i32x4()))
}
#[inline]
#[target_feature(enable = "avx512vnni,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpbusds))]
pub unsafe fn _mm_mask_dpbusds_epi32(src: __m128i, k: __mmask8, a: __m128i, b: __m128i) -> __m128i {
let r = _mm_dpbusds_epi32(src, a, b).as_i32x4();
transmute(simd_select_bitmask(k, r, src.as_i32x4()))
}
#[inline]
#[target_feature(enable = "avx512vnni,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpdpbusds))]
pub unsafe fn _mm_maskz_dpbusds_epi32(
k: __mmask8,
src: __m128i,
a: __m128i,
b: __m128i,
) -> __m128i {
let r = _mm_dpbusds_epi32(src, a, b).as_i32x4();
let zero = _mm_setzero_si128().as_i32x4();
transmute(simd_select_bitmask(k, r, zero))
}
#[inline]
#[target_feature(enable = "avxvnniint8")]
#[cfg_attr(
all(test, any(target_os = "linux", target_env = "msvc")),
assert_instr(vpdpbssd)
)]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
pub unsafe fn _mm_dpbssd_epi32(src: __m128i, a: __m128i, b: __m128i) -> __m128i {
transmute(vpdpbssd_128(src.as_i32x4(), a.as_i32x4(), b.as_i32x4()))
}
#[inline]
#[target_feature(enable = "avxvnniint8")]
#[cfg_attr(
all(test, any(target_os = "linux", target_env = "msvc")),
assert_instr(vpdpbssd)
)]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
pub unsafe fn _mm256_dpbssd_epi32(src: __m256i, a: __m256i, b: __m256i) -> __m256i {
transmute(vpdpbssd_256(src.as_i32x8(), a.as_i32x8(), b.as_i32x8()))
}
#[inline]
#[target_feature(enable = "avxvnniint8")]
#[cfg_attr(
all(test, any(target_os = "linux", target_env = "msvc")),
assert_instr(vpdpbssds)
)]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
pub unsafe fn _mm_dpbssds_epi32(src: __m128i, a: __m128i, b: __m128i) -> __m128i {
transmute(vpdpbssds_128(src.as_i32x4(), a.as_i32x4(), b.as_i32x4()))
}
#[inline]
#[target_feature(enable = "avxvnniint8")]
#[cfg_attr(
all(test, any(target_os = "linux", target_env = "msvc")),
assert_instr(vpdpbssds)
)]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
pub unsafe fn _mm256_dpbssds_epi32(src: __m256i, a: __m256i, b: __m256i) -> __m256i {
transmute(vpdpbssds_256(src.as_i32x8(), a.as_i32x8(), b.as_i32x8()))
}
#[inline]
#[target_feature(enable = "avxvnniint8")]
#[cfg_attr(
all(test, any(target_os = "linux", target_env = "msvc")),
assert_instr(vpdpbsud)
)]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
pub unsafe fn _mm_dpbsud_epi32(src: __m128i, a: __m128i, b: __m128i) -> __m128i {
transmute(vpdpbsud_128(src.as_i32x4(), a.as_i32x4(), b.as_i32x4()))
}
#[inline]
#[target_feature(enable = "avxvnniint8")]
#[cfg_attr(
all(test, any(target_os = "linux", target_env = "msvc")),
assert_instr(vpdpbsud)
)]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
pub unsafe fn _mm256_dpbsud_epi32(src: __m256i, a: __m256i, b: __m256i) -> __m256i {
transmute(vpdpbsud_256(src.as_i32x8(), a.as_i32x8(), b.as_i32x8()))
}
#[inline]
#[target_feature(enable = "avxvnniint8")]
#[cfg_attr(
all(test, any(target_os = "linux", target_env = "msvc")),
assert_instr(vpdpbsuds)
)]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
pub unsafe fn _mm_dpbsuds_epi32(src: __m128i, a: __m128i, b: __m128i) -> __m128i {
transmute(vpdpbsuds_128(src.as_i32x4(), a.as_i32x4(), b.as_i32x4()))
}
#[inline]
#[target_feature(enable = "avxvnniint8")]
#[cfg_attr(
all(test, any(target_os = "linux", target_env = "msvc")),
assert_instr(vpdpbsuds)
)]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
pub unsafe fn _mm256_dpbsuds_epi32(src: __m256i, a: __m256i, b: __m256i) -> __m256i {
transmute(vpdpbsuds_256(src.as_i32x8(), a.as_i32x8(), b.as_i32x8()))
}
#[inline]
#[target_feature(enable = "avxvnniint8")]
#[cfg_attr(
all(test, any(target_os = "linux", target_env = "msvc")),
assert_instr(vpdpbuud)
)]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
pub unsafe fn _mm_dpbuud_epi32(src: __m128i, a: __m128i, b: __m128i) -> __m128i {
transmute(vpdpbuud_128(src.as_i32x4(), a.as_i32x4(), b.as_i32x4()))
}
#[inline]
#[target_feature(enable = "avxvnniint8")]
#[cfg_attr(
all(test, any(target_os = "linux", target_env = "msvc")),
assert_instr(vpdpbuud)
)]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
pub unsafe fn _mm256_dpbuud_epi32(src: __m256i, a: __m256i, b: __m256i) -> __m256i {
transmute(vpdpbuud_256(src.as_i32x8(), a.as_i32x8(), b.as_i32x8()))
}
#[inline]
#[target_feature(enable = "avxvnniint8")]
#[cfg_attr(
all(test, any(target_os = "linux", target_env = "msvc")),
assert_instr(vpdpbuuds)
)]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
pub unsafe fn _mm_dpbuuds_epi32(src: __m128i, a: __m128i, b: __m128i) -> __m128i {
transmute(vpdpbuuds_128(src.as_i32x4(), a.as_i32x4(), b.as_i32x4()))
}
#[inline]
#[target_feature(enable = "avxvnniint8")]
#[cfg_attr(
all(test, any(target_os = "linux", target_env = "msvc")),
assert_instr(vpdpbuuds)
)]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
pub unsafe fn _mm256_dpbuuds_epi32(src: __m256i, a: __m256i, b: __m256i) -> __m256i {
transmute(vpdpbuuds_256(src.as_i32x8(), a.as_i32x8(), b.as_i32x8()))
}
#[inline]
#[target_feature(enable = "avxvnniint16")]
#[cfg_attr(
all(test, any(target_os = "linux", target_env = "msvc")),
assert_instr(vpdpwsud)
)]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
pub unsafe fn _mm_dpwsud_epi32(src: __m128i, a: __m128i, b: __m128i) -> __m128i {
transmute(vpdpwsud_128(src.as_i32x4(), a.as_i32x4(), b.as_i32x4()))
}
#[inline]
#[target_feature(enable = "avxvnniint16")]
#[cfg_attr(
all(test, any(target_os = "linux", target_env = "msvc")),
assert_instr(vpdpwsud)
)]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
pub unsafe fn _mm256_dpwsud_epi32(src: __m256i, a: __m256i, b: __m256i) -> __m256i {
transmute(vpdpwsud_256(src.as_i32x8(), a.as_i32x8(), b.as_i32x8()))
}
#[inline]
#[target_feature(enable = "avxvnniint16")]
#[cfg_attr(
all(test, any(target_os = "linux", target_env = "msvc")),
assert_instr(vpdpwsuds)
)]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
pub unsafe fn _mm_dpwsuds_epi32(src: __m128i, a: __m128i, b: __m128i) -> __m128i {
transmute(vpdpwsuds_128(src.as_i32x4(), a.as_i32x4(), b.as_i32x4()))
}
#[inline]
#[target_feature(enable = "avxvnniint16")]
#[cfg_attr(
all(test, any(target_os = "linux", target_env = "msvc")),
assert_instr(vpdpwsuds)
)]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
pub unsafe fn _mm256_dpwsuds_epi32(src: __m256i, a: __m256i, b: __m256i) -> __m256i {
transmute(vpdpwsuds_256(src.as_i32x8(), a.as_i32x8(), b.as_i32x8()))
}
#[inline]
#[target_feature(enable = "avxvnniint16")]
#[cfg_attr(
all(test, any(target_os = "linux", target_env = "msvc")),
assert_instr(vpdpwusd)
)]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
pub unsafe fn _mm_dpwusd_epi32(src: __m128i, a: __m128i, b: __m128i) -> __m128i {
transmute(vpdpwusd_128(src.as_i32x4(), a.as_i32x4(), b.as_i32x4()))
}
#[inline]
#[target_feature(enable = "avxvnniint16")]
#[cfg_attr(
all(test, any(target_os = "linux", target_env = "msvc")),
assert_instr(vpdpwusd)
)]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
pub unsafe fn _mm256_dpwusd_epi32(src: __m256i, a: __m256i, b: __m256i) -> __m256i {
transmute(vpdpwusd_256(src.as_i32x8(), a.as_i32x8(), b.as_i32x8()))
}
#[inline]
#[target_feature(enable = "avxvnniint16")]
#[cfg_attr(
all(test, any(target_os = "linux", target_env = "msvc")),
assert_instr(vpdpwusds)
)]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
pub unsafe fn _mm_dpwusds_epi32(src: __m128i, a: __m128i, b: __m128i) -> __m128i {
transmute(vpdpwusds_128(src.as_i32x4(), a.as_i32x4(), b.as_i32x4()))
}
#[inline]
#[target_feature(enable = "avxvnniint16")]
#[cfg_attr(
all(test, any(target_os = "linux", target_env = "msvc")),
assert_instr(vpdpwusds)
)]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
pub unsafe fn _mm256_dpwusds_epi32(src: __m256i, a: __m256i, b: __m256i) -> __m256i {
transmute(vpdpwusds_256(src.as_i32x8(), a.as_i32x8(), b.as_i32x8()))
}
#[inline]
#[target_feature(enable = "avxvnniint16")]
#[cfg_attr(
all(test, any(target_os = "linux", target_env = "msvc")),
assert_instr(vpdpwuud)
)]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
pub unsafe fn _mm_dpwuud_epi32(src: __m128i, a: __m128i, b: __m128i) -> __m128i {
transmute(vpdpwuud_128(src.as_i32x4(), a.as_i32x4(), b.as_i32x4()))
}
#[inline]
#[target_feature(enable = "avxvnniint16")]
#[cfg_attr(
all(test, any(target_os = "linux", target_env = "msvc")),
assert_instr(vpdpwuud)
)]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
pub unsafe fn _mm256_dpwuud_epi32(src: __m256i, a: __m256i, b: __m256i) -> __m256i {
transmute(vpdpwuud_256(src.as_i32x8(), a.as_i32x8(), b.as_i32x8()))
}
#[inline]
#[target_feature(enable = "avxvnniint16")]
#[cfg_attr(
all(test, any(target_os = "linux", target_env = "msvc")),
assert_instr(vpdpwuuds)
)]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
pub unsafe fn _mm_dpwuuds_epi32(src: __m128i, a: __m128i, b: __m128i) -> __m128i {
transmute(vpdpwuuds_128(src.as_i32x4(), a.as_i32x4(), b.as_i32x4()))
}
#[inline]
#[target_feature(enable = "avxvnniint16")]
#[cfg_attr(
all(test, any(target_os = "linux", target_env = "msvc")),
assert_instr(vpdpwuuds)
)]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
pub unsafe fn _mm256_dpwuuds_epi32(src: __m256i, a: __m256i, b: __m256i) -> __m256i {
transmute(vpdpwuuds_256(src.as_i32x8(), a.as_i32x8(), b.as_i32x8()))
}
#[allow(improper_ctypes)]
extern "C" {
#[link_name = "llvm.x86.avx512.vpdpwssd.512"]
fn vpdpwssd(src: i32x16, a: i32x16, b: i32x16) -> i32x16;
#[link_name = "llvm.x86.avx512.vpdpwssd.256"]
fn vpdpwssd256(src: i32x8, a: i32x8, b: i32x8) -> i32x8;
#[link_name = "llvm.x86.avx512.vpdpwssd.128"]
fn vpdpwssd128(src: i32x4, a: i32x4, b: i32x4) -> i32x4;
#[link_name = "llvm.x86.avx512.vpdpwssds.512"]
fn vpdpwssds(src: i32x16, a: i32x16, b: i32x16) -> i32x16;
#[link_name = "llvm.x86.avx512.vpdpwssds.256"]
fn vpdpwssds256(src: i32x8, a: i32x8, b: i32x8) -> i32x8;
#[link_name = "llvm.x86.avx512.vpdpwssds.128"]
fn vpdpwssds128(src: i32x4, a: i32x4, b: i32x4) -> i32x4;
#[link_name = "llvm.x86.avx512.vpdpbusd.512"]
fn vpdpbusd(src: i32x16, a: i32x16, b: i32x16) -> i32x16;
#[link_name = "llvm.x86.avx512.vpdpbusd.256"]
fn vpdpbusd256(src: i32x8, a: i32x8, b: i32x8) -> i32x8;
#[link_name = "llvm.x86.avx512.vpdpbusd.128"]
fn vpdpbusd128(src: i32x4, a: i32x4, b: i32x4) -> i32x4;
#[link_name = "llvm.x86.avx512.vpdpbusds.512"]
fn vpdpbusds(src: i32x16, a: i32x16, b: i32x16) -> i32x16;
#[link_name = "llvm.x86.avx512.vpdpbusds.256"]
fn vpdpbusds256(src: i32x8, a: i32x8, b: i32x8) -> i32x8;
#[link_name = "llvm.x86.avx512.vpdpbusds.128"]
fn vpdpbusds128(src: i32x4, a: i32x4, b: i32x4) -> i32x4;
#[link_name = "llvm.x86.avx2.vpdpbssd.128"]
fn vpdpbssd_128(src: i32x4, a: i32x4, b: i32x4) -> i32x4;
#[link_name = "llvm.x86.avx2.vpdpbssd.256"]
fn vpdpbssd_256(src: i32x8, a: i32x8, b: i32x8) -> i32x8;
#[link_name = "llvm.x86.avx2.vpdpbssds.128"]
fn vpdpbssds_128(src: i32x4, a: i32x4, b: i32x4) -> i32x4;
#[link_name = "llvm.x86.avx2.vpdpbssds.256"]
fn vpdpbssds_256(src: i32x8, a: i32x8, b: i32x8) -> i32x8;
#[link_name = "llvm.x86.avx2.vpdpbsud.128"]
fn vpdpbsud_128(src: i32x4, a: i32x4, b: i32x4) -> i32x4;
#[link_name = "llvm.x86.avx2.vpdpbsud.256"]
fn vpdpbsud_256(src: i32x8, a: i32x8, b: i32x8) -> i32x8;
#[link_name = "llvm.x86.avx2.vpdpbsuds.128"]
fn vpdpbsuds_128(src: i32x4, a: i32x4, b: i32x4) -> i32x4;
#[link_name = "llvm.x86.avx2.vpdpbsuds.256"]
fn vpdpbsuds_256(src: i32x8, a: i32x8, b: i32x8) -> i32x8;
#[link_name = "llvm.x86.avx2.vpdpbuud.128"]
fn vpdpbuud_128(src: i32x4, a: i32x4, b: i32x4) -> i32x4;
#[link_name = "llvm.x86.avx2.vpdpbuud.256"]
fn vpdpbuud_256(src: i32x8, a: i32x8, b: i32x8) -> i32x8;
#[link_name = "llvm.x86.avx2.vpdpbuuds.128"]
fn vpdpbuuds_128(src: i32x4, a: i32x4, b: i32x4) -> i32x4;
#[link_name = "llvm.x86.avx2.vpdpbuuds.256"]
fn vpdpbuuds_256(src: i32x8, a: i32x8, b: i32x8) -> i32x8;
#[link_name = "llvm.x86.avx2.vpdpwsud.128"]
fn vpdpwsud_128(src: i32x4, a: i32x4, b: i32x4) -> i32x4;
#[link_name = "llvm.x86.avx2.vpdpwsud.256"]
fn vpdpwsud_256(src: i32x8, a: i32x8, b: i32x8) -> i32x8;
#[link_name = "llvm.x86.avx2.vpdpwsuds.128"]
fn vpdpwsuds_128(src: i32x4, a: i32x4, b: i32x4) -> i32x4;
#[link_name = "llvm.x86.avx2.vpdpwsuds.256"]
fn vpdpwsuds_256(src: i32x8, a: i32x8, b: i32x8) -> i32x8;
#[link_name = "llvm.x86.avx2.vpdpwusd.128"]
fn vpdpwusd_128(src: i32x4, a: i32x4, b: i32x4) -> i32x4;
#[link_name = "llvm.x86.avx2.vpdpwusd.256"]
fn vpdpwusd_256(src: i32x8, a: i32x8, b: i32x8) -> i32x8;
#[link_name = "llvm.x86.avx2.vpdpwusds.128"]
fn vpdpwusds_128(src: i32x4, a: i32x4, b: i32x4) -> i32x4;
#[link_name = "llvm.x86.avx2.vpdpwusds.256"]
fn vpdpwusds_256(src: i32x8, a: i32x8, b: i32x8) -> i32x8;
#[link_name = "llvm.x86.avx2.vpdpwuud.128"]
fn vpdpwuud_128(src: i32x4, a: i32x4, b: i32x4) -> i32x4;
#[link_name = "llvm.x86.avx2.vpdpwuud.256"]
fn vpdpwuud_256(src: i32x8, a: i32x8, b: i32x8) -> i32x8;
#[link_name = "llvm.x86.avx2.vpdpwuuds.128"]
fn vpdpwuuds_128(src: i32x4, a: i32x4, b: i32x4) -> i32x4;
#[link_name = "llvm.x86.avx2.vpdpwuuds.256"]
fn vpdpwuuds_256(src: i32x8, a: i32x8, b: i32x8) -> i32x8;
}
#[cfg(test)]
mod tests {
use crate::core_arch::x86::*;
use stdarch_test::simd_test;
#[simd_test(enable = "avx512vnni")]
unsafe fn test_mm512_dpwssd_epi32() {
let src = _mm512_set1_epi32(1);
let a = _mm512_set1_epi32(1 << 16 | 1 << 0);
let b = _mm512_set1_epi32(1 << 16 | 1 << 0);
let r = _mm512_dpwssd_epi32(src, a, b);
let e = _mm512_set1_epi32(3);
assert_eq_m512i(r, e);
}
#[simd_test(enable = "avx512vnni")]
unsafe fn test_mm512_mask_dpwssd_epi32() {
let src = _mm512_set1_epi32(1);
let a = _mm512_set1_epi32(1 << 16 | 1 << 0);
let b = _mm512_set1_epi32(1 << 16 | 1 << 0);
let r = _mm512_mask_dpwssd_epi32(src, 0b00000000_00000000, a, b);
assert_eq_m512i(r, src);
let r = _mm512_mask_dpwssd_epi32(src, 0b11111111_11111111, a, b);
let e = _mm512_set1_epi32(3);
assert_eq_m512i(r, e);
}
#[simd_test(enable = "avx512vnni")]
unsafe fn test_mm512_maskz_dpwssd_epi32() {
let src = _mm512_set1_epi32(1);
let a = _mm512_set1_epi32(1 << 16 | 1 << 0);
let b = _mm512_set1_epi32(1 << 16 | 1 << 0);
let r = _mm512_maskz_dpwssd_epi32(0b00000000_00000000, src, a, b);
assert_eq_m512i(r, _mm512_setzero_si512());
let r = _mm512_maskz_dpwssd_epi32(0b11111111_11111111, src, a, b);
let e = _mm512_set1_epi32(3);
assert_eq_m512i(r, e);
}
#[simd_test(enable = "avxvnni")]
unsafe fn test_mm256_dpwssd_avx_epi32() {
let src = _mm256_set1_epi32(1);
let a = _mm256_set1_epi32(1 << 16 | 1 << 0);
let b = _mm256_set1_epi32(1 << 16 | 1 << 0);
let r = _mm256_dpwssd_avx_epi32(src, a, b);
let e = _mm256_set1_epi32(3);
assert_eq_m256i(r, e);
}
#[simd_test(enable = "avx512vnni,avx512vl")]
unsafe fn test_mm256_dpwssd_epi32() {
let src = _mm256_set1_epi32(1);
let a = _mm256_set1_epi32(1 << 16 | 1 << 0);
let b = _mm256_set1_epi32(1 << 16 | 1 << 0);
let r = _mm256_dpwssd_epi32(src, a, b);
let e = _mm256_set1_epi32(3);
assert_eq_m256i(r, e);
}
#[simd_test(enable = "avx512vnni,avx512vl")]
unsafe fn test_mm256_mask_dpwssd_epi32() {
let src = _mm256_set1_epi32(1);
let a = _mm256_set1_epi32(1 << 16 | 1 << 0);
let b = _mm256_set1_epi32(1 << 16 | 1 << 0);
let r = _mm256_mask_dpwssd_epi32(src, 0b00000000, a, b);
assert_eq_m256i(r, src);
let r = _mm256_mask_dpwssd_epi32(src, 0b11111111, a, b);
let e = _mm256_set1_epi32(3);
assert_eq_m256i(r, e);
}
#[simd_test(enable = "avx512vnni,avx512vl")]
unsafe fn test_mm256_maskz_dpwssd_epi32() {
let src = _mm256_set1_epi32(1);
let a = _mm256_set1_epi32(1 << 16 | 1 << 0);
let b = _mm256_set1_epi32(1 << 16 | 1 << 0);
let r = _mm256_maskz_dpwssd_epi32(0b00000000, src, a, b);
assert_eq_m256i(r, _mm256_setzero_si256());
let r = _mm256_maskz_dpwssd_epi32(0b11111111, src, a, b);
let e = _mm256_set1_epi32(3);
assert_eq_m256i(r, e);
}
#[simd_test(enable = "avxvnni")]
unsafe fn test_mm_dpwssd_avx_epi32() {
let src = _mm_set1_epi32(1);
let a = _mm_set1_epi32(1 << 16 | 1 << 0);
let b = _mm_set1_epi32(1 << 16 | 1 << 0);
let r = _mm_dpwssd_avx_epi32(src, a, b);
let e = _mm_set1_epi32(3);
assert_eq_m128i(r, e);
}
#[simd_test(enable = "avx512vnni,avx512vl")]
unsafe fn test_mm_dpwssd_epi32() {
let src = _mm_set1_epi32(1);
let a = _mm_set1_epi32(1 << 16 | 1 << 0);
let b = _mm_set1_epi32(1 << 16 | 1 << 0);
let r = _mm_dpwssd_epi32(src, a, b);
let e = _mm_set1_epi32(3);
assert_eq_m128i(r, e);
}
#[simd_test(enable = "avx512vnni,avx512vl")]
unsafe fn test_mm_mask_dpwssd_epi32() {
let src = _mm_set1_epi32(1);
let a = _mm_set1_epi32(1 << 16 | 1 << 0);
let b = _mm_set1_epi32(1 << 16 | 1 << 0);
let r = _mm_mask_dpwssd_epi32(src, 0b00000000, a, b);
assert_eq_m128i(r, src);
let r = _mm_mask_dpwssd_epi32(src, 0b00001111, a, b);
let e = _mm_set1_epi32(3);
assert_eq_m128i(r, e);
}
#[simd_test(enable = "avx512vnni,avx512vl")]
unsafe fn test_mm_maskz_dpwssd_epi32() {
let src = _mm_set1_epi32(1);
let a = _mm_set1_epi32(1 << 16 | 1 << 0);
let b = _mm_set1_epi32(1 << 16 | 1 << 0);
let r = _mm_maskz_dpwssd_epi32(0b00000000, src, a, b);
assert_eq_m128i(r, _mm_setzero_si128());
let r = _mm_maskz_dpwssd_epi32(0b00001111, src, a, b);
let e = _mm_set1_epi32(3);
assert_eq_m128i(r, e);
}
#[simd_test(enable = "avx512vnni")]
unsafe fn test_mm512_dpwssds_epi32() {
let src = _mm512_set1_epi32(1);
let a = _mm512_set1_epi32(1 << 16 | 1 << 0);
let b = _mm512_set1_epi32(1 << 16 | 1 << 0);
let r = _mm512_dpwssds_epi32(src, a, b);
let e = _mm512_set1_epi32(3);
assert_eq_m512i(r, e);
}
#[simd_test(enable = "avx512vnni")]
unsafe fn test_mm512_mask_dpwssds_epi32() {
let src = _mm512_set1_epi32(1);
let a = _mm512_set1_epi32(1 << 16 | 1 << 0);
let b = _mm512_set1_epi32(1 << 16 | 1 << 0);
let r = _mm512_mask_dpwssds_epi32(src, 0b00000000_00000000, a, b);
assert_eq_m512i(r, src);
let r = _mm512_mask_dpwssds_epi32(src, 0b11111111_11111111, a, b);
let e = _mm512_set1_epi32(3);
assert_eq_m512i(r, e);
}
#[simd_test(enable = "avx512vnni")]
unsafe fn test_mm512_maskz_dpwssds_epi32() {
let src = _mm512_set1_epi32(1);
let a = _mm512_set1_epi32(1 << 16 | 1 << 0);
let b = _mm512_set1_epi32(1 << 16 | 1 << 0);
let r = _mm512_maskz_dpwssds_epi32(0b00000000_00000000, src, a, b);
assert_eq_m512i(r, _mm512_setzero_si512());
let r = _mm512_maskz_dpwssds_epi32(0b11111111_11111111, src, a, b);
let e = _mm512_set1_epi32(3);
assert_eq_m512i(r, e);
}
#[simd_test(enable = "avxvnni")]
unsafe fn test_mm256_dpwssds_avx_epi32() {
let src = _mm256_set1_epi32(1);
let a = _mm256_set1_epi32(1 << 16 | 1 << 0);
let b = _mm256_set1_epi32(1 << 16 | 1 << 0);
let r = _mm256_dpwssds_avx_epi32(src, a, b);
let e = _mm256_set1_epi32(3);
assert_eq_m256i(r, e);
}
#[simd_test(enable = "avx512vnni,avx512vl")]
unsafe fn test_mm256_dpwssds_epi32() {
let src = _mm256_set1_epi32(1);
let a = _mm256_set1_epi32(1 << 16 | 1 << 0);
let b = _mm256_set1_epi32(1 << 16 | 1 << 0);
let r = _mm256_dpwssds_epi32(src, a, b);
let e = _mm256_set1_epi32(3);
assert_eq_m256i(r, e);
}
#[simd_test(enable = "avx512vnni,avx512vl")]
unsafe fn test_mm256_mask_dpwssds_epi32() {
let src = _mm256_set1_epi32(1);
let a = _mm256_set1_epi32(1 << 16 | 1 << 0);
let b = _mm256_set1_epi32(1 << 16 | 1 << 0);
let r = _mm256_mask_dpwssds_epi32(src, 0b00000000, a, b);
assert_eq_m256i(r, src);
let r = _mm256_mask_dpwssds_epi32(src, 0b11111111, a, b);
let e = _mm256_set1_epi32(3);
assert_eq_m256i(r, e);
}
#[simd_test(enable = "avx512vnni,avx512vl")]
unsafe fn test_mm256_maskz_dpwssds_epi32() {
let src = _mm256_set1_epi32(1);
let a = _mm256_set1_epi32(1 << 16 | 1 << 0);
let b = _mm256_set1_epi32(1 << 16 | 1 << 0);
let r = _mm256_maskz_dpwssds_epi32(0b00000000, src, a, b);
assert_eq_m256i(r, _mm256_setzero_si256());
let r = _mm256_maskz_dpwssds_epi32(0b11111111, src, a, b);
let e = _mm256_set1_epi32(3);
assert_eq_m256i(r, e);
}
#[simd_test(enable = "avxvnni")]
unsafe fn test_mm_dpwssds_avx_epi32() {
let src = _mm_set1_epi32(1);
let a = _mm_set1_epi32(1 << 16 | 1 << 0);
let b = _mm_set1_epi32(1 << 16 | 1 << 0);
let r = _mm_dpwssds_avx_epi32(src, a, b);
let e = _mm_set1_epi32(3);
assert_eq_m128i(r, e);
}
#[simd_test(enable = "avx512vnni,avx512vl")]
unsafe fn test_mm_dpwssds_epi32() {
let src = _mm_set1_epi32(1);
let a = _mm_set1_epi32(1 << 16 | 1 << 0);
let b = _mm_set1_epi32(1 << 16 | 1 << 0);
let r = _mm_dpwssds_epi32(src, a, b);
let e = _mm_set1_epi32(3);
assert_eq_m128i(r, e);
}
#[simd_test(enable = "avx512vnni,avx512vl")]
unsafe fn test_mm_mask_dpwssds_epi32() {
let src = _mm_set1_epi32(1);
let a = _mm_set1_epi32(1 << 16 | 1 << 0);
let b = _mm_set1_epi32(1 << 16 | 1 << 0);
let r = _mm_mask_dpwssds_epi32(src, 0b00000000, a, b);
assert_eq_m128i(r, src);
let r = _mm_mask_dpwssds_epi32(src, 0b00001111, a, b);
let e = _mm_set1_epi32(3);
assert_eq_m128i(r, e);
}
#[simd_test(enable = "avx512vnni,avx512vl")]
unsafe fn test_mm_maskz_dpwssds_epi32() {
let src = _mm_set1_epi32(1);
let a = _mm_set1_epi32(1 << 16 | 1 << 0);
let b = _mm_set1_epi32(1 << 16 | 1 << 0);
let r = _mm_maskz_dpwssds_epi32(0b00000000, src, a, b);
assert_eq_m128i(r, _mm_setzero_si128());
let r = _mm_maskz_dpwssds_epi32(0b00001111, src, a, b);
let e = _mm_set1_epi32(3);
assert_eq_m128i(r, e);
}
#[simd_test(enable = "avx512vnni")]
unsafe fn test_mm512_dpbusd_epi32() {
let src = _mm512_set1_epi32(1);
let a = _mm512_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let b = _mm512_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let r = _mm512_dpbusd_epi32(src, a, b);
let e = _mm512_set1_epi32(5);
assert_eq_m512i(r, e);
}
#[simd_test(enable = "avx512vnni")]
unsafe fn test_mm512_mask_dpbusd_epi32() {
let src = _mm512_set1_epi32(1);
let a = _mm512_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let b = _mm512_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let r = _mm512_mask_dpbusd_epi32(src, 0b00000000_00000000, a, b);
assert_eq_m512i(r, src);
let r = _mm512_mask_dpbusd_epi32(src, 0b11111111_11111111, a, b);
let e = _mm512_set1_epi32(5);
assert_eq_m512i(r, e);
}
#[simd_test(enable = "avx512vnni")]
unsafe fn test_mm512_maskz_dpbusd_epi32() {
let src = _mm512_set1_epi32(1);
let a = _mm512_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let b = _mm512_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let r = _mm512_maskz_dpbusd_epi32(0b00000000_00000000, src, a, b);
assert_eq_m512i(r, _mm512_setzero_si512());
let r = _mm512_maskz_dpbusd_epi32(0b11111111_11111111, src, a, b);
let e = _mm512_set1_epi32(5);
assert_eq_m512i(r, e);
}
#[simd_test(enable = "avxvnni")]
unsafe fn test_mm256_dpbusd_avx_epi32() {
let src = _mm256_set1_epi32(1);
let a = _mm256_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let b = _mm256_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let r = _mm256_dpbusd_avx_epi32(src, a, b);
let e = _mm256_set1_epi32(5);
assert_eq_m256i(r, e);
}
#[simd_test(enable = "avx512vnni,avx512vl")]
unsafe fn test_mm256_dpbusd_epi32() {
let src = _mm256_set1_epi32(1);
let a = _mm256_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let b = _mm256_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let r = _mm256_dpbusd_epi32(src, a, b);
let e = _mm256_set1_epi32(5);
assert_eq_m256i(r, e);
}
#[simd_test(enable = "avx512vnni,avx512vl")]
unsafe fn test_mm256_mask_dpbusd_epi32() {
let src = _mm256_set1_epi32(1);
let a = _mm256_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let b = _mm256_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let r = _mm256_mask_dpbusd_epi32(src, 0b00000000, a, b);
assert_eq_m256i(r, src);
let r = _mm256_mask_dpbusd_epi32(src, 0b11111111, a, b);
let e = _mm256_set1_epi32(5);
assert_eq_m256i(r, e);
}
#[simd_test(enable = "avx512vnni,avx512vl")]
unsafe fn test_mm256_maskz_dpbusd_epi32() {
let src = _mm256_set1_epi32(1);
let a = _mm256_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let b = _mm256_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let r = _mm256_maskz_dpbusd_epi32(0b00000000, src, a, b);
assert_eq_m256i(r, _mm256_setzero_si256());
let r = _mm256_maskz_dpbusd_epi32(0b11111111, src, a, b);
let e = _mm256_set1_epi32(5);
assert_eq_m256i(r, e);
}
#[simd_test(enable = "avxvnni")]
unsafe fn test_mm_dpbusd_avx_epi32() {
let src = _mm_set1_epi32(1);
let a = _mm_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let b = _mm_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let r = _mm_dpbusd_avx_epi32(src, a, b);
let e = _mm_set1_epi32(5);
assert_eq_m128i(r, e);
}
#[simd_test(enable = "avx512vnni,avx512vl")]
unsafe fn test_mm_dpbusd_epi32() {
let src = _mm_set1_epi32(1);
let a = _mm_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let b = _mm_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let r = _mm_dpbusd_epi32(src, a, b);
let e = _mm_set1_epi32(5);
assert_eq_m128i(r, e);
}
#[simd_test(enable = "avx512vnni,avx512vl")]
unsafe fn test_mm_mask_dpbusd_epi32() {
let src = _mm_set1_epi32(1);
let a = _mm_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let b = _mm_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let r = _mm_mask_dpbusd_epi32(src, 0b00000000, a, b);
assert_eq_m128i(r, src);
let r = _mm_mask_dpbusd_epi32(src, 0b00001111, a, b);
let e = _mm_set1_epi32(5);
assert_eq_m128i(r, e);
}
#[simd_test(enable = "avx512vnni,avx512vl")]
unsafe fn test_mm_maskz_dpbusd_epi32() {
let src = _mm_set1_epi32(1);
let a = _mm_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let b = _mm_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let r = _mm_maskz_dpbusd_epi32(0b00000000, src, a, b);
assert_eq_m128i(r, _mm_setzero_si128());
let r = _mm_maskz_dpbusd_epi32(0b00001111, src, a, b);
let e = _mm_set1_epi32(5);
assert_eq_m128i(r, e);
}
#[simd_test(enable = "avx512vnni")]
unsafe fn test_mm512_dpbusds_epi32() {
let src = _mm512_set1_epi32(1);
let a = _mm512_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let b = _mm512_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let r = _mm512_dpbusds_epi32(src, a, b);
let e = _mm512_set1_epi32(5);
assert_eq_m512i(r, e);
}
#[simd_test(enable = "avx512vnni")]
unsafe fn test_mm512_mask_dpbusds_epi32() {
let src = _mm512_set1_epi32(1);
let a = _mm512_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let b = _mm512_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let r = _mm512_mask_dpbusds_epi32(src, 0b00000000_00000000, a, b);
assert_eq_m512i(r, src);
let r = _mm512_mask_dpbusds_epi32(src, 0b11111111_11111111, a, b);
let e = _mm512_set1_epi32(5);
assert_eq_m512i(r, e);
}
#[simd_test(enable = "avx512vnni")]
unsafe fn test_mm512_maskz_dpbusds_epi32() {
let src = _mm512_set1_epi32(1);
let a = _mm512_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let b = _mm512_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let r = _mm512_maskz_dpbusds_epi32(0b00000000_00000000, src, a, b);
assert_eq_m512i(r, _mm512_setzero_si512());
let r = _mm512_maskz_dpbusds_epi32(0b11111111_11111111, src, a, b);
let e = _mm512_set1_epi32(5);
assert_eq_m512i(r, e);
}
#[simd_test(enable = "avxvnni")]
unsafe fn test_mm256_dpbusds_avx_epi32() {
let src = _mm256_set1_epi32(1);
let a = _mm256_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let b = _mm256_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let r = _mm256_dpbusds_avx_epi32(src, a, b);
let e = _mm256_set1_epi32(5);
assert_eq_m256i(r, e);
}
#[simd_test(enable = "avx512vnni,avx512vl")]
unsafe fn test_mm256_dpbusds_epi32() {
let src = _mm256_set1_epi32(1);
let a = _mm256_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let b = _mm256_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let r = _mm256_dpbusds_epi32(src, a, b);
let e = _mm256_set1_epi32(5);
assert_eq_m256i(r, e);
}
#[simd_test(enable = "avx512vnni,avx512vl")]
unsafe fn test_mm256_mask_dpbusds_epi32() {
let src = _mm256_set1_epi32(1);
let a = _mm256_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let b = _mm256_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let r = _mm256_mask_dpbusds_epi32(src, 0b00000000, a, b);
assert_eq_m256i(r, src);
let r = _mm256_mask_dpbusds_epi32(src, 0b11111111, a, b);
let e = _mm256_set1_epi32(5);
assert_eq_m256i(r, e);
}
#[simd_test(enable = "avx512vnni,avx512vl")]
unsafe fn test_mm256_maskz_dpbusds_epi32() {
let src = _mm256_set1_epi32(1);
let a = _mm256_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let b = _mm256_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let r = _mm256_maskz_dpbusds_epi32(0b00000000, src, a, b);
assert_eq_m256i(r, _mm256_setzero_si256());
let r = _mm256_maskz_dpbusds_epi32(0b11111111, src, a, b);
let e = _mm256_set1_epi32(5);
assert_eq_m256i(r, e);
}
#[simd_test(enable = "avxvnni")]
unsafe fn test_mm_dpbusds_avx_epi32() {
let src = _mm_set1_epi32(1);
let a = _mm_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let b = _mm_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let r = _mm_dpbusds_avx_epi32(src, a, b);
let e = _mm_set1_epi32(5);
assert_eq_m128i(r, e);
}
#[simd_test(enable = "avx512vnni,avx512vl")]
unsafe fn test_mm_dpbusds_epi32() {
let src = _mm_set1_epi32(1);
let a = _mm_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let b = _mm_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let r = _mm_dpbusds_epi32(src, a, b);
let e = _mm_set1_epi32(5);
assert_eq_m128i(r, e);
}
#[simd_test(enable = "avx512vnni,avx512vl")]
unsafe fn test_mm_mask_dpbusds_epi32() {
let src = _mm_set1_epi32(1);
let a = _mm_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let b = _mm_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let r = _mm_mask_dpbusds_epi32(src, 0b00000000, a, b);
assert_eq_m128i(r, src);
let r = _mm_mask_dpbusds_epi32(src, 0b00001111, a, b);
let e = _mm_set1_epi32(5);
assert_eq_m128i(r, e);
}
#[simd_test(enable = "avx512vnni,avx512vl")]
unsafe fn test_mm_maskz_dpbusds_epi32() {
let src = _mm_set1_epi32(1);
let a = _mm_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let b = _mm_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let r = _mm_maskz_dpbusds_epi32(0b00000000, src, a, b);
assert_eq_m128i(r, _mm_setzero_si128());
let r = _mm_maskz_dpbusds_epi32(0b00001111, src, a, b);
let e = _mm_set1_epi32(5);
assert_eq_m128i(r, e);
}
#[simd_test(enable = "avxvnniint8")]
unsafe fn test_mm_dpbssd_epi32() {
let src = _mm_set1_epi32(1);
let a = _mm_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let b = _mm_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let r = _mm_dpbssd_epi32(src, a, b);
let e = _mm_set1_epi32(5);
assert_eq_m128i(r, e);
}
#[simd_test(enable = "avxvnniint8")]
unsafe fn test_mm256_dpbssd_epi32() {
let src = _mm256_set1_epi32(1);
let a = _mm256_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let b = _mm256_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let r = _mm256_dpbssd_epi32(src, a, b);
let e = _mm256_set1_epi32(5);
assert_eq_m256i(r, e);
}
#[simd_test(enable = "avxvnniint8")]
unsafe fn test_mm_dpbssds_epi32() {
let src = _mm_set1_epi32(1);
let a = _mm_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let b = _mm_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let r = _mm_dpbssds_epi32(src, a, b);
let e = _mm_set1_epi32(5);
assert_eq_m128i(r, e);
}
#[simd_test(enable = "avxvnniint8")]
unsafe fn test_mm256_dpbssds_epi32() {
let src = _mm256_set1_epi32(1);
let a = _mm256_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let b = _mm256_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let r = _mm256_dpbssds_epi32(src, a, b);
let e = _mm256_set1_epi32(5);
assert_eq_m256i(r, e);
}
#[simd_test(enable = "avxvnniint8")]
unsafe fn test_mm_dpbsud_epi32() {
let src = _mm_set1_epi32(1);
let a = _mm_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let b = _mm_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let r = _mm_dpbsud_epi32(src, a, b);
let e = _mm_set1_epi32(5);
assert_eq_m128i(r, e);
}
#[simd_test(enable = "avxvnniint8")]
unsafe fn test_mm256_dpbsud_epi32() {
let src = _mm256_set1_epi32(1);
let a = _mm256_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let b = _mm256_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let r = _mm256_dpbsud_epi32(src, a, b);
let e = _mm256_set1_epi32(5);
assert_eq_m256i(r, e);
}
#[simd_test(enable = "avxvnniint8")]
unsafe fn test_mm_dpbsuds_epi32() {
let src = _mm_set1_epi32(1);
let a = _mm_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let b = _mm_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let r = _mm_dpbsuds_epi32(src, a, b);
let e = _mm_set1_epi32(5);
assert_eq_m128i(r, e);
}
#[simd_test(enable = "avxvnniint8")]
unsafe fn test_mm256_dpbsuds_epi32() {
let src = _mm256_set1_epi32(1);
let a = _mm256_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let b = _mm256_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let r = _mm256_dpbsuds_epi32(src, a, b);
let e = _mm256_set1_epi32(5);
assert_eq_m256i(r, e);
}
#[simd_test(enable = "avxvnniint8")]
unsafe fn test_mm_dpbuud_epi32() {
let src = _mm_set1_epi32(1);
let a = _mm_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let b = _mm_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let r = _mm_dpbuud_epi32(src, a, b);
let e = _mm_set1_epi32(5);
assert_eq_m128i(r, e);
}
#[simd_test(enable = "avxvnniint8")]
unsafe fn test_mm256_dpbuud_epi32() {
let src = _mm256_set1_epi32(1);
let a = _mm256_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let b = _mm256_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let r = _mm256_dpbuud_epi32(src, a, b);
let e = _mm256_set1_epi32(5);
assert_eq_m256i(r, e);
}
#[simd_test(enable = "avxvnniint8")]
unsafe fn test_mm_dpbuuds_epi32() {
let src = _mm_set1_epi32(1);
let a = _mm_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let b = _mm_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let r = _mm_dpbuuds_epi32(src, a, b);
let e = _mm_set1_epi32(5);
assert_eq_m128i(r, e);
}
#[simd_test(enable = "avxvnniint8")]
unsafe fn test_mm256_dpbuuds_epi32() {
let src = _mm256_set1_epi32(1);
let a = _mm256_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let b = _mm256_set1_epi32(1 << 24 | 1 << 16 | 1 << 8 | 1 << 0);
let r = _mm256_dpbuuds_epi32(src, a, b);
let e = _mm256_set1_epi32(5);
assert_eq_m256i(r, e);
}
#[simd_test(enable = "avxvnniint16")]
unsafe fn test_mm_dpwsud_epi32() {
let src = _mm_set1_epi32(1);
let a = _mm_set1_epi32(1 << 16 | 1 << 0);
let b = _mm_set1_epi32(1 << 16 | 1 << 0);
let r = _mm_dpwsud_epi32(src, a, b);
let e = _mm_set1_epi32(3);
assert_eq_m128i(r, e);
}
#[simd_test(enable = "avxvnniint16")]
unsafe fn test_mm256_dpwsud_epi32() {
let src = _mm256_set1_epi32(1);
let a = _mm256_set1_epi32(1 << 16 | 1 << 0);
let b = _mm256_set1_epi32(1 << 16 | 1 << 0);
let r = _mm256_dpwsud_epi32(src, a, b);
let e = _mm256_set1_epi32(3);
assert_eq_m256i(r, e);
}
#[simd_test(enable = "avxvnniint16")]
unsafe fn test_mm_dpwsuds_epi32() {
let src = _mm_set1_epi32(1);
let a = _mm_set1_epi32(1 << 16 | 1 << 0);
let b = _mm_set1_epi32(1 << 16 | 1 << 0);
let r = _mm_dpwsuds_epi32(src, a, b);
let e = _mm_set1_epi32(3);
assert_eq_m128i(r, e);
}
#[simd_test(enable = "avxvnniint16")]
unsafe fn test_mm256_dpwsuds_epi32() {
let src = _mm256_set1_epi32(1);
let a = _mm256_set1_epi32(1 << 16 | 1 << 0);
let b = _mm256_set1_epi32(1 << 16 | 1 << 0);
let r = _mm256_dpwsuds_epi32(src, a, b);
let e = _mm256_set1_epi32(3);
assert_eq_m256i(r, e);
}
#[simd_test(enable = "avxvnniint16")]
unsafe fn test_mm_dpwusd_epi32() {
let src = _mm_set1_epi32(1);
let a = _mm_set1_epi32(1 << 16 | 1 << 0);
let b = _mm_set1_epi32(1 << 16 | 1 << 0);
let r = _mm_dpwusd_epi32(src, a, b);
let e = _mm_set1_epi32(3);
assert_eq_m128i(r, e);
}
#[simd_test(enable = "avxvnniint16")]
unsafe fn test_mm256_dpwusd_epi32() {
let src = _mm256_set1_epi32(1);
let a = _mm256_set1_epi32(1 << 16 | 1 << 0);
let b = _mm256_set1_epi32(1 << 16 | 1 << 0);
let r = _mm256_dpwusd_epi32(src, a, b);
let e = _mm256_set1_epi32(3);
assert_eq_m256i(r, e);
}
#[simd_test(enable = "avxvnniint16")]
unsafe fn test_mm_dpwusds_epi32() {
let src = _mm_set1_epi32(1);
let a = _mm_set1_epi32(1 << 16 | 1 << 0);
let b = _mm_set1_epi32(1 << 16 | 1 << 0);
let r = _mm_dpwusds_epi32(src, a, b);
let e = _mm_set1_epi32(3);
assert_eq_m128i(r, e);
}
#[simd_test(enable = "avxvnniint16")]
unsafe fn test_mm256_dpwusds_epi32() {
let src = _mm256_set1_epi32(1);
let a = _mm256_set1_epi32(1 << 16 | 1 << 0);
let b = _mm256_set1_epi32(1 << 16 | 1 << 0);
let r = _mm256_dpwusds_epi32(src, a, b);
let e = _mm256_set1_epi32(3);
assert_eq_m256i(r, e);
}
#[simd_test(enable = "avxvnniint16")]
unsafe fn test_mm_dpwuud_epi32() {
let src = _mm_set1_epi32(1);
let a = _mm_set1_epi32(1 << 16 | 1 << 0);
let b = _mm_set1_epi32(1 << 16 | 1 << 0);
let r = _mm_dpwuud_epi32(src, a, b);
let e = _mm_set1_epi32(3);
assert_eq_m128i(r, e);
}
#[simd_test(enable = "avxvnniint16")]
unsafe fn test_mm256_dpwuud_epi32() {
let src = _mm256_set1_epi32(1);
let a = _mm256_set1_epi32(1 << 16 | 1 << 0);
let b = _mm256_set1_epi32(1 << 16 | 1 << 0);
let r = _mm256_dpwuud_epi32(src, a, b);
let e = _mm256_set1_epi32(3);
assert_eq_m256i(r, e);
}
#[simd_test(enable = "avxvnniint16")]
unsafe fn test_mm_dpwuuds_epi32() {
let src = _mm_set1_epi32(1);
let a = _mm_set1_epi32(1 << 16 | 1 << 0);
let b = _mm_set1_epi32(1 << 16 | 1 << 0);
let r = _mm_dpwuuds_epi32(src, a, b);
let e = _mm_set1_epi32(3);
assert_eq_m128i(r, e);
}
#[simd_test(enable = "avxvnniint16")]
unsafe fn test_mm256_dpwuuds_epi32() {
let src = _mm256_set1_epi32(1);
let a = _mm256_set1_epi32(1 << 16 | 1 << 0);
let b = _mm256_set1_epi32(1 << 16 | 1 << 0);
let r = _mm256_dpwuuds_epi32(src, a, b);
let e = _mm256_set1_epi32(3);
assert_eq_m256i(r, e);
}
}