Compare commits

...

5 Commits

Author SHA1 Message Date
HedgehogInTheCPP
1396a88bb9
Merge 3ae6d3c2b3e93ec48af7f4ce7d540518efc3b323 into 7b21183a93c4a8943a2d384f207537d7330547e1 2025-11-09 13:40:49 +00:00
IRainman
3ae6d3c2b3 # unfck lint 2025-11-09 16:40:44 +03:00
IRainman
d0c7def24d * try to fix error on x86 platform step2. 2025-11-09 16:38:57 +03:00
IRainman
50fa3ad99e * code cleanup. 2025-11-09 16:34:42 +03:00
IRainman
80902aa90c * try to fix error on x86 platform step1. 2025-11-09 16:34:07 +03:00
4 changed files with 9 additions and 7 deletions

View File

@ -130,7 +130,8 @@ struct event_collector {
LinuxEvents<PERF_TYPE_HARDWARE> linux_events;
event_collector()
: linux_events(std::array<unsigned long long, 4>{
: linux_events(std::array<unsigned long long,
4 /*event_counter_types_size*/>{
PERF_COUNT_HW_CPU_CYCLES, PERF_COUNT_HW_INSTRUCTIONS,
PERF_COUNT_HW_BRANCH_INSTRUCTIONS, // Retired branch instructions
PERF_COUNT_HW_BRANCH_MISSES}) {}

View File

@ -70,7 +70,7 @@ read8_to_u64(UC const *chars) {
#ifdef FASTFLOAT_SSE2
fastfloat_really_inline uint64_t simd_read8_to_u64(__m128i const &data) {
fastfloat_really_inline uint64_t simd_read8_to_u64(__m128i const data) {
FASTFLOAT_SIMD_DISABLE_WARNINGS
// _mm_packus_epi16 is SSE2+, converts 8×u16 → 8×u8
__m128i const packed = _mm_packus_epi16(data, data);
@ -94,7 +94,7 @@ fastfloat_really_inline uint64_t simd_read8_to_u64(char16_t const *chars) {
#elif defined(FASTFLOAT_NEON)
fastfloat_really_inline uint64_t simd_read8_to_u64(uint16x8_t const &data) {
fastfloat_really_inline uint64_t simd_read8_to_u64(uint16x8_t const data) {
FASTFLOAT_SIMD_DISABLE_WARNINGS
uint8x8_t utf8_packed = vmovn_u16(data);
return vget_lane_u64(vreinterpret_u64_u8(utf8_packed), 0);

View File

@ -179,7 +179,8 @@ using parse_options = parse_options_t<char>;
#if defined(__SSE2__) || (defined(FASTFLOAT_VISUAL_STUDIO) && \
(defined(_M_AMD64) || defined(_M_X64) || \
(defined(_M_IX86_FP) && _M_IX86_FP == 2)))
#define FASTFLOAT_SSE2 1
// try to fix error on x86 platform: disable SSE2 code
// #define FASTFLOAT_SSE2 1
#endif
#if defined(__aarch64__) || defined(_M_ARM64)

View File

@ -69,7 +69,7 @@ template <typename T> std::string fHexAndDec(T v) {
return ss.str();
}
const std::string round_name(int const d) {
const std::string_view round_name(int const d) {
switch (d) {
case FE_UPWARD:
return "FE_UPWARD";
@ -107,9 +107,9 @@ TEST_CASE("system_info") {
#endif
#ifdef FASTFLOAT_IS_BIG_ENDIAN
#if FASTFLOAT_IS_BIG_ENDIAN
printf("big endian\n");
std::cout << "big endian" << std::endl;
#else
printf("little endian\n");
std::cout << "little endian" << std::endl;
#endif
#endif
#ifdef FASTFLOAT_32BIT