|
|
|
@ -1341,7 +1341,13 @@ static inline simd_s_t srslte_simd_s_mul(simd_s_t a, simd_s_t b) {
|
|
|
|
|
|
|
|
|
|
static inline simd_s_t srslte_simd_s_neg(simd_s_t a, simd_s_t b) {
|
|
|
|
|
#ifdef LV_HAVE_AVX512
|
|
|
|
|
#error sign instruction not available in avx512
|
|
|
|
|
__m256i a0 = _mm512_extracti64x4_epi64(a, 0);
|
|
|
|
|
__m256i a1 = _mm512_extracti64x4_epi64(a, 1);
|
|
|
|
|
__m256i b0 = _mm512_extracti64x4_epi64(b, 0);
|
|
|
|
|
__m256i b1 = _mm512_extracti64x4_epi64(b, 1);
|
|
|
|
|
__m256i r0 = _mm256_sign_epi16(a0, b0);
|
|
|
|
|
__m256i r1 = _mm256_sign_epi16(a1, b1);
|
|
|
|
|
return _mm512_inserti64x4(_mm512_broadcast_i64x4(r0), r1, 1);
|
|
|
|
|
#else /* LV_HAVE_AVX512 */
|
|
|
|
|
#ifdef LV_HAVE_AVX2
|
|
|
|
|
return _mm256_sign_epi16(a, b);
|
|
|
|
@ -1814,7 +1820,13 @@ static inline simd_s_t srslte_simd_b_sub(simd_s_t a, simd_s_t b) {
|
|
|
|
|
|
|
|
|
|
static inline simd_s_t srslte_simd_b_neg(simd_b_t a, simd_b_t b) {
|
|
|
|
|
#ifdef LV_HAVE_AVX512
|
|
|
|
|
#error sign instruction not available in avx512
|
|
|
|
|
__m256i a0 = _mm512_extracti64x4_epi64(a, 0);
|
|
|
|
|
__m256i a1 = _mm512_extracti64x4_epi64(a, 1);
|
|
|
|
|
__m256i b0 = _mm512_extracti64x4_epi64(b, 0);
|
|
|
|
|
__m256i b1 = _mm512_extracti64x4_epi64(b, 1);
|
|
|
|
|
__m256i r0 = _mm256_sign_epi8(a0, b0);
|
|
|
|
|
__m256i r1 = _mm256_sign_epi8(a1, b1);
|
|
|
|
|
return _mm512_inserti64x4(_mm512_broadcast_i64x4(r0), r1, 1);
|
|
|
|
|
#else /* LV_HAVE_AVX512 */
|
|
|
|
|
#ifdef LV_HAVE_AVX2
|
|
|
|
|
return _mm256_sign_epi8(a, b);
|
|
|
|
|