对应Intel SSE的android NEON

85 篇文章 0 订阅
17 篇文章 0 订阅

SSE是一种Intel的SIMD优化指令,单指令流多数据操作,并行计算指令,一般是128位操作,可以同时处理4个32位数的操作。


// Intel SSE
// shift the entire 128 bit value with 2 bytes to the right; this is done 
// without sign extension by shifting in zeros
__m128i val = _mm_srli_si128(vector_of_8_s16, 2);
// insert the least significant 16 bits of "some_16_bit_val"
// the whole thing in this case, into the selected 16 bit 
// integer of vector "val"(the 16 bit element with index 7 in this case)
val = _mm_insert_epi16(val, some_16_bit_val, 7);

对应的,在Android ARM 体系中,要用 VEXT 指令集. 

int16x8_t val = vextq_s16(vector_of_8_s16, another_vector_s16, 1);

http://stackoverflow.com/questions/7203231/neon-vs-intel-sse-equivalence-of-certain-operations


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值