| 44 | |
| 45 | #include <x86intrin.h> |
| 46 | inline int64_t cpu_cycles() { |
| 47 | // Rough way to detect new-ish CPUs |
| 48 | #ifdef __POPCNT__ |
| 49 | unsigned int dummy; |
| 50 | return __rdtscp(&dummy); |
| 51 | #else |
| 52 | return __rdtsc(); |
| 53 | #endif |
| 54 | } |
| 55 | |
| 56 | #else |
| 57 |
no outgoing calls
no test coverage detected