Skip to content

Commit 2b81365

Browse files
committed
Merge branch 'add_rvv_support' of https://github.com/anthony-zy/snappy into add_rvv_support
2 parents c860cab + 4410326 commit 2b81365

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

snappy.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -292,17 +292,17 @@ inline constexpr std::array<char, sizeof...(indexes)> MakePatternMaskBytes(
292292
// Computes the shuffle control mask bytes array for given pattern-sizes and
293293
// returns an array.
294294
template <size_t... pattern_sizes_minus_one>
295-
inline constexpr std::array<std::array<char, kVectorSize>,
295+
inline constexpr std::array<std::array<char, sizeof(V128)>,
296296
sizeof...(pattern_sizes_minus_one)>
297297
MakePatternMaskBytesTable(int index_offset,
298298
index_sequence<pattern_sizes_minus_one...>) {
299299
return {MakePatternMaskBytes(index_offset, pattern_sizes_minus_one + 1,
300-
make_index_sequence<kVectorSize>())...};
300+
make_index_sequence<sizeof(V128)>())...};
301301
}
302302
// This is an array of shuffle control masks that can be used as the source
303303
// operand for PSHUFB to permute the contents of the destination XMM register
304304
// into a repeating byte pattern.
305-
alignas(16) constexpr std::array<std::array<char, kVectorSize>,
305+
alignas(16) constexpr std::array<std::array<char, sizeof(V128)>,
306306
16> pattern_generation_masks =
307307
MakePatternMaskBytesTable(
308308
/*index_offset=*/0,
@@ -313,7 +313,7 @@ alignas(16) constexpr std::array<std::array<char, kVectorSize>,
313313
// Basically, pattern_reshuffle_masks is a continuation of
314314
// pattern_generation_masks. It follows that, pattern_reshuffle_masks is same as
315315
// pattern_generation_masks for offsets 1, 2, 4, 8 and 16.
316-
alignas(16) constexpr std::array<std::array<char, kVectorSize>,
316+
alignas(16) constexpr std::array<std::array<char, sizeof(V128)>,
317317
16> pattern_reshuffle_masks =
318318
MakePatternMaskBytesTable(
319319
/*index_offset=*/16,

0 commit comments

Comments
 (0)