文件 | |
文件 | label_bins.hpp |
用于按 bin 标记值的 API。 | |
枚举 | |
枚举类 | cudf::inclusive { YES , NO } |
用于定义 bin 是否包含其边界点的枚举。 | |
函数 | |
std::unique_ptr< column > | cudf::label_bins (column_view const &input, column_view const &left_edges, inclusive left_inclusive, column_view const &right_edges, inclusive right_inclusive, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref()) |
根据指定 bin 的成员身份标记元素。 更多... | |
std::unique_ptr<column> cudf::label_bins | ( | column_view const & | input, |
column_view const & | left_edges, | ||
inclusive | left_inclusive, | ||
column_view const & | right_edges, | ||
inclusive | right_inclusive, | ||
rmm::cuda_stream_view | stream = cudf::get_default_stream() , |
||
rmm::device_async_resource_ref | mr = cudf::get_current_device_resource_ref() |
||
) |
根据指定 bin 的成员身份标记元素。
Bin i
由 left_edges[i], right_edges[i]
定义。边界是否包含取决于 left_inclusive
和 right_inclusive
。
如果 input[j]
的值包含在范围 left_edges[i], right_edges[i]
内(具有指定的包含性),则属于 bin i
,其对应标记为 i
。如果 input[j]
不属于任何 bin,则其对应标记为 NULL。
注意
input
中的所有元素都将被标记为 NULL。input
中的 NULL 元素不属于任何 bin,其对应标记为 NULL。input
中的 NaN 元素不属于任何 bin,其对应标记为 NULL。cudf::logic_error | 如果违反了 input.type() == left_edges.type() == right_edges.type() 。 |
cudf::logic_error | 如果 left_edges.size() != right_edges.size() |
cudf::logic_error | 如果 left_edges.has_nulls() 或 right_edges.has_nulls() |
input | 根据指定的 bin 进行标记的输入元素。 |
left_edges | 每个 bin 的左边界值。 |
left_inclusive | 左边界是否包含。 |
right_edges | 每个 bin 的右边界值。 |
right_inclusive | 右边界是否包含。 |
stream | 用于设备内存操作和内核启动的 CUDA stream |
mr | 用于分配返回列的设备内存资源。 |
input
中元素的整数标记。