mirror of
https://github.com/google/benchmark.git
synced 2025-02-26 03:10:11 +08:00
Fix build errors on QuRT (Hexagon) (#1938)
This commit is contained in:
parent
951429282a
commit
8d4fdd6e6e
@ -219,7 +219,7 @@ inline BENCHMARK_ALWAYS_INLINE int64_t Now() {
|
||||
#elif defined(__hexagon__)
|
||||
uint64_t pcycle;
|
||||
asm volatile("%0 = C15:14" : "=r"(pcycle));
|
||||
return static_cast<double>(pcycle);
|
||||
return static_cast<int64_t>(pcycle);
|
||||
#elif defined(__alpha__)
|
||||
// Alpha has a cycle counter, the PCC register, but it is an unsigned 32-bit
|
||||
// integer and thus wraps every ~4s, making using it for tick counts
|
||||
|
@ -509,7 +509,7 @@ int GetNumCPUsImpl() {
|
||||
if (qurt_sysenv_get_max_hw_threads(&hardware_threads) != QURT_EOK) {
|
||||
hardware_threads.max_hthreads = 1;
|
||||
}
|
||||
return hardware_threads.max_hthreads;
|
||||
return static_cast<int>(hardware_threads.max_hthreads);
|
||||
#elif defined(BENCHMARK_HAS_SYSCTL)
|
||||
// *BSD, macOS
|
||||
int num_cpu = -1;
|
||||
|
Loading…
Reference in New Issue
Block a user