Skip to content

Commit

Permalink
Remove the unnecessary lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
mhaseeb123 committed Oct 11, 2024
1 parent 62ca2ce commit fba84c5
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions cpp/src/io/parquet/chunk_dict.cu
Original file line number Diff line number Diff line change
Expand Up @@ -194,17 +194,12 @@ struct map_find_fn {
val_idx += block_size) {
// Find the key using a single thread for best performance for now.
if (data_col.is_valid(val_idx)) {
auto const found_slot = map_find_ref.find(val_idx);
// Fail if we didn't find the previously inserted key.
cudf_assert(found_slot != map_find_ref.end() &&
"Unable to find value in map in dictionary index construction");
// No need for atomic as this is not going to be modified by any other thread.
chunk->dict_index[val_idx - s_ck_start_val_idx] = [&]() {
auto const found_slot = map_find_ref.find(val_idx);

// Fail if we didn't find the previously inserted key.
cudf_assert(found_slot != map_find_ref.end() &&
"Unable to find value in map in dictionary index construction");

// Return the found value.
return found_slot->second;
}();
chunk->dict_index[val_idx - s_ck_start_val_idx] = found_slot->second;
}
}
} else {
Expand Down

0 comments on commit fba84c5

Please sign in to comment.