Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update clang-format to 16.0.1. #13133

Merged
merged 5 commits into from
Apr 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ repos:
# Explicitly specify the pyproject.toml at the repo root, not per-project.
args: ["--config=pyproject.toml"]
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v11.1.0
rev: v16.0.1
hooks:
- id: clang-format
types_or: [c, c++, cuda]
Expand Down
5 changes: 2 additions & 3 deletions cpp/benchmarks/ast/transform.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2022, NVIDIA CORPORATION.
* Copyright (c) 2020-2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -35,8 +35,7 @@ enum class TreeType {
};

template <typename key_type, TreeType tree_type, bool reuse_columns, bool Nullable>
class AST : public cudf::benchmark {
};
class AST : public cudf::benchmark {};

template <typename key_type, TreeType tree_type, bool reuse_columns, bool Nullable>
static void BM_ast_transform(benchmark::State& state)
Expand Down
5 changes: 2 additions & 3 deletions cpp/benchmarks/binaryop/binaryop.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2022, NVIDIA CORPORATION.
* Copyright (c) 2020-2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -33,8 +33,7 @@ enum class TreeType {
};

template <typename key_type, TreeType tree_type, bool reuse_columns>
class BINARYOP : public cudf::benchmark {
};
class BINARYOP : public cudf::benchmark {};

template <typename key_type, TreeType tree_type, bool reuse_columns>
static void BM_binaryop_transform(benchmark::State& state)
Expand Down
3 changes: 1 addition & 2 deletions cpp/benchmarks/binaryop/compiled_binaryop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@

#include <cudf/binaryop.hpp>

class COMPILED_BINARYOP : public cudf::benchmark {
};
class COMPILED_BINARYOP : public cudf::benchmark {};

template <typename TypeLhs, typename TypeRhs, typename TypeOut>
void BM_compiled_binaryop(benchmark::State& state, cudf::binary_operator binop)
Expand Down
8 changes: 3 additions & 5 deletions cpp/benchmarks/column/concatenate.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2022, NVIDIA CORPORATION.
* Copyright (c) 2020-2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -31,8 +31,7 @@
#include <algorithm>
#include <vector>

class Concatenate : public cudf::benchmark {
};
class Concatenate : public cudf::benchmark {};

template <typename T, bool Nullable>
static void BM_concatenate(benchmark::State& state)
Expand Down Expand Up @@ -110,8 +109,7 @@ static void BM_concatenate_tables(benchmark::State& state)
CONCAT_TABLES_BENCHMARK_DEFINE(int64_t, false)
CONCAT_TABLES_BENCHMARK_DEFINE(int64_t, true)

class ConcatenateStrings : public cudf::benchmark {
};
class ConcatenateStrings : public cudf::benchmark {};

template <bool Nullable>
static void BM_concatenate_strings(benchmark::State& state)
Expand Down
3 changes: 1 addition & 2 deletions cpp/benchmarks/common/generate_input.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,7 @@ struct distribution_params<T, std::enable_if_t<std::is_same_v<T, cudf::struct_vi

// Present for compilation only. To be implemented once reader/writers support the fixed width type.
template <typename T>
struct distribution_params<T, std::enable_if_t<cudf::is_fixed_point<T>()>> {
};
struct distribution_params<T, std::enable_if_t<cudf::is_fixed_point<T>()>> {};

/**
* @brief Returns a vector of types, corresponding to the input type or a type group.
Expand Down
11 changes: 5 additions & 6 deletions cpp/benchmarks/copying/contiguous_split.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2022, NVIDIA CORPORATION.
* Copyright (c) 2019-2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -50,7 +50,8 @@ void BM_contiguous_split_common(benchmark::State& state,
for (auto const& col : src_cols)
// computing the null count is not a part of the benchmark's target code path, and we want the
// property to be pre-computed so that we measure the performance of only the intended code path
[[maybe_unused]] auto const nulls = col->null_count();
[[maybe_unused]]
auto const nulls = col->null_count();

auto const src_table = cudf::table(std::move(src_cols));

Expand All @@ -63,8 +64,7 @@ void BM_contiguous_split_common(benchmark::State& state,
state.SetBytesProcessed(static_cast<int64_t>(state.iterations()) * bytes_total * 2);
}

class ContiguousSplit : public cudf::benchmark {
};
class ContiguousSplit : public cudf::benchmark {};

void BM_contiguous_split(benchmark::State& state)
{
Expand Down Expand Up @@ -94,8 +94,7 @@ void BM_contiguous_split(benchmark::State& state)
BM_contiguous_split_common(state, src_cols, num_rows, num_splits, total_bytes);
}

class ContiguousSplitStrings : public cudf::benchmark {
};
class ContiguousSplitStrings : public cudf::benchmark {};

void BM_contiguous_split_strings(benchmark::State& state)
{
Expand Down
5 changes: 2 additions & 3 deletions cpp/benchmarks/copying/copy_if_else.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2022, NVIDIA CORPORATION.
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -23,8 +23,7 @@

#include <rmm/device_buffer.hpp>

class CopyIfElse : public cudf::benchmark {
};
class CopyIfElse : public cudf::benchmark {};

template <class TypeParam>
static void BM_copy_if_else(benchmark::State& state, bool nulls)
Expand Down
5 changes: 2 additions & 3 deletions cpp/benchmarks/copying/gather.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2022, NVIDIA CORPORATION.
* Copyright (c) 2019-2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -26,8 +26,7 @@
#include <thrust/reverse.h>
#include <thrust/shuffle.h>

class Gather : public cudf::benchmark {
};
class Gather : public cudf::benchmark {};

template <class TypeParam, bool coalesce>
void BM_gather(benchmark::State& state)
Expand Down
5 changes: 2 additions & 3 deletions cpp/benchmarks/copying/scatter.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2022, NVIDIA CORPORATION.
* Copyright (c) 2019-2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -26,8 +26,7 @@
#include <thrust/reverse.h>
#include <thrust/shuffle.h>

class Scatter : public cudf::benchmark {
};
class Scatter : public cudf::benchmark {};

template <class TypeParam, bool coalesce>
void BM_scatter(benchmark::State& state)
Expand Down
5 changes: 2 additions & 3 deletions cpp/benchmarks/copying/shift.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2022, NVIDIA CORPORATION.
* Copyright (c) 2020-2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -70,8 +70,7 @@ static void BM_shift(benchmark::State& state)
}
}

class Shift : public cudf::benchmark {
};
class Shift : public cudf::benchmark {};

#define SHIFT_BM_BENCHMARK_DEFINE(name, use_validity, shift_factor) \
BENCHMARK_DEFINE_F(Shift, name)(::benchmark::State & state) \
Expand Down
5 changes: 2 additions & 3 deletions cpp/benchmarks/filling/repeat.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2022, NVIDIA CORPORATION.
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -20,8 +20,7 @@

#include <cudf/filling.hpp>

class Repeat : public cudf::benchmark {
};
class Repeat : public cudf::benchmark {};

template <class TypeParam, bool nulls>
void BM_repeat(benchmark::State& state)
Expand Down
5 changes: 2 additions & 3 deletions cpp/benchmarks/groupby/group_no_requests.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2022, NVIDIA CORPORATION.
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -24,8 +24,7 @@
#include <cudf/groupby.hpp>
#include <cudf/sorting.hpp>

class Groupby : public cudf::benchmark {
};
class Groupby : public cudf::benchmark {};

void BM_basic_no_requests(benchmark::State& state)
{
Expand Down
5 changes: 2 additions & 3 deletions cpp/benchmarks/groupby/group_nth.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2022, NVIDIA CORPORATION.
* Copyright (c) 2020-2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -24,8 +24,7 @@
#include <cudf/groupby.hpp>
#include <cudf/sorting.hpp>

class Groupby : public cudf::benchmark {
};
class Groupby : public cudf::benchmark {};

void BM_pre_sorted_nth(benchmark::State& state)
{
Expand Down
5 changes: 2 additions & 3 deletions cpp/benchmarks/groupby/group_scan.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, NVIDIA CORPORATION.
* Copyright (c) 2022-2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -25,8 +25,7 @@
#include <cudf/sorting.hpp>
#include <cudf/table/table.hpp>

class Groupby : public cudf::benchmark {
};
class Groupby : public cudf::benchmark {};

void BM_basic_sum_scan(benchmark::State& state)
{
Expand Down
5 changes: 2 additions & 3 deletions cpp/benchmarks/groupby/group_shift.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2022, NVIDIA CORPORATION.
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -24,8 +24,7 @@
#include <cudf/table/table_view.hpp>
#include <cudf/types.hpp>

class Groupby : public cudf::benchmark {
};
class Groupby : public cudf::benchmark {};

void BM_group_shift(benchmark::State& state)
{
Expand Down
5 changes: 2 additions & 3 deletions cpp/benchmarks/groupby/group_struct_values.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2022, NVIDIA CORPORATION.
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -74,8 +74,7 @@ void BM_groupby_min_struct(benchmark::State& state)
}
}

class Groupby : public cudf::benchmark {
};
class Groupby : public cudf::benchmark {};

#define MIN_RANGE 10'000
#define MAX_RANGE 10'000'000
Expand Down
5 changes: 2 additions & 3 deletions cpp/benchmarks/groupby/group_sum.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2022, NVIDIA CORPORATION.
* Copyright (c) 2019-2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -24,8 +24,7 @@
#include <cudf/groupby.hpp>
#include <cudf/sorting.hpp>

class Groupby : public cudf::benchmark {
};
class Groupby : public cudf::benchmark {};

void BM_basic_sum(benchmark::State& state)
{
Expand Down
5 changes: 2 additions & 3 deletions cpp/benchmarks/hashing/hash.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2022, NVIDIA CORPORATION.
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -22,8 +22,7 @@
#include <cudf/table/table.hpp>
#include <cudf/utilities/default_stream.hpp>

class HashBenchmark : public cudf::benchmark {
};
class HashBenchmark : public cudf::benchmark {};

enum contains_nulls { no_nulls, nulls };

Expand Down
5 changes: 2 additions & 3 deletions cpp/benchmarks/hashing/partition.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2022, NVIDIA CORPORATION.
* Copyright (c) 2019-2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -22,8 +22,7 @@

#include <algorithm>

class Hashing : public cudf::benchmark {
};
class Hashing : public cudf::benchmark {};

template <class T>
void BM_hash_partition(benchmark::State& state)
Expand Down
10 changes: 5 additions & 5 deletions cpp/benchmarks/io/csv/csv_reader_input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ template <cudf::io::io_type IOType>
void BM_csv_read_io(nvbench::state& state, nvbench::type_list<nvbench::enum_type<IOType>>)
{
auto const d_type = get_type_or_group({static_cast<int32_t>(data_type::INTEGRAL),
static_cast<int32_t>(data_type::FLOAT),
static_cast<int32_t>(data_type::DECIMAL),
static_cast<int32_t>(data_type::TIMESTAMP),
static_cast<int32_t>(data_type::DURATION),
static_cast<int32_t>(data_type::STRING)});
static_cast<int32_t>(data_type::FLOAT),
static_cast<int32_t>(data_type::DECIMAL),
static_cast<int32_t>(data_type::TIMESTAMP),
static_cast<int32_t>(data_type::DURATION),
static_cast<int32_t>(data_type::STRING)});
auto const source_type = IOType;

csv_read_common(d_type, source_type, state);
Expand Down
5 changes: 2 additions & 3 deletions cpp/benchmarks/iterator/iterator.cu
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@ void iterator_bench_thrust(cudf::column_view& col, rmm::device_uvector<T>& resul
}

// -----------------------------------------------------------------------------
class Iterator : public cudf::benchmark {
};
class Iterator : public cudf::benchmark {};

template <class TypeParam, bool cub_or_thrust, bool raw_or_iterator>
void BM_iterator(benchmark::State& state)
Expand All @@ -146,7 +145,7 @@ void BM_iterator(benchmark::State& state)
cuda_event_timer raii(state, true); // flush_l2_cache = true, stream = 0
if (cub_or_thrust) {
if (raw_or_iterator) {
raw_stream_bench_cub<T>(hasnull_F, dev_result); // driven by raw pointer
raw_stream_bench_cub<T>(hasnull_F, dev_result); // driven by raw pointer
} else {
iterator_bench_cub<T, false>(hasnull_F, dev_result); // driven by riterator without nulls
}
Expand Down
3 changes: 1 addition & 2 deletions cpp/benchmarks/join/conditional_join.cu
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
#include <benchmarks/join/join_common.hpp>

template <typename key_type, typename payload_type>
class ConditionalJoin : public cudf::benchmark {
};
class ConditionalJoin : public cudf::benchmark {};

// For compatibility with the shared logic for equality (hash) joins, all of
// the join lambdas defined by these macros accept a null_equality parameter
Expand Down
Loading