bwahaha
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| LZNA_DEC_INT val = 0; | |
| lzna_simd_vec xvec = vdupq_n_u16((U16) x); | |
| lzna_simd_vec cumfreq0 = vld1q_u16(&cumfreq[0]); | |
| lzna_simd_vec cumfreq1 = vld1q_u16(&cumfreq[8]); | |
| // do compares | |
| lzna_simd_vec gt0 = vcgtq_u16(cumfreq0, xvec); | |
| lzna_simd_vec gt1 = vcgtq_u16(cumfreq1, xvec); | |
| #if 0 && defined(__aarch64__) | |
| val = 15 + vaddvq_s16(U16toS16(gt0)) + vaddvq_s16(U16toS16(gt1)); | |
| #else | |
| val = (cumfreq[ 4] > x) ? 0 : 1; | |
| val += (cumfreq[ 8] > x) ? 0 : 1; | |
| val += (cumfreq[12] > x) ? 0 : 1; | |
| val *= 4; | |
| const U16 *cffine = cumfreq + val; | |
| val += (cffine[ 1] > x) ? 0 : 1; | |
| val += (cffine[ 2] > x) ? 0 : 1; | |
| val += (cffine[ 3] > x) ? 0 : 1; | |
| #endif | |
| assert(val >= 0 && val < nsyms); | |
| U32 start = cumfreq[val]; | |
| U32 range = getcumfreq(val + 1) - start; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment