文件 | |
文件 | copying.hpp |
用于 gather、scatter、split、slice 等操作的列 API。 | |
函数 | |
std::unique_ptr< column > | cudf::shift (column_view const &input, size_type offset, scalar const &fill_value, 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> cudf::shift | ( | column_view const & | input, |
size_type | offset, | ||
scalar const & | fill_value, | ||
rmm::cuda_stream_view | stream = cudf::get_default_stream() , |
||
rmm::device_async_resource_ref | mr = cudf::get_current_device_resource_ref() |
||
) |
通过偏移量移动所有值来创建新列。
元素将由 output[idx] = input[idx - offset]
确定。输出中的某些元素可能无法从输入确定。对于这些元素,其值将由 fill_values
确定。
input | 要移动的列 |
offset | 移动输入的偏移量 |
fill_value | 用于不确定输出的填充值 |
stream | 用于设备内存操作和内核启动的 CUDA 流 |
mr | 用于分配返回结果的设备内存的设备内存资源 |
cudf::data_type_error | 如果 input 的 dtype 既不是固定宽度类型也不是字符串类型 |
cudf::data_type_error | 如果 fill_value 的 dtype 与 input 的 dtype 不匹配。 |