Skip to content

Commit fea8c41

Browse files
committed
Sync bela
1 parent 8e9da8e commit fea8c41

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1696
-6613
lines changed

vendor/bela.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
https://github.com/fcharlie/bela/tree/273ffe59699e48e0cacab33fcc2050fc5ee002d3
1+
https://github.com/fcharlie/bela/tree/b07adc5868de825dca0f2ddcb9ebb9726942f94a
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
https://github.com/microsoft/stl/tree/27877181dc50fc5f0dc9d679703437eb105e2b9f
1+
https://github.com/microsoft/stl/tree/5404ba9c25f26f25a0ac50e6c4defce7833a8da6

vendor/bela/external/charconv/charconv

Lines changed: 144 additions & 594 deletions
Large diffs are not rendered by default.

vendor/bela/external/charconv/xcharconv.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,20 @@ _STL_DISABLE_CLANG_WARNINGS
2525
#undef new
2626

2727
_STD_BEGIN
28-
enum class chars_format {
28+
_EXPORT_STD enum class chars_format {
2929
scientific = 0b001,
3030
fixed = 0b010,
3131
hex = 0b100,
3232
general = fixed | scientific,
3333
};
3434

35-
_BITMASK_OPS(chars_format)
35+
_BITMASK_OPS(_EXPORT_STD, chars_format)
3636

37-
struct to_chars_result {
37+
_EXPORT_STD struct to_chars_result {
3838
char* ptr;
3939
errc ec;
4040
#if _HAS_CXX20
41-
_NODISCARD friend bool operator==(const to_chars_result&, const to_chars_result&) = default;
41+
_NODISCARD_FRIEND bool operator==(const to_chars_result&, const to_chars_result&) = default;
4242
#endif // _HAS_CXX20
4343
};
4444

vendor/bela/external/charconv/xcharconv_ryu.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@
4747

4848
#if defined(_M_X64) && !defined(_M_ARM64EC)
4949
#define _HAS_CHARCONV_INTRINSICS 1
50-
#else // ^^^ intrinsics available ^^^ / vvv intrinsics unavailable vvv
50+
#else // ^^^ intrinsics available / intrinsics unavailable vvv
5151
#define _HAS_CHARCONV_INTRINSICS 0
5252
#endif // ^^^ intrinsics unavailable ^^^
5353

5454
#if _HAS_CHARCONV_INTRINSICS
55-
#include <intrin0.h> // for _umul128() and __shiftright128()
55+
#include _STL_INTRIN_HEADER // for _umul128() and __shiftright128()
5656
#endif // ^^^ intrinsics available ^^^
5757

5858
#if !_HAS_CXX17
@@ -161,7 +161,7 @@ _NODISCARD inline uint64_t __ryu_shiftright128(const uint64_t __lo, const uint64
161161
return __shiftright128(__lo, __hi, static_cast<unsigned char>(__dist));
162162
}
163163

164-
#else // ^^^ intrinsics available ^^^ / vvv intrinsics unavailable vvv
164+
#else // ^^^ intrinsics available / intrinsics unavailable vvv
165165

166166
_NODISCARD __forceinline uint64_t __ryu_umul128(const uint64_t __a, const uint64_t __b, uint64_t* const __productHi) {
167167
// TRANSITION, VSO-634761
@@ -200,7 +200,7 @@ _NODISCARD inline uint64_t __ryu_shiftright128(const uint64_t __lo, const uint64
200200
#ifdef _WIN64
201201
_STL_INTERNAL_CHECK(__dist > 0);
202202
return (__hi << (64 - __dist)) | (__lo >> __dist);
203-
#else // ^^^ 64-bit ^^^ / vvv 32-bit vvv
203+
#else // ^^^ 64-bit / 32-bit vvv
204204
// Avoid a 64-bit shift by taking advantage of the range of shift values.
205205
_STL_INTERNAL_CHECK(__dist >= 32);
206206
return (__hi << (64 - __dist)) | (static_cast<uint32_t>(__lo >> 32) >> (__dist - 32));
@@ -266,7 +266,7 @@ _NODISCARD inline uint32_t __mod1e9(const uint64_t __x) {
266266
return static_cast<uint32_t>(__x) - 1000000000 * static_cast<uint32_t>(__div1e9(__x));
267267
}
268268

269-
#else // ^^^ 32-bit ^^^ / vvv 64-bit vvv
269+
#else // ^^^ 32-bit / 64-bit vvv
270270

271271
_NODISCARD inline uint64_t __div5(const uint64_t __x) {
272272
return __x / 5;
@@ -383,7 +383,7 @@ _NODISCARD inline uint32_t __mulShift_mod1e9(const uint64_t __m, const uint64_t*
383383
const uint64_t __shiftedhigh = __s1high >> __dist;
384384
const uint64_t __shiftedlow = __ryu_shiftright128(__s1low, __s1high, __dist);
385385
return __uint128_mod1e9(__shiftedhigh, __shiftedlow);
386-
#else // ^^^ intrinsics available ^^^ / vvv intrinsics unavailable vvv
386+
#else // ^^^ intrinsics available / intrinsics unavailable vvv
387387
if (__j < 160) { // __j: [128, 160)
388388
const uint64_t __r0 = __mod1e9(__s1high);
389389
const uint64_t __r1 = __mod1e9((__r0 << 32) | (__s1low >> 32));
@@ -904,7 +904,7 @@ _NODISCARD inline to_chars_result __d2exp_buffered_n(char* _First, char* const _
904904
__roundUp = 1;
905905
} else {
906906
if (__roundUp == 1 || __c % 2 != 0) {
907-
_Round[0] = __c + 1;
907+
_Round[0] = static_cast<char>(__c + 1);
908908
}
909909
break;
910910
}
@@ -1027,7 +1027,7 @@ _NODISCARD inline uint32_t __mulShift(const uint32_t __m, const uint64_t __facto
10271027
__bits1Hi += (__bits1Lo < __bits0Hi);
10281028
const int32_t __s = __shift - 32;
10291029
return (__bits1Hi << (32 - __s)) | (__bits1Lo >> __s);
1030-
#else // ^^^ 32-bit ^^^ / vvv 64-bit vvv
1030+
#else // ^^^ 32-bit / 64-bit vvv
10311031
const uint64_t __sum = (__bits0 >> 32) + __bits1;
10321032
const uint64_t __shiftedSum = __sum >> (__shift - 32);
10331033
_STL_INTERNAL_CHECK(__shiftedSum <= UINT32_MAX);
@@ -1318,7 +1318,7 @@ _NODISCARD pair<_CharT*, errc> __to_chars(_CharT* const _First, _CharT* const _L
13181318
chars_format _Fmt, const uint32_t __ieeeMantissa, const uint32_t __ieeeExponent) {
13191319
// Step 5: Print the decimal representation.
13201320
uint32_t _Output = __v.__mantissa;
1321-
int32_t _Ryu_exponent = __v.__exponent;
1321+
const int32_t _Ryu_exponent = __v.__exponent;
13221322
const uint32_t __olength = __decimalLength9(_Output);
13231323
int32_t _Scientific_exponent = _Ryu_exponent + static_cast<int32_t>(__olength) - 1;
13241324

@@ -1681,7 +1681,7 @@ _NODISCARD inline uint64_t __mulShiftAll(const uint64_t __m, const uint64_t* con
16811681
return __mulShift(4 * __m, __mul, __j);
16821682
}
16831683

1684-
#else // ^^^ intrinsics available ^^^ / vvv intrinsics unavailable vvv
1684+
#else // ^^^ intrinsics available / intrinsics unavailable vvv
16851685

16861686
_NODISCARD __forceinline uint64_t __mulShiftAll(uint64_t __m, const uint64_t* const __mul, const int32_t __j,
16871687
uint64_t* const __vp, uint64_t* const __vm, const uint32_t __mmShift) { // TRANSITION, VSO-634761
@@ -1926,7 +1926,7 @@ _NODISCARD pair<_CharT*, errc> __to_chars(_CharT* const _First, _CharT* const _L
19261926
chars_format _Fmt, const double __f) {
19271927
// Step 5: Print the decimal representation.
19281928
uint64_t _Output = __v.__mantissa;
1929-
int32_t _Ryu_exponent = __v.__exponent;
1929+
const int32_t _Ryu_exponent = __v.__exponent;
19301930
const uint32_t __olength = __decimalLength17(_Output);
19311931
int32_t _Scientific_exponent = _Ryu_exponent + static_cast<int32_t>(__olength) - 1;
19321932

@@ -2050,7 +2050,7 @@ _NODISCARD pair<_CharT*, errc> __to_chars(_CharT* const _First, _CharT* const _L
20502050
unsigned long _Trailing_zero_bits;
20512051
#ifdef _WIN64
20522052
(void) _BitScanForward64(&_Trailing_zero_bits, __v.__mantissa); // __v.__mantissa is guaranteed nonzero
2053-
#else // ^^^ 64-bit ^^^ / vvv 32-bit vvv
2053+
#else // ^^^ 64-bit / 32-bit vvv
20542054
const uint32_t _Low_mantissa = static_cast<uint32_t>(__v.__mantissa);
20552055
if (_Low_mantissa != 0) {
20562056
(void) _BitScanForward(&_Trailing_zero_bits, _Low_mantissa);

0 commit comments

Comments
 (0)