durations.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020-2024, NVIDIA CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #pragma once
18 
19 #include <cudf/utilities/export.hpp>
20 
21 #include <cuda/std/chrono>
22 
23 namespace CUDF_EXPORT cudf {
24 
35 using duration_D = cuda::std::chrono::duration<int32_t, cuda::std::chrono::days::period>;
39 using duration_h = cuda::std::chrono::duration<int32_t, cuda::std::chrono::hours::period>;
43 using duration_m = cuda::std::chrono::duration<int32_t, cuda::std::chrono::minutes::period>;
47 using duration_s = cuda::std::chrono::duration<int64_t, cuda::std::chrono::seconds::period>;
51 using duration_ms = cuda::std::chrono::duration<int64_t, cuda::std::chrono::milliseconds::period>;
55 using duration_us = cuda::std::chrono::duration<int64_t, cuda::std::chrono::microseconds::period>;
59 using duration_ns = cuda::std::chrono::duration<int64_t, cuda::std::chrono::nanoseconds::period>;
60 
61 static_assert(sizeof(duration_D) == sizeof(typename duration_D::rep));
62 static_assert(sizeof(duration_h) == sizeof(typename duration_h::rep));
63 static_assert(sizeof(duration_m) == sizeof(typename duration_m::rep));
64 static_assert(sizeof(duration_s) == sizeof(typename duration_s::rep));
65 static_assert(sizeof(duration_ms) == sizeof(typename duration_ms::rep));
66 static_assert(sizeof(duration_us) == sizeof(typename duration_us::rep));
67 static_assert(sizeof(duration_ns) == sizeof(typename duration_ns::rep));
68  // end of group
70 } // namespace CUDF_EXPORT cudf
cuda::std::chrono::duration< int32_t, cuda::std::chrono::minutes::period > duration_m
Type alias representing an int32_t duration of minutes.
Definition: durations.hpp:43
cuda::std::chrono::duration< int64_t, cuda::std::chrono::nanoseconds::period > duration_ns
Type alias representing an int64_t duration of nanoseconds.
Definition: durations.hpp:59
cuda::std::chrono::duration< int32_t, cuda::std::chrono::days::period > duration_D
Type alias representing an int32_t duration of days.
Definition: durations.hpp:35
cuda::std::chrono::duration< int64_t, cuda::std::chrono::milliseconds::period > duration_ms
Type alias representing an int64_t duration of milliseconds.
Definition: durations.hpp:51
cuda::std::chrono::duration< int32_t, cuda::std::chrono::hours::period > duration_h
Type alias representing an int32_t duration of hours.
Definition: durations.hpp:39
cuda::std::chrono::duration< int64_t, cuda::std::chrono::microseconds::period > duration_us
Type alias representing an int64_t duration of microseconds.
Definition: durations.hpp:55
cuda::std::chrono::duration< int64_t, cuda::std::chrono::seconds::period > duration_s
Type alias representing an int64_t duration of seconds.
Definition: durations.hpp:47
cuDF interfaces
Definition: aggregation.hpp:35