diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-11-29 11:31:35 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-11-29 11:31:35 +0000 |
commit | b39a9f52ed3f33082f13f51678d053ee80a2e1f4 (patch) | |
tree | 2144a18d85681df09f83e255f2e5c6d04e61e878 /contrib/simdutf/src/simdutf.cpp | |
parent | 6c0223b32b8fcb6621fa64197214abb400a09f52 (diff) | |
download | rspamd-b39a9f52ed3f33082f13f51678d053ee80a2e1f4.tar.gz rspamd-b39a9f52ed3f33082f13f51678d053ee80a2e1f4.zip |
[Rework] Replace fastutf with simdutf
Simdutf is faster and has way better support of the architectures (especially
when it comes to non-x86 stuff). Hence, it is a good idea to use it instead
of the non-supported fastutf8 stuff.
Diffstat (limited to 'contrib/simdutf/src/simdutf.cpp')
-rw-r--r-- | contrib/simdutf/src/simdutf.cpp | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/contrib/simdutf/src/simdutf.cpp b/contrib/simdutf/src/simdutf.cpp new file mode 100644 index 000000000..81b2355aa --- /dev/null +++ b/contrib/simdutf/src/simdutf.cpp @@ -0,0 +1,82 @@ +#include "simdutf.h" +// We include base64_tables once. +#include "tables/base64_tables.h" +#include "implementation.cpp" +#include "encoding_types.cpp" +#include "error.cpp" +// The large tables should be included once and they +// should not depend on a kernel. +#include "tables/utf8_to_utf16_tables.h" +#include "tables/utf16_to_utf8_tables.h" +// End of tables. + +// The scalar routines should be included once. +#include "scalar/ascii.h" +#include "scalar/utf8.h" +#include "scalar/utf16.h" +#include "scalar/utf32.h" +#include "scalar/latin1.h" +#include "scalar/base64.h" + +#include "scalar/utf32_to_utf8/valid_utf32_to_utf8.h" +#include "scalar/utf32_to_utf8/utf32_to_utf8.h" + +#include "scalar/utf32_to_utf16/valid_utf32_to_utf16.h" +#include "scalar/utf32_to_utf16/utf32_to_utf16.h" + +#include "scalar/utf16_to_utf8/valid_utf16_to_utf8.h" +#include "scalar/utf16_to_utf8/utf16_to_utf8.h" + +#include "scalar/utf16_to_utf32/valid_utf16_to_utf32.h" +#include "scalar/utf16_to_utf32/utf16_to_utf32.h" + +#include "scalar/utf8_to_utf16/valid_utf8_to_utf16.h" +#include "scalar/utf8_to_utf16/utf8_to_utf16.h" + +#include "scalar/utf8_to_utf32/valid_utf8_to_utf32.h" +#include "scalar/utf8_to_utf32/utf8_to_utf32.h" + +#include "scalar/latin1_to_utf8/latin1_to_utf8.h" +#include "scalar/latin1_to_utf16/latin1_to_utf16.h" +#include "scalar/latin1_to_utf32/latin1_to_utf32.h" + +#include "scalar/utf8_to_latin1/utf8_to_latin1.h" +#include "scalar/utf16_to_latin1/utf16_to_latin1.h" +#include "scalar/utf32_to_latin1/utf32_to_latin1.h" + +#include "scalar/utf8_to_latin1/valid_utf8_to_latin1.h" +#include "scalar/utf16_to_latin1/valid_utf16_to_latin1.h" +#include "scalar/utf32_to_latin1/valid_utf32_to_latin1.h" + +SIMDUTF_PUSH_DISABLE_WARNINGS +SIMDUTF_DISABLE_UNDESIRED_WARNINGS + +#if SIMDUTF_IMPLEMENTATION_ARM64 + #include "arm64/implementation.cpp" +#endif +#if SIMDUTF_IMPLEMENTATION_FALLBACK + #include "fallback/implementation.cpp" +#endif +#if SIMDUTF_IMPLEMENTATION_ICELAKE + #include "icelake/implementation.cpp" +#endif +#if SIMDUTF_IMPLEMENTATION_HASWELL + #include "haswell/implementation.cpp" +#endif +#if SIMDUTF_IMPLEMENTATION_PPC64 + #include "ppc64/implementation.cpp" +#endif +#if SIMDUTF_IMPLEMENTATION_RVV + #include "rvv/implementation.cpp" +#endif +#if SIMDUTF_IMPLEMENTATION_WESTMERE + #include "westmere/implementation.cpp" +#endif +#if SIMDUTF_IMPLEMENTATION_LSX + #include "lsx/implementation.cpp" +#endif +#if SIMDUTF_IMPLEMENTATION_LASX + #include "lasx/implementation.cpp" +#endif + +SIMDUTF_POP_DISABLE_WARNINGS |