Download install/include/cuda/std/chrono from camenduru/thrust: direct link, hf CLI and curl.
- Browser
- Download file 2.42 kB
-
https://huggingface.co/camenduru/thrust/resolve/main/install/include/cuda/std/chrono
- Command line
-
hf download hf://camenduru/thrust/install/include/cuda/std/chrono
-
curl -L -o chrono https://huggingface.co/camenduru/thrust/resolve/main/install/include/cuda/std/chrono
2.42 kB
| //===----------------------------------------------------------------------===// | |
| // | |
| // Part of libcu++, the C++ Standard Library for your entire system, | |
| // under the Apache License v2.0 with LLVM Exceptions. | |
| // See https://llvm.org/LICENSE.txt for license information. | |
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| // | |
| //===----------------------------------------------------------------------===// | |
| // Silence NVCC warnings `long double` arising from chrono floating pointer | |
| // user-defined literals which are defined in terms of `long double`. | |
| // FIXME: There is currently no way to disable this diagnostic in a fine-grained | |
| // fashion; if you include this header, the diagnostic will be suppressed | |
| // throughout the translation unit. The alternative is loosing (conforming) | |
| // chrono user-defined literals; this seems like the lesser of two evils, so... | |
| _LIBCUDACXX_BEGIN_NAMESPACE_STD | |
| namespace chrono { | |
| inline _LIBCUDACXX_INLINE_VISIBILITY | |
| system_clock::time_point system_clock::now() _NOEXCEPT | |
| { | |
| uint64_t __time; | |
| asm volatile("mov.u64 %0, %globaltimer;":"=l"(__time)::); | |
| return time_point(duration_cast<duration>(nanoseconds(__time))); | |
| return time_point(duration_cast<duration>(nanoseconds( | |
| ::std::chrono::duration_cast<::std::chrono::nanoseconds>( | |
| ::std::chrono::system_clock::now().time_since_epoch() | |
| ).count() | |
| ))); | |
| } | |
| inline _LIBCUDACXX_INLINE_VISIBILITY | |
| time_t system_clock::to_time_t(const system_clock::time_point& __t) _NOEXCEPT | |
| { | |
| return time_t(duration_cast<seconds>(__t.time_since_epoch()).count()); | |
| } | |
| inline _LIBCUDACXX_INLINE_VISIBILITY | |
| system_clock::time_point system_clock::from_time_t(time_t __t) _NOEXCEPT | |
| { | |
| return time_point(seconds(__t));; | |
| } | |
| } | |
| _LIBCUDACXX_END_NAMESPACE_STD | |