Add support for std::this_thread::sleep_for
Open
libcu++
- Dominant language
- C++
- Stars
- 2.5k
- Forks
- 486
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 295
Description
There seems to be an issue with `chrono::duration` being host only.
` std::this_thread::sleep_for(std::chrono::microseconds(1));`
generates the following compilation error:
`error: calling a constexpr __host__ function("duration") from a __device__ function("GetEventIndex") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.`
Trying to replace `std::chrono` by `cuda::std::chrono` causes a different compilation error
`error: no instance of function template "std::this_thread::sleep_for" matches the argument list
argument types are: (cuda::std::__3::chrono::microseconds)`
Contributor guide
Assessment
This issue has not been assessed yet.