timestamps.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2019-2024, NVIDIA CORPORATION.
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 
6 #pragma once
7 
8 #include <cudf/utilities/export.hpp>
10 
16 namespace CUDF_EXPORT cudf {
17 namespace detail {
18 // TODO: Use chrono::utc_clock when available in libcu++?
19 template <class Duration>
20 using time_point = cuda::std::chrono::sys_time<Duration>;
21 
27 template <class Duration>
29 } // namespace detail
30 
65 
66 static_assert(sizeof(timestamp_D) == sizeof(typename timestamp_D::rep));
67 static_assert(sizeof(timestamp_h) == sizeof(typename timestamp_h::rep));
68 static_assert(sizeof(timestamp_m) == sizeof(typename timestamp_m::rep));
69 static_assert(sizeof(timestamp_s) == sizeof(typename timestamp_s::rep));
70 static_assert(sizeof(timestamp_ms) == sizeof(typename timestamp_ms::rep));
71 static_assert(sizeof(timestamp_us) == sizeof(typename timestamp_us::rep));
72 static_assert(sizeof(timestamp_ns) == sizeof(typename timestamp_ns::rep));
73  // end of group
75 } // namespace CUDF_EXPORT cudf
Concrete type definitions for int32_t and int64_t durations in varying resolutions.
detail::timestamp< cudf::duration_ms > timestamp_ms
Type alias representing a cudf::duration_ms (int64_t) since the unix epoch.
Definition: timestamps.hpp:56
detail::timestamp< cudf::duration_s > timestamp_s
Type alias representing a cudf::duration_s (int64_t) since the unix epoch.
Definition: timestamps.hpp:52
detail::timestamp< cudf::duration_D > timestamp_D
Type alias representing a cudf::duration_D (int32_t) since the unix epoch.
Definition: timestamps.hpp:40
detail::timestamp< cudf::duration_m > timestamp_m
Type alias representing a cudf::duration_m (int32_t) since the unix epoch.
Definition: timestamps.hpp:48
detail::timestamp< cudf::duration_h > timestamp_h
Type alias representing a cudf::duration_h (int32_t) since the unix epoch.
Definition: timestamps.hpp:44
detail::timestamp< cudf::duration_us > timestamp_us
Type alias representing a cudf::duration_us (int64_t) since the unix epoch.
Definition: timestamps.hpp:60
detail::timestamp< cudf::duration_ns > timestamp_ns
Type alias representing a cudf::duration_ns (int64_t) since the unix epoch.
Definition: timestamps.hpp:64
cuDF interfaces
Definition: host_udf.hpp:26
cuda::std::chrono::sys_time< Duration > time_point
Time point type.
Definition: timestamps.hpp:20
time_point< Duration > timestamp
A wrapper around a column of time_point in varying resolutions.
Definition: timestamps.hpp:28