mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
[NEON] optimize mask1bit128, get rid of simd_onebit_masks
This commit is contained in:
parent
02ae2a3cad
commit
0af2ba8616
@ -577,9 +577,9 @@ m128 variable_byte_shift_m128(m128 in, s32 amount) {
|
||||
static really_inline
|
||||
m128 mask1bit128(unsigned int n) {
|
||||
assert(n < sizeof(m128) * 8);
|
||||
u32 mask_idx = ((n % 8) * 64) + 95;
|
||||
mask_idx -= n / 8;
|
||||
return loadu128(&simd_onebit_masks[mask_idx]);
|
||||
static m128 onebit = { 1, 0 };
|
||||
m128 mask = lshiftbyte_m128( onebit, n / 8 );
|
||||
return lshift64_m128( mask, n % 8 );
|
||||
}
|
||||
|
||||
// switches on bit N in the given vector.
|
||||
|
Loading…
x
Reference in New Issue
Block a user