]> git.pld-linux.org Git - packages/highway.git/blob - highway-rdtscp.patch
- updated to 0.16.0
[packages/highway.git] / highway-rdtscp.patch
1 --- highway-0.16.0/hwy/nanobenchmark.cc.orig    2022-04-09 18:30:28.550190500 +0200
2 +++ highway-0.16.0/hwy/nanobenchmark.cc 2022-04-09 18:31:11.596623964 +0200
3 @@ -439,6 +439,12 @@ HWY_DLLEXPORT double Now() {
4  }
5  
6  HWY_DLLEXPORT uint64_t TimerResolution() {
7 +#if HWY_ARCH_X86
8 +  /* TimerResolution() is used to initialize static variable, used in Measure() function */
9 +  if (!platform::HasRDTSCP())
10 +    return 0;
11 +#endif
12 +
13    // Nested loop avoids exceeding stack/L1 capacity.
14    timer::Ticks repetitions[Params::kTimerSamples];
15    for (size_t rep = 0; rep < Params::kTimerSamples; ++rep) {
This page took 0.21573 seconds and 3 git commands to generate.