Skip to content

Commit

Permalink
Add a const for spin cycles
Browse files Browse the repository at this point in the history
  • Loading branch information
kleiti committed Nov 24, 2023
1 parent 749c75c commit 6197eb6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/onnxruntime/core/common/spin_pause.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ inline void SpinPause() {

inline void SpinTPAUSE() {
#if defined(_M_AMD64) || defined(__x86_64__)
_tpause(0x0, __rdtsc() + 2000);
const uint64_t spin_delay_cycles = 2000;
_tpause(0x0, __rdtsc() + spin_delay_cycles);
#endif
}

Expand Down

0 comments on commit 6197eb6

Please sign in to comment.