From ed0fbb6ca69625ddec6df99815024d3f13989d6f Mon Sep 17 00:00:00 2001 From: davidwendt Date: Fri, 19 Mar 2021 11:21:44 -0400 Subject: [PATCH 1/2] Work-around for gcc7 compile error on Centos7 --- cpp/include/cudf/strings/detail/strings_column_factories.cuh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/include/cudf/strings/detail/strings_column_factories.cuh b/cpp/include/cudf/strings/detail/strings_column_factories.cuh index 932f7eb0926..08a1efd9d98 100644 --- a/cpp/include/cudf/strings/detail/strings_column_factories.cuh +++ b/cpp/include/cudf/strings/detail/strings_column_factories.cuh @@ -94,9 +94,9 @@ std::unique_ptr make_strings_column(IndexPairIterator begin, (null_count > 0) ? std::move(new_nulls.first) : rmm::device_buffer{0, stream, mr}; // build chars column + auto const avg_bytes_per_row = bytes / std::max(strings_count - null_count, 1); std::unique_ptr chars_column = [&] { // use a character-parallel kernel for long string lengths - auto const avg_bytes_per_row = bytes / std::max(strings_count - null_count, 1); if (avg_bytes_per_row > FACTORY_BYTES_PER_ROW_THRESHOLD) { auto const d_offsets = device_span{offsets_column->view().template data(), From 3172f04b919ba9fa4e909113d16dfbee53755481 Mon Sep 17 00:00:00 2001 From: davidwendt Date: Fri, 19 Mar 2021 12:54:32 -0400 Subject: [PATCH 2/2] fix style check --- cpp/include/cudf/strings/detail/strings_column_factories.cuh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/include/cudf/strings/detail/strings_column_factories.cuh b/cpp/include/cudf/strings/detail/strings_column_factories.cuh index 08a1efd9d98..92cf537454c 100644 --- a/cpp/include/cudf/strings/detail/strings_column_factories.cuh +++ b/cpp/include/cudf/strings/detail/strings_column_factories.cuh @@ -93,8 +93,8 @@ std::unique_ptr make_strings_column(IndexPairIterator begin, auto null_mask = (null_count > 0) ? std::move(new_nulls.first) : rmm::device_buffer{0, stream, mr}; - // build chars column auto const avg_bytes_per_row = bytes / std::max(strings_count - null_count, 1); + // build chars column std::unique_ptr chars_column = [&] { // use a character-parallel kernel for long string lengths if (avg_bytes_per_row > FACTORY_BYTES_PER_ROW_THRESHOLD) {