Skip to content

Commit

Permalink
Fixed MSVC not supporting subscript operator on vector types
Browse files Browse the repository at this point in the history
  • Loading branch information
ashbob999 committed Sep 21, 2024
1 parent a3862fd commit a35cc50
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions include/stringzilla/drafts.h
Original file line number Diff line number Diff line change
Expand Up @@ -867,10 +867,10 @@ SZ_PUBLIC void sz_hashes_neon_readahead(sz_cptr_t start, sz_size_t length, sz_si
chars_readahead_vec[3].u8x16 = vld1q_u8(text + window_length * 3 + i);

for (; i != window_length; ++i) {
chars_incoming_low_vec.u32s[0] = chars_readahead_vec[0].u8x16[i];
chars_incoming_low_vec.u32s[1] = chars_readahead_vec[1].u8x16[i];
chars_incoming_low_vec.u32s[2] = chars_readahead_vec[2].u8x16[i];
chars_incoming_low_vec.u32s[3] = chars_readahead_vec[3].u8x16[i];
chars_incoming_low_vec.u32s[0] = chars_readahead_vec[0].u16s[i];
chars_incoming_low_vec.u32s[1] = chars_readahead_vec[1].u16s[i];
chars_incoming_low_vec.u32s[2] = chars_readahead_vec[2].u16s[i];
chars_incoming_low_vec.u32s[3] = chars_readahead_vec[3].u16s[i];
chars_incoming_high_vec.u8x16 = vaddq_u8(chars_incoming_low_vec.u8x16, vld1q_dup_u8(&high_shift));

// Append new data.
Expand Down Expand Up @@ -906,11 +906,11 @@ SZ_PUBLIC void sz_hashes_neon_readahead(sz_cptr_t start, sz_size_t length, sz_si

for (; i + 1 < window_length; ++i) {
// Transpose
chars_outgoing_low_vec.u32s[0] = chars_readahead_vec[0].u8x16[i];
chars_outgoing_low_vec.u32s[1] = chars_incoming_low_vec.u32s[0] = chars_readahead_vec[1].u8x16[i];
chars_outgoing_low_vec.u32s[2] = chars_incoming_low_vec.u32s[1] = chars_readahead_vec[2].u8x16[i];
chars_outgoing_low_vec.u32s[3] = chars_incoming_low_vec.u32s[2] = chars_readahead_vec[3].u8x16[i];
chars_incoming_low_vec.u32s[3] = chars_readahead_vec[4].u8x16[i];
chars_outgoing_low_vec.u32s[0] = chars_readahead_vec[0].u16s[i];
chars_outgoing_low_vec.u32s[1] = chars_incoming_low_vec.u32s[0] = chars_readahead_vec[1].u16s[i];
chars_outgoing_low_vec.u32s[2] = chars_incoming_low_vec.u32s[1] = chars_readahead_vec[2].u16s[i];
chars_outgoing_low_vec.u32s[3] = chars_incoming_low_vec.u32s[2] = chars_readahead_vec[3].u16s[i];
chars_incoming_low_vec.u32s[3] = chars_readahead_vec[4].u16s[i];

chars_outgoing_high_vec.u8x16 = vaddq_u8(chars_outgoing_low_vec.u8x16, vld1q_dup_u8(&high_shift));
chars_incoming_high_vec.u8x16 = vaddq_u8(chars_incoming_low_vec.u8x16, vld1q_dup_u8(&high_shift));
Expand Down

0 comments on commit a35cc50

Please sign in to comment.