From ea50f22adea35373d3149734fc60eb59c820c3b0 Mon Sep 17 00:00:00 2001 From: Rong Ou Date: Tue, 18 Jan 2022 10:17:20 -0800 Subject: [PATCH 1/3] fix gcc 11 compilation errors --- cpp/benchmarks/common/generate_benchmark_input.cpp | 1 + cpp/include/cudf/strings/repeat_strings.hpp | 2 ++ cpp/include/cudf/strings/replace_re.hpp | 2 ++ cpp/src/io/orc/aggregate_orc_metadata.cpp | 2 +- cpp/src/io/utilities/trie.cuh | 2 ++ java/src/main/native/src/CompiledExpression.cpp | 2 +- 6 files changed, 9 insertions(+), 2 deletions(-) diff --git a/cpp/benchmarks/common/generate_benchmark_input.cpp b/cpp/benchmarks/common/generate_benchmark_input.cpp index 995cea13c27..d90fb2586aa 100644 --- a/cpp/benchmarks/common/generate_benchmark_input.cpp +++ b/cpp/benchmarks/common/generate_benchmark_input.cpp @@ -31,6 +31,7 @@ #include #include +#include #include #include #include diff --git a/cpp/include/cudf/strings/repeat_strings.hpp b/cpp/include/cudf/strings/repeat_strings.hpp index edba01b174f..f6bf12af967 100644 --- a/cpp/include/cudf/strings/repeat_strings.hpp +++ b/cpp/include/cudf/strings/repeat_strings.hpp @@ -18,6 +18,8 @@ #include #include +#include + namespace cudf { namespace strings { /** diff --git a/cpp/include/cudf/strings/replace_re.hpp b/cpp/include/cudf/strings/replace_re.hpp index a2c4eba1636..0e904958d15 100644 --- a/cpp/include/cudf/strings/replace_re.hpp +++ b/cpp/include/cudf/strings/replace_re.hpp @@ -20,6 +20,8 @@ #include #include +#include + namespace cudf { namespace strings { /** diff --git a/cpp/src/io/orc/aggregate_orc_metadata.cpp b/cpp/src/io/orc/aggregate_orc_metadata.cpp index 82161233a92..e226d42bd58 100644 --- a/cpp/src/io/orc/aggregate_orc_metadata.cpp +++ b/cpp/src/io/orc/aggregate_orc_metadata.cpp @@ -171,7 +171,7 @@ std::vector aggregate_orc_metadata::select_stri // Coalesce stripe info at the source file later since that makes downstream processing much // easier in impl::read - for (const size_t& stripe_idx : user_specified_stripes[src_file_idx]) { + for (const size_t stripe_idx : user_specified_stripes[src_file_idx]) { CUDF_EXPECTS(stripe_idx < per_file_metadata[src_file_idx].ff.stripes.size(), "Invalid stripe index"); stripe_infos.push_back( diff --git a/cpp/src/io/utilities/trie.cuh b/cpp/src/io/utilities/trie.cuh index 1140a08b76b..85834ad2f0e 100644 --- a/cpp/src/io/utilities/trie.cuh +++ b/cpp/src/io/utilities/trie.cuh @@ -23,6 +23,8 @@ #include +#include + namespace cudf { namespace detail { static constexpr char trie_terminating_character = '\n'; diff --git a/java/src/main/native/src/CompiledExpression.cpp b/java/src/main/native/src/CompiledExpression.cpp index a18c88e10dc..35fd5efa04a 100644 --- a/java/src/main/native/src/CompiledExpression.cpp +++ b/java/src/main/native/src/CompiledExpression.cpp @@ -59,7 +59,7 @@ class jni_serialized_ast { check_for_eof(sizeof(T)); // use memcpy since data may be misaligned T result; - memcpy(&result, data_ptr, sizeof(T)); + memcpy(reinterpret_cast(&result), data_ptr, sizeof(T)); data_ptr += sizeof(T); return result; } From d68e7f5d7dcd5259f634d81515af53215071197d Mon Sep 17 00:00:00 2001 From: Rong Ou Date: Tue, 18 Jan 2022 11:42:04 -0800 Subject: [PATCH 2/3] revert changes already in flight --- cpp/benchmarks/common/generate_benchmark_input.cpp | 2 +- cpp/include/cudf/strings/repeat_strings.hpp | 2 -- cpp/include/cudf/strings/replace_re.hpp | 2 -- cpp/src/io/orc/aggregate_orc_metadata.cpp | 2 +- cpp/src/io/utilities/trie.cuh | 2 -- java/src/main/native/src/CompiledExpression.cpp | 2 +- 6 files changed, 3 insertions(+), 9 deletions(-) diff --git a/cpp/benchmarks/common/generate_benchmark_input.cpp b/cpp/benchmarks/common/generate_benchmark_input.cpp index d90fb2586aa..dcd8e32fc9d 100644 --- a/cpp/benchmarks/common/generate_benchmark_input.cpp +++ b/cpp/benchmarks/common/generate_benchmark_input.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2021, NVIDIA CORPORATION. + * Copyright (c) 2020-2022, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cpp/include/cudf/strings/repeat_strings.hpp b/cpp/include/cudf/strings/repeat_strings.hpp index f6bf12af967..edba01b174f 100644 --- a/cpp/include/cudf/strings/repeat_strings.hpp +++ b/cpp/include/cudf/strings/repeat_strings.hpp @@ -18,8 +18,6 @@ #include #include -#include - namespace cudf { namespace strings { /** diff --git a/cpp/include/cudf/strings/replace_re.hpp b/cpp/include/cudf/strings/replace_re.hpp index 0e904958d15..a2c4eba1636 100644 --- a/cpp/include/cudf/strings/replace_re.hpp +++ b/cpp/include/cudf/strings/replace_re.hpp @@ -20,8 +20,6 @@ #include #include -#include - namespace cudf { namespace strings { /** diff --git a/cpp/src/io/orc/aggregate_orc_metadata.cpp b/cpp/src/io/orc/aggregate_orc_metadata.cpp index e226d42bd58..82161233a92 100644 --- a/cpp/src/io/orc/aggregate_orc_metadata.cpp +++ b/cpp/src/io/orc/aggregate_orc_metadata.cpp @@ -171,7 +171,7 @@ std::vector aggregate_orc_metadata::select_stri // Coalesce stripe info at the source file later since that makes downstream processing much // easier in impl::read - for (const size_t stripe_idx : user_specified_stripes[src_file_idx]) { + for (const size_t& stripe_idx : user_specified_stripes[src_file_idx]) { CUDF_EXPECTS(stripe_idx < per_file_metadata[src_file_idx].ff.stripes.size(), "Invalid stripe index"); stripe_infos.push_back( diff --git a/cpp/src/io/utilities/trie.cuh b/cpp/src/io/utilities/trie.cuh index 85834ad2f0e..1140a08b76b 100644 --- a/cpp/src/io/utilities/trie.cuh +++ b/cpp/src/io/utilities/trie.cuh @@ -23,8 +23,6 @@ #include -#include - namespace cudf { namespace detail { static constexpr char trie_terminating_character = '\n'; diff --git a/java/src/main/native/src/CompiledExpression.cpp b/java/src/main/native/src/CompiledExpression.cpp index 35fd5efa04a..6f6e1ac52a7 100644 --- a/java/src/main/native/src/CompiledExpression.cpp +++ b/java/src/main/native/src/CompiledExpression.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, NVIDIA CORPORATION. + * Copyright (c) 2021-2022, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From dca6fad37a26a56e9cf548c90a7f6b3b4aeff939 Mon Sep 17 00:00:00 2001 From: Rong Ou Date: Tue, 18 Jan 2022 11:54:49 -0800 Subject: [PATCH 3/3] revert benchmark --- cpp/benchmarks/common/generate_benchmark_input.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cpp/benchmarks/common/generate_benchmark_input.cpp b/cpp/benchmarks/common/generate_benchmark_input.cpp index dcd8e32fc9d..995cea13c27 100644 --- a/cpp/benchmarks/common/generate_benchmark_input.cpp +++ b/cpp/benchmarks/common/generate_benchmark_input.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2022, NVIDIA CORPORATION. + * Copyright (c) 2020-2021, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,7 +31,6 @@ #include #include -#include #include #include #include