convert_datetime.hpp
转到此文件的文档。
1 /*
2  * 版权所有 (c) 2019-2024, NVIDIA CORPORATION.
3  *
4  * 根据 Apache 许可证 2.0 版(“许可证”)获得许可;
5  * 除非遵守许可证,否则您不得使用此文件。
6  * 您可以获取许可证的副本,地址为
7  *
8  * https://apache.ac.cn/licenses/LICENSE-2.0
9  *
10  * 除非适用法律要求或书面同意,否则根据许可证分发的软件按“原样”分发,没有任何明示或暗示的保证或条件。
11  * 请参阅许可证,了解根据许可证授予的特定语言权限和限制。
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15  */
16 #pragma once
17 
18 #include <cudf/column/column.hpp>
21 
22 #include <string>
23 #include <vector>
24 
25 namespace CUDF_EXPORT cudf {
26 namespace strings {
86 std::unique_ptr<column> to_timestamps(
87  strings_column_view const& input,
88  data_type timestamp_type,
89  std::string_view format,
92 
134 std::unique_ptr<column> is_timestamp(
135  strings_column_view const& input,
136  std::string_view format,
139 
246 std::unique_ptr<column> from_timestamps(
247  column_view const& timestamps,
248  std::string_view format = "%Y-%m-%dT%H:%M:%SZ",
250  data_type{type_id::STRING}, 0, nullptr, nullptr, 0}),
253  // end of doxygen group
255 } // namespace strings
256 } // namespace CUDF_EXPORT cudf
对设备数据作为元素列的非拥有、不可变视图,其中某些元素可能为空,如 ind...
列中元素的逻辑数据类型指示符。
定义: types.hpp:243
给定一个字符串类型的列视图,此类的实例提供了对此复合列的包装...
cudf::column 的类定义。
rmm::cuda_stream_view const get_default_stream()
获取当前默认流。
rmm::device_async_resource_ref get_current_device_resource_ref()
获取当前设备内存资源引用。
cuda::mr::async_resource_ref< cuda::mr::device_accessible > device_async_resource_ref
std::unique_ptr< column > is_timestamp(strings_column_view const &input, std::string_view format, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
使用提供的格式模式验证给定的字符串列是否可以解析为时间戳。
std::unique_ptr< column > to_timestamps(strings_column_view const &input, data_type timestamp_type, std::string_view format, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
返回一个新的时间戳列,使用提供的格式将字符串列转换为时间戳...
std::unique_ptr< column > from_timestamps(column_view const ×tamps, std::string_view format="%Y-%m-%dT%H:%M:%SZ", strings_column_view const &names=strings_column_view(column_view{ data_type{type_id::STRING}, 0, nullptr, nullptr, 0}), rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
返回一个新的字符串列,使用提供的格式模式将时间戳列转换为字符串...
cuDF 接口
定义: host_udf.hpp:37
cudf::strings_column_view 的类定义。