s-yata / marisa-trie

MARISA: Matching Algorithm with Recursively Implemented StorAge
Other
511 stars 89 forks source link

Add riscv64 support #40

Open mkszuba opened 3 years ago

mkszuba commented 3 years ago

Due to the fact riscv64 is not explicitly mentioned in include/marisa/base.h, MARISA_WORD_SIZE ends up being incorrectly set to 32 on this architecture. Fortunately, this is trivial to address - just add

|| (defined(__riscv) && (__riscv_xlen == 64))

to the end of the #if statement in base.h:31-34.

Confirmed to work on a physical rv64 Linux system.

References: