文件 | |
| 文件 | search.hpp |
| 用于lower_bound、upper_bound和contains的列API。 | |
| std::unique_ptr<column> cudf::contains | ( | column_view const & | haystack, |
| column_view const & | needles, | ||
| rmm::cuda_stream_view | stream = cudf::get_default_stream(), |
||
| rmm::device_async_resource_ref | mr = cudf::get_current_device_resource_ref() |
||
| ) |
检查给定的needles值是否存在于haystack列中。
新列的类型将是 BOOL,并且与输入的needles列具有相同的大小和空值掩码。也就是说,needles列中的任何空行都将导致输出列中出现空行。
| cudf::logic_error | 如果haystack.type() != needles.type() |
| haystack | 包含搜索空间的列 |
| needles | 要在搜索空间中检查是否存在的值列 |
| stream | 用于设备内存操作和内核启动的CUDA流 |
| mr | 用于分配返回列的设备内存的设备内存资源 |
needles中的每个元素是否存在于搜索空间中| bool cudf::contains | ( | column_view const & | haystack, |
| scalar const & | needle, | ||
| rmm::cuda_stream_view | stream = cudf::get_default_stream() |
||
| ) |
检查给定的needle值是否存在于haystack列中。
| cudf::logic_error | 如果haystack.type() != needle.type()。 |
| haystack | 包含搜索空间的列 |
| needle | 一个标量值,用于检查其是否存在于搜索空间中 |
| stream | 用于设备内存操作和内核启动的CUDA流 |
needle值存在于haystack列中,则为 true| std::unique_ptr<column> cudf::lower_bound | ( | table_view const & | haystack, |
| table_view const & | needles, | ||
| std::vector< order > const & | column_order, | ||
| std::vector< null_order > const & | null_precedence, | ||
| rmm::cuda_stream_view | stream = cudf::get_default_stream(), |
||
| rmm::device_async_resource_ref | mr = cudf::get_current_device_resource_ref() |
||
| ) |
在排序表中查找应插入值以保持排序的最小索引。
对于needles中的每一行,查找在haystack中插入该行后仍能保持其排序顺序的第一个索引。
| haystack | 包含搜索空间的表 |
| needles | 要在搜索空间中查找插入位置的值 |
| column_order | 列排序顺序的向量 |
| null_precedence | null_precedence 枚举的向量 |
| stream | 用于设备内存操作和内核启动的CUDA流 |
| mr | 用于分配返回列的设备内存的设备内存资源 |
| std::unique_ptr<column> cudf::upper_bound | ( | table_view const & | haystack, |
| table_view const & | needles, | ||
| std::vector< order > const & | column_order, | ||
| std::vector< null_order > const & | null_precedence, | ||
| rmm::cuda_stream_view | stream = cudf::get_default_stream(), |
||
| rmm::device_async_resource_ref | mr = cudf::get_current_device_resource_ref() |
||
| ) |
在排序表中查找应插入值以保持排序的最大索引。
对于needles中的每一行,查找在haystack中插入该行后仍能保持其排序顺序的最后一个索引。
| haystack | 包含搜索空间的表 |
| needles | 要在搜索空间中查找插入位置的值 |
| column_order | 列排序顺序的向量 |
| null_precedence | null_precedence 枚举的向量 |
| stream | 用于设备内存操作和内核启动的CUDA流 |
| mr | 用于分配返回列的设备内存的设备内存资源 |