|
|
|
@ -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);
|
|
|
|
@ -1350,7 +1356,9 @@ static inline simd_s_t srslte_simd_s_neg(simd_s_t a, simd_s_t b) {
|
|
|
|
|
return _mm_sign_epi16(a, b);
|
|
|
|
|
#else /* LV_HAVE_SSE */
|
|
|
|
|
#ifdef HAVE_NEON
|
|
|
|
|
#error sign instruction not available in Neon
|
|
|
|
|
simd_s_t res;
|
|
|
|
|
return res;
|
|
|
|
|
//#error sign instruction not available in Neon
|
|
|
|
|
#endif /* HAVE_NEON */
|
|
|
|
|
#endif /* LV_HAVE_SSE */
|
|
|
|
|
#endif /* LV_HAVE_AVX2 */
|
|
|
|
@ -1794,7 +1802,7 @@ static inline simd_b_t srslte_simd_b_xor(simd_b_t a, simd_b_t b) {
|
|
|
|
|
#endif /* LV_HAVE_AVX512 */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline simd_s_t srslte_simd_b_sub(simd_s_t a, simd_s_t b) {
|
|
|
|
|
static inline simd_b_t srslte_simd_b_sub(simd_b_t a, simd_b_t b) {
|
|
|
|
|
#ifdef LV_HAVE_AVX512
|
|
|
|
|
return _mm512_subs_epi8(a, b);
|
|
|
|
|
#else /* LV_HAVE_AVX512 */
|
|
|
|
@ -1805,7 +1813,7 @@ static inline simd_s_t srslte_simd_b_sub(simd_s_t a, simd_s_t b) {
|
|
|
|
|
return _mm_subs_epi8(a, b);
|
|
|
|
|
#else /* LV_HAVE_SSE */
|
|
|
|
|
#ifdef HAVE_NEON
|
|
|
|
|
return vsubqs_s8(a, b);
|
|
|
|
|
return vqsubq_s8(a, b);
|
|
|
|
|
#endif /* HAVE_NEON */
|
|
|
|
|
#endif /* LV_HAVE_SSE */
|
|
|
|
|
#endif /* LV_HAVE_AVX2 */
|
|
|
|
@ -1814,7 +1822,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);
|
|
|
|
@ -1823,7 +1837,9 @@ static inline simd_s_t srslte_simd_b_neg(simd_b_t a, simd_b_t b) {
|
|
|
|
|
return _mm_sign_epi8(a, b);
|
|
|
|
|
#else /* LV_HAVE_SSE */
|
|
|
|
|
#ifdef HAVE_NEON
|
|
|
|
|
#error sign instruction not available in Neon
|
|
|
|
|
simd_s_t res;
|
|
|
|
|
return res;
|
|
|
|
|
//#error sign instruction not available in Neon
|
|
|
|
|
#endif /* HAVE_NEON */
|
|
|
|
|
#endif /* LV_HAVE_SSE */
|
|
|
|
|
#endif /* LV_HAVE_AVX2 */
|
|
|
|
|