An owning object that can be used to lexicographically compare two rows of the same table. More...
Public Member Functions | |
| self_comparator (table_view const &t, host_span< order const > column_order={}, host_span< null_order const > null_precedence={}, rmm::cuda_stream_view stream=cudf::get_default_stream()) | |
| Construct an owning object for performing a lexicographic comparison between two rows of the same table. More... | |
| self_comparator (std::shared_ptr< preprocessed_table > t) | |
| Construct an owning object for performing a lexicographic comparison between two rows of the same preprocessed table. More... | |
| template<bool has_nested_columns, typename Nullate , typename PhysicalElementComparator = sorting_physical_element_comparator> | |
| auto | less (Nullate nullate={}, PhysicalElementComparator comparator={}) const |
| Return the binary operator for comparing rows in the table. More... | |
| template<bool has_nested_columns, typename Nullate , typename PhysicalElementComparator = sorting_physical_element_comparator> | |
| auto | less_equivalent (Nullate nullate={}, PhysicalElementComparator comparator={}) const |
| Return the binary operator for comparing rows in the table. More... | |
An owning object that can be used to lexicographically compare two rows of the same table.
This class can take a table_view and preprocess certain columns to allow for lexicographical comparison. The preprocessed table and temporary data required for the comparison are created and owned by this class.
Alternatively, self_comparator can be constructed from an existing shared_ptr<preprocessed_table> when sharing the same table among multiple comparators.
This class can then provide a functor object that can used on the device. The object of this class must outlive the usage of the device functor.
Definition at line 1016 of file experimental/row_operators.cuh.
|
inline |
Construct an owning object for performing a lexicographic comparison between two rows of the same table.
| t | The table to compare |
| column_order | Optional, host array the same length as a row that indicates the desired ascending/descending order of each column in a row. If empty, it is assumed all columns are sorted in ascending order. |
| null_precedence | Optional, device array the same length as a row and indicates how null values compare to all other for every column. If empty, then null precedence would be null_order::BEFORE for all columns. |
| stream | The stream to construct this object on. Not the stream that will be used for comparisons using this object. |
Definition at line 1032 of file experimental/row_operators.cuh.
|
inline |
Construct an owning object for performing a lexicographic comparison between two rows of the same preprocessed table.
This constructor allows independently constructing a preprocessed_table and sharing it among multiple comparators.
| t | A table preprocessed for lexicographic comparison |
Definition at line 1049 of file experimental/row_operators.cuh.
|
inline |
Return the binary operator for comparing rows in the table.
Returns a binary callable, F, with signature bool F(size_type, size_type).
F(i,j) returns true if and only if row i compares lexicographically less than row j.
element_comparator are templated via the type_dispatcher to help select an overload instance for each column in a table. So, cudf::is_nested<Element> will return true if the table has nested-type columns, but it will be a runtime error if template parameter has_nested_columns != true.| has_nested_columns | compile-time optimization for primitive types. This template parameter is to be used by the developer by querying cudf::has_nested_columns(input). true compiles operator overloads for nested types, while false only compiles operator overloads for primitive types. |
| Nullate | A cudf::nullate type describing whether to check for nulls. |
| PhysicalElementComparator | A relational comparator functor that compares individual values rather than logical elements, defaults to NaN aware relational comparator that evaluates NaN as greater than all other values. |
| cudf::logic_error | if the input table was preprocessed to transform any nested children columns into integer columns but PhysicalElementComparator is not sorting_physical_element_comparator. |
| nullate | Indicates if any input column contains nulls. |
| comparator | Physical element relational comparison functor. |
Definition at line 1082 of file experimental/row_operators.cuh.
|
inline |
Return the binary operator for comparing rows in the table.
Returns a binary callable, F, with signature bool F(size_type, size_type).
F(i,j) returns true if and only if row i compares lexicographically less than row j.
element_comparator are templated via the type_dispatcher to help select an overload instance for each column in a table. So, cudf::is_nested<Element> will return true if the table has nested-type columns, but it will be a runtime error if template parameter has_nested_columns != true.| has_nested_columns | compile-time optimization for primitive types. This template parameter is to be used by the developer by querying cudf::has_nested_columns(input). true compiles operator overloads for nested types, while false only compiles operator overloads for primitive types. |
| Nullate | A cudf::nullate type describing whether to check for nulls. |
| PhysicalElementComparator | A relational comparator functor that compares individual values rather than logical elements, defaults to NaN aware relational comparator that evaluates NaN as greater than all other values. |
| cudf::logic_error | if the input table was preprocessed to transform any nested children columns into integer columns but PhysicalElementComparator is not sorting_physical_element_comparator. |
| nullate | Indicates if any input column contains nulls. |
| comparator | Physical element relational comparison functor. |
Definition at line 1103 of file experimental/row_operators.cuh.