-
Notifications
You must be signed in to change notification settings - Fork 915
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable column_view data accessors for unsupported types (#7725)
Fixes #7712 `column_view` provides data accessors like `column_view::data<T>` and `column_view::begin<T>`. These accessors are only valid for fixed-width primitive types that can be constructed by simply casting the underlying `void*` to `T*`. However, the accessors never actually enforced this rule, e.g., `column_view::data<struct_view>` should fail to compile. This PR disables these accessors for invalid types. This uncovered a number of places that were erroneously instantiating `column_view` accessors, which would lead to silent failures (e.g., `scatter` was failing silently for `struct` columns). I added a few new things to aid me in this effort: - `CUDF_ENABLE_IF` macro to make it easier to SFINAE. - `is_rep_layout_compatbile<T>()` to identify types that are layout compatible with their rep (e.g., `duration_ns` is layout compatible with its `int64_t` rep. The `decimal32` type is _not_ layout compatible with it's `int32_t` rep). - `column_device_view::has_element_accessor<T>()` identifies if `column_device_view::element<T>()` has a valid overload. Authors: - Jake Hemstad (@jrhemstad) Approvers: - Christopher Harris (@cwharris) - Conor Hoekstra (@codereport) - Vyas Ramasubramani (@vyasr) URL: #7725
- Loading branch information
Showing
19 changed files
with
617 additions
and
353 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.