mirror of
https://github.com/fastfloat/fast_float.git
synced 2025-12-07 01:06:48 +08:00
* code cleanup.
This commit is contained in:
parent
80902aa90c
commit
50fa3ad99e
@ -130,7 +130,7 @@ struct event_collector {
|
|||||||
LinuxEvents<PERF_TYPE_HARDWARE> linux_events;
|
LinuxEvents<PERF_TYPE_HARDWARE> linux_events;
|
||||||
|
|
||||||
event_collector()
|
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_CPU_CYCLES, PERF_COUNT_HW_INSTRUCTIONS,
|
||||||
PERF_COUNT_HW_BRANCH_INSTRUCTIONS, // Retired branch instructions
|
PERF_COUNT_HW_BRANCH_INSTRUCTIONS, // Retired branch instructions
|
||||||
PERF_COUNT_HW_BRANCH_MISSES}) {}
|
PERF_COUNT_HW_BRANCH_MISSES}) {}
|
||||||
|
|||||||
@ -69,7 +69,7 @@ template <typename T> std::string fHexAndDec(T v) {
|
|||||||
return ss.str();
|
return ss.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string round_name(int const d) {
|
const std::string_view round_name(int const d) {
|
||||||
switch (d) {
|
switch (d) {
|
||||||
case FE_UPWARD:
|
case FE_UPWARD:
|
||||||
return "FE_UPWARD";
|
return "FE_UPWARD";
|
||||||
@ -107,9 +107,9 @@ TEST_CASE("system_info") {
|
|||||||
#endif
|
#endif
|
||||||
#ifdef FASTFLOAT_IS_BIG_ENDIAN
|
#ifdef FASTFLOAT_IS_BIG_ENDIAN
|
||||||
#if FASTFLOAT_IS_BIG_ENDIAN
|
#if FASTFLOAT_IS_BIG_ENDIAN
|
||||||
printf("big endian\n");
|
std::cout << "big endian" << std::endl;
|
||||||
#else
|
#else
|
||||||
printf("little endian\n");
|
std::cout << "little endian" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef FASTFLOAT_32BIT
|
#ifdef FASTFLOAT_32BIT
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user