Skip to content

Commit

Permalink
Fix for some compiler warnings in parquet/page_decode.cuh (#15518)
Browse files Browse the repository at this point in the history
Clangd generates several warnings/errors in cpp/src/io/parquet/page_decode.cuh. One is in regards to a lambda argument shadowing a captured value. The others involve the use of `thrust::optional::value()` in device code...unlike pretty much every other member function, `value()` lacks the `__device__` decorator. This PR replaces two usages of `value()` with `operator*()` which does have the `__device__` decorator.

Authors:
  - Ed Seidl (https://github.com/etseidl)

Approvers:
  - David Wendt (https://github.com/davidwendt)
  - Nghia Truong (https://github.com/ttnghia)
  - Paul Mattione (https://github.com/pmattione-nvidia)
  - Vukasin Milovanovic (https://github.com/vuule)

URL: #15518
  • Loading branch information
etseidl authored Apr 16, 2024
1 parent b9d9af1 commit 690e558
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cpp/src/io/parquet/page_decode.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ inline __device__ uint32_t InitLevelSection(page_state_s* s,

auto start = cur;

auto init_rle = [s, lvl, end, level_bits](uint8_t const* cur, uint8_t const* end) {
auto init_rle = [s, lvl, level_bits](uint8_t const* cur, uint8_t const* end) {
uint32_t const run = get_vlq32(cur, end);
s->initial_rle_run[lvl] = run;
if (!(run & 1)) {
Expand Down Expand Up @@ -1160,7 +1160,7 @@ inline __device__ bool setupLocalPageInfo(page_state_s* const s,
int32_t units = 0;
// Duration types are not included because no scaling is done when reading
if (s->col.logical_type.has_value()) {
auto const& lt = s->col.logical_type.value();
auto const& lt = *s->col.logical_type;
if (lt.is_timestamp_millis()) {
units = cudf::timestamp_ms::period::den;
} else if (lt.is_timestamp_micros()) {
Expand Down Expand Up @@ -1217,7 +1217,7 @@ inline __device__ bool setupLocalPageInfo(page_state_s* const s,
} else if (data_type == INT32) {
// check for smaller bitwidths
if (s->col.logical_type.has_value()) {
auto const& lt = s->col.logical_type.value();
auto const& lt = *s->col.logical_type;
if (lt.type == LogicalType::INTEGER) {
s->dtype_len = lt.bit_width() / 8;
} else if (lt.is_time_millis()) {
Expand Down

0 comments on commit 690e558

Please sign in to comment.