文件 | |
文件 | dictionary/search.hpp |
函数 | |
std::unique_ptr< scalar > | cudf::dictionary::get_index (dictionary_column_view const &dictionary, scalar const &key, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref()) |
返回给定键的索引值。 更多... | |
std::unique_ptr<scalar> cudf::dictionary::get_index | ( | dictionary_column_view const & | dictionary, |
scalar const & | key, | ||
rmm::cuda_stream_view | stream = cudf::get_default_stream() , |
||
rmm::device_async_resource_ref | mr = cudf::get_current_device_resource_ref() |
||
) |
返回给定键的索引值。
如果键不在字典中,则返回的 scalar 将具有 is_valid()==false
cudf::logic_error | 如果 key.type() != dictionary.keys().type() |
dictionary | 要搜索键的字典。 |
key | 要在字典键集中搜索的值。 |
stream | 用于设备内存操作和内核启动的 CUDA stream。 |
mr | 用于分配返回的 scalar 的设备内存的设备内存资源。 |