mirror of
https://github.com/fastfloat/fast_float.git
synced 2025-12-06 16:56:57 +08:00
Compare commits
5 Commits
5c123e8614
...
1396a88bb9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1396a88bb9 | ||
|
|
3ae6d3c2b3 | ||
|
|
d0c7def24d | ||
|
|
50fa3ad99e | ||
|
|
80902aa90c |
@ -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}) {}
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user