durations.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020-2022, 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 <cuda/std/chrono>
20 
21 namespace cudf {
22 
33 using duration_D = cuda::std::chrono::duration<int32_t, cuda::std::chrono::days::period>;
37 using duration_h = cuda::std::chrono::duration<int32_t, cuda::std::chrono::hours::period>;
41 using duration_m = cuda::std::chrono::duration<int32_t, cuda::std::chrono::minutes::period>;
45 using duration_s = cuda::std::chrono::duration<int64_t, cuda::std::chrono::seconds::period>;
49 using duration_ms = cuda::std::chrono::duration<int64_t, cuda::std::chrono::milliseconds::period>;
53 using duration_us = cuda::std::chrono::duration<int64_t, cuda::std::chrono::microseconds::period>;
57 using duration_ns = cuda::std::chrono::duration<int64_t, cuda::std::chrono::nanoseconds::period>;
58 
59 static_assert(sizeof(duration_D) == sizeof(typename duration_D::rep), "");
60 static_assert(sizeof(duration_h) == sizeof(typename duration_h::rep), "");
61 static_assert(sizeof(duration_m) == sizeof(typename duration_m::rep), "");
62 static_assert(sizeof(duration_s) == sizeof(typename duration_s::rep), "");
63 static_assert(sizeof(duration_ms) == sizeof(typename duration_ms::rep), "");
64 static_assert(sizeof(duration_us) == sizeof(typename duration_us::rep), "");
65 static_assert(sizeof(duration_ns) == sizeof(typename duration_ns::rep), "");
66  // end of group
68 } // namespace 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:41
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:57
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:33
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:49
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:37
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:53
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:45
cuDF interfaces
Definition: aggregation.hpp:34