| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a1ae050 commit c952fd8
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,4 @@ | |||
| 1 | - /* auto-generated on 2024-04-24 01:28:18 -0400. Do not edit! */ | ||
| 1 | + /* auto-generated on 2024-05-07 22:33:11 -0400. Do not edit! */ | ||
| 2 | 2 | /* begin file src/simdutf.cpp */ | |
| 3 | 3 | #include "simdutf.h" | |
| 4 | 4 | // We include base64_tables once. | |
@@ -1031,9 +1031,9 @@ namespace { | |||
| 1031 | 1031 | return vget_lane_u64(vreinterpret_u64_u8(vshrn_n_u16(vreinterpretq_u16_u8(*this), 4)), 0); | |
| 1032 | 1032 | } | |
| 1033 | 1033 | ||
| 1034 | - simdutf_really_inline bool any() const { return vmaxvq_u8(*this) != 0; } | ||
| 1035 | - simdutf_really_inline bool none() const { return vmaxvq_u8(*this) == 0; } | ||
| 1036 | - simdutf_really_inline bool all() const { return vminvq_u8(*this) == 0xFF; } | ||
| 1034 | + simdutf_really_inline bool any() const { return vmaxvq_u32(vreinterpretq_u32_u8(*this)) != 0; } | ||
| 1035 | + simdutf_really_inline bool none() const { return vmaxvq_u32(vreinterpretq_u32_u8(*this)) == 0; } | ||
| 1036 | + simdutf_really_inline bool all() const { return vminvq_u32(vreinterpretq_u32_u8(*this)) == 0xFFFFF; } | ||
| 1037 | 1037 | ||
| 1038 | 1038 | ||
| 1039 | 1039 | }; | |
@@ -2481,10 +2481,10 @@ namespace simd { | |||
| 2481 | 2481 | struct simd8<bool>: base8<bool> { | |
| 2482 | 2482 | static simdutf_really_inline simd8<bool> splat(bool _value) { return _mm256_set1_epi8(uint8_t(-(!!_value))); } | |
| 2483 | 2483 | ||
| 2484 | - simdutf_really_inline simd8<bool>() : base8() {} | ||
| 2485 | - simdutf_really_inline simd8<bool>(const __m256i _value) : base8<bool>(_value) {} | ||
| 2484 | + simdutf_really_inline simd8() : base8() {} | ||
| 2485 | + simdutf_really_inline simd8(const __m256i _value) : base8<bool>(_value) {} | ||
| 2486 | 2486 | // Splat constructor | |
| 2487 | - simdutf_really_inline simd8<bool>(bool _value) : base8<bool>(splat(_value)) {} | ||
| 2487 | + simdutf_really_inline simd8(bool _value) : base8<bool>(splat(_value)) {} | ||
| 2488 | 2488 | ||
| 2489 | 2489 | simdutf_really_inline uint32_t to_bitmask() const { return uint32_t(_mm256_movemask_epi8(*this)); } | |
| 2490 | 2490 | simdutf_really_inline bool any() const { return !_mm256_testz_si256(*this, *this); } | |
@@ -3409,10 +3409,10 @@ namespace simd { | |||
| 3409 | 3409 | struct simd8<bool>: base8<bool> { | |
| 3410 | 3410 | static simdutf_really_inline simd8<bool> splat(bool _value) { return _mm_set1_epi8(uint8_t(-(!!_value))); } | |
| 3411 | 3411 | ||
| 3412 | - simdutf_really_inline simd8<bool>() : base8() {} | ||
| 3413 | - simdutf_really_inline simd8<bool>(const __m128i _value) : base8<bool>(_value) {} | ||
| 3412 | + simdutf_really_inline simd8() : base8() {} | ||
| 3413 | + simdutf_really_inline simd8(const __m128i _value) : base8<bool>(_value) {} | ||
| 3414 | 3414 | // Splat constructor | |
| 3415 | - simdutf_really_inline simd8<bool>(bool _value) : base8<bool>(splat(_value)) {} | ||
| 3415 | + simdutf_really_inline simd8(bool _value) : base8<bool>(splat(_value)) {} | ||
| 3416 | 3416 | ||
| 3417 | 3417 | simdutf_really_inline int to_bitmask() const { return _mm_movemask_epi8(*this); } | |
| 3418 | 3418 | simdutf_really_inline bool any() const { return !_mm_testz_si128(*this, *this); } | |
@@ -4319,11 +4319,11 @@ template <> struct simd8<bool> : base8<bool> { | |||
| 4319 | 4319 | return (__m128i)vec_splats((unsigned char)(-(!!_value))); | |
| 4320 | 4320 | } | |
| 4321 | 4321 | ||
| 4322 | - simdutf_really_inline simd8<bool>() : base8() {} | ||
| 4323 | - simdutf_really_inline simd8<bool>(const __m128i _value) | ||
| 4322 | + simdutf_really_inline simd8() : base8() {} | ||
| 4323 | + simdutf_really_inline simd8(const __m128i _value) | ||
| 4324 | 4324 | : base8<bool>(_value) {} | |
| 4325 | 4325 | // Splat constructor | |
| 4326 | - simdutf_really_inline simd8<bool>(bool _value) | ||
| 4326 | + simdutf_really_inline simd8(bool _value) | ||
| 4327 | 4327 | : base8<bool>(splat(_value)) {} | |
| 4328 | 4328 | ||
| 4329 | 4329 | simdutf_really_inline int to_bitmask() const { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,4 @@ | |||
| 1 | - /* auto-generated on 2024-04-24 01:28:18 -0400. Do not edit! */ | ||
| 1 | + /* auto-generated on 2024-05-07 22:33:11 -0400. Do not edit! */ | ||
| 2 | 2 | /* begin file include/simdutf.h */ | |
| 3 | 3 | #ifndef SIMDUTF_H | |
| 4 | 4 | #define SIMDUTF_H | |
@@ -594,7 +594,7 @@ SIMDUTF_DISABLE_UNDESIRED_WARNINGS | |||
| 594 | 594 | #define SIMDUTF_SIMDUTF_VERSION_H | |
| 595 | 595 | ||
| 596 | 596 | /** The version of simdutf being used (major.minor.revision) */ | |
| 597 | - #define SIMDUTF_VERSION "5.2.6" | ||
| 597 | + #define SIMDUTF_VERSION "5.2.8" | ||
| 598 | 598 | ||
| 599 | 599 | namespace simdutf { | |
| 600 | 600 | enum { | |
@@ -609,7 +609,7 @@ enum { | |||
| 609 | 609 | /** | |
| 610 | 610 | * The revision (major.minor.REVISION) of simdutf being used. | |
| 611 | 611 | */ | |
| 612 | - SIMDUTF_VERSION_REVISION = 6 | ||
| 612 | + SIMDUTF_VERSION_REVISION = 8 | ||
| 613 | 613 | }; | |
| 614 | 614 | } // namespace simdutf | |
| 615 | 615 | ||
@@ -682,6 +682,17 @@ POSSIBILITY OF SUCH DAMAGE. | |||
| 682 | 682 | #endif | |
| 683 | 683 | ||
| 684 | 684 | ||
| 685 | + // RISC-V ISA detection utilities | ||
| 686 | + #if SIMDUTF_IS_RISCV64 && defined(__linux__) | ||
| 687 | + #include <unistd.h> // for syscall | ||
| 688 | + // We define these ourselves, for backwards compatibility | ||
| 689 | + struct simdutf_riscv_hwprobe { int64_t key; uint64_t value; }; | ||
| 690 | + #define simdutf_riscv_hwprobe(...) syscall(258, __VA_ARGS__) | ||
| 691 | + #define SIMDUTF_RISCV_HWPROBE_KEY_IMA_EXT_0 4 | ||
| 692 | + #define SIMDUTF_RISCV_HWPROBE_IMA_V (1 << 2) | ||
| 693 | + #define SIMDUTF_RISCV_HWPROBE_EXT_ZVBB (1 << 17) | ||
| 694 | + #endif // SIMDUTF_IS_RISCV64 && defined(__linux__) | ||
| 695 | + | ||
| 685 | 696 | namespace simdutf { | |
| 686 | 697 | namespace internal { | |
| 687 | 698 | ||
@@ -716,17 +727,6 @@ static inline uint32_t detect_supported_architectures() { | |||
| 716 | 727 | ||
| 717 | 728 | #elif SIMDUTF_IS_RISCV64 | |
| 718 | 729 | ||
| 719 | - #if defined(__linux__) | ||
| 720 | - | ||
| 721 | - #include <unistd.h> | ||
| 722 | - // We define these our selfs, for backwards compatibility | ||
| 723 | - struct simdutf_riscv_hwprobe { int64_t key; uint64_t value; }; | ||
| 724 | - #define simdutf_riscv_hwprobe(...) syscall(258, __VA_ARGS__) | ||
| 725 | - #define SIMDUTF_RISCV_HWPROBE_KEY_IMA_EXT_0 4 | ||
| 726 | - #define SIMDUTF_RISCV_HWPROBE_IMA_V (1 << 2) | ||
| 727 | - #define SIMDUTF_RISCV_HWPROBE_EXT_ZVBB (1 << 17) | ||
| 728 | - #endif | ||
| 729 | - | ||
| 730 | 730 | static inline uint32_t detect_supported_architectures() { | |
| 731 | 731 | uint32_t host_isa = instruction_set::DEFAULT; | |
| 732 | 732 | #if SIMDUTF_IS_RVV | |
@@ -2374,7 +2374,7 @@ simdutf_warn_unused size_t base64_length_from_binary(size_t length, base64_optio | |||
| 2374 | 2374 | * @param length the length of the input in bytes | |
| 2375 | 2375 | * @param output the pointer to buffer that can hold the conversion result (should be at least base64_length_from_binary(length) bytes long) | |
| 2376 | 2376 | * @param options the base64 options to use, can be base64_default or base64_url, is base64_default by default. | |
| 2377 | - * @return number of written bytes, will be equal to base64_length_from_binary(length) | ||
| 2377 | + * @return number of written bytes, will be equal to base64_length_from_binary(length, options) | ||
| 2378 | 2378 | */ | |
| 2379 | 2379 | size_t binary_to_base64(const char * input, size_t length, char* output, base64_options options = base64_default) noexcept; | |
| 2380 | 2380 | ||
@@ -3599,7 +3599,7 @@ class implementation { | |||
| 3599 | 3599 | * @param length the length of the input in bytes | |
| 3600 | 3600 | * @param output the pointer to buffer that can hold the conversion result (should be at least base64_length_from_binary(length) bytes long) | |
| 3601 | 3601 | * @param options the base64 options to use, can be base64_default or base64_url, is base64_default by default. | |
| 3602 | - * @return number of written bytes, will be equal to base64_length_from_binary(length) | ||
| 3602 | + * @return number of written bytes, will be equal to base64_length_from_binary(length, options) | ||
| 3603 | 3603 | */ | |
| 3604 | 3604 | virtual size_t binary_to_base64(const char * input, size_t length, char* output, base64_options options = base64_default) const noexcept = 0; | |
| 3605 | 3605 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments