Commit 6421754b authored by wu.jing's avatar wu.jing

fix OXGRF lib.c for arm

parent 01ec201f
......@@ -26,6 +26,10 @@
# include <immintrin.h>
#endif
#ifdef __aarch64__
#include <arm_neon.h>
#endif
//! Number of OXGRF devices
int num_devices = 0;
#ifdef __GNUC__
......@@ -110,15 +114,15 @@ static int trx_oxgrf_write(openair0_device *device,openair0_timestamp timestamp,
iq += 16;
len -= 16;
}
#else
#elif defined(__arm__) || defined(__aarch64__)
__m128i a, *b;
int len = nsamps * 2;
int16_t *iq = buff[0];
while (len >= 8) {
a = *(__m128i *)&iq[0];
b = (__m128i *)&iq[0];
*b = _mm_slli_epi16(a, 4);
a = *(int16x8_t *)&iq[0];
b = (int16x8_t *)&iq[0];
*b = vshlq_n_s16(a, 4);
iq += 8;
len -= 8;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment