Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/index/sparse/codec/streamvbyte_0124_decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <stdint.h>
#include <string.h> // for memcpy

#if defined(__SSE4_1__) || defined(__ARM_NEON__)
#if defined(__SSE4_1__) || defined(__ARM_NEON__) || defined(__ARM_NEON)
// using 0,1,2,4 bytes per value
static uint8_t lengthTable[256] = {
0, 1, 2, 4, 1, 2, 3, 5, 2, 3, 4, 6, 4, 5, 6, 8, 1, 2, 3, 5, 2, 3, 4, 6, 3, 4, 5, 7, 5, 6, 7, 9,
Expand Down Expand Up @@ -285,7 +285,7 @@ static int8_t shuffleTable[256][16] = {

#if defined(__SSE4_1__)
#include <immintrin.h>
#elif defined(__ARM_NEON__)
#elif defined(__ARM_NEON__) || defined(__ARM_NEON)
#include <arm_neon.h>
#endif

Expand All @@ -310,7 +310,7 @@ svb_write_uint32x4(uint32_t* out, decode_t Vec) {
}
#endif // __SSE4_1__

#ifdef __ARM_NEON__
#if defined(__ARM_NEON__) || defined(__ARM_NEON)
typedef uint8x16_t decode_t;

static inline decode_t
Expand All @@ -330,7 +330,7 @@ static inline void
svb_write_uint32x4(uint32_t* out, decode_t Vec) {
vst1q_u8((uint8_t*)out, Vec);
}
#endif // __ARM_NEON__
#endif // __ARM_NEON__ || __ARM_NEON

static inline uint32_t
svb_decode_data(const uint8_t** dataPtrPtr, uint8_t code) {
Expand Down Expand Up @@ -376,7 +376,7 @@ svb_decode_scalar(uint32_t* outPtr, const uint8_t* keyPtr, const uint8_t* dataPt
return dataPtr; // pointer to first unused byte after end
}

#if defined(__SSE4_1__) || defined(__ARM_NEON__)
#if defined(__SSE4_1__) || defined(__ARM_NEON__) || defined(__ARM_NEON)
static const uint8_t*
svb_decode_vec128_simple(uint32_t* out, const uint8_t* __restrict__ keyPtr, const uint8_t* __restrict__ dataPtr,
uint64_t count) {
Expand Down Expand Up @@ -449,7 +449,7 @@ svb_decode_vec128_simple(uint32_t* out, const uint8_t* __restrict__ keyPtr, cons

return dataPtr;
}
#endif // __SSE4_1__ || __ARM_NEON__
#endif // __SSE4_1__ || __ARM_NEON__ || __ARM_NEON

// Read count 32-bit integers in maskedvbyte format from in, storing the result
// in out. Returns the number of bytes read.
Expand All @@ -463,12 +463,12 @@ streamvbyte_decode_0124(const uint8_t* in, uint32_t* out, uint32_t count) {
uint32_t keyLen = ((count + 3) / 4); // 2-bits per key (rounded up)
const uint8_t* dataPtr = keyPtr + keyLen; // data starts at end of keys

#if defined(__SSE4_1__) || defined(__ARM_NEON__)
#if defined(__SSE4_1__) || defined(__ARM_NEON__) || defined(__ARM_NEON)
dataPtr = svb_decode_vec128_simple(out, keyPtr, dataPtr, count);
out += count & ~31U;
keyPtr += (count / 4) & ~7U;
count &= 31;
#endif // __SSE4_1__ || __ARM_NEON__
#endif // __SSE4_1__ || __ARM_NEON__ || __ARM_NEON

return (size_t)(svb_decode_scalar(out, keyPtr, dataPtr, count) - in);
}
Expand Down
Loading