Skip to content

Commit

Permalink
Fix alignment of output array in UTF8Decoder
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Nov 17, 2023
1 parent a291b27 commit 0b34b88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kitty/simd-string.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ typedef void (*control_byte_callback)(void *data, uint8_t ch);
typedef void (*output_chars_callback)(void *data, const uint32_t *chars, unsigned count);

typedef struct UTF8Decoder {
alignas(512/8) uint32_t output[512/8]; // we can process at most 512 bits of input (AVX512) so we get at most 64 chars of output
struct { uint32_t cur, prev, codep; } state;
alignas(64) uint32_t output[64];

void *callback_data;
control_byte_callback control_byte_callback;
Expand Down

0 comments on commit 0b34b88

Please sign in to comment.