Skip to content

Commit

Permalink
Update to clang 16.0.6. (#14120)
Browse files Browse the repository at this point in the history
This PR updates cudf to use clang 16.0.6. The previous version 16.0.1 has some minor formatting issues affecting several RAPIDS repos.

Authors:
  - Bradley Dice (https://github.com/bdice)

Approvers:
  - Mark Harris (https://github.com/harrism)
  - David Wendt (https://github.com/davidwendt)

URL: #14120
  • Loading branch information
bdice authored Sep 19, 2023
1 parent bdc1f3a commit c016b58
Show file tree
Hide file tree
Showing 78 changed files with 276 additions and 276 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,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: v16.0.1
rev: v16.0.6
hooks:
- id: clang-format
types_or: [c, c++, cuda]
Expand Down
2 changes: 1 addition & 1 deletion cpp/benchmarks/iterator/iterator.cu
Original file line number Diff line number Diff line change
Expand Up @@ -145,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
4 changes: 2 additions & 2 deletions cpp/benchmarks/stream_compaction/apply_boolean_mask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ void calculate_bandwidth(benchmark::State& state, cudf::size_type num_columns)
int64_t const column_bytes_in = column_bytes_out; // we only read unmasked inputs

int64_t const bytes_read =
(column_bytes_in + validity_bytes_in) * num_columns + // reading columns
mask_size; // reading boolean mask
(column_bytes_in + validity_bytes_in) * num_columns + // reading columns
mask_size; // reading boolean mask
int64_t const bytes_written =
(column_bytes_out + validity_bytes_out) * num_columns; // writing columns

Expand Down
2 changes: 1 addition & 1 deletion cpp/benchmarks/string/char_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static void bench_char_types(nvbench::state& state)
state.set_cuda_stream(nvbench::make_cuda_stream_view(cudf::get_default_stream().value()));
// gather some throughput statistics as well
auto chars_size = input.chars_size();
state.add_global_memory_reads<nvbench::int8_t>(chars_size); // all bytes are read;
state.add_global_memory_reads<nvbench::int8_t>(chars_size); // all bytes are read;
if (api_type == "all") {
state.add_global_memory_writes<nvbench::int8_t>(num_rows); // output is a bool8 per row
} else {
Expand Down
2 changes: 1 addition & 1 deletion cpp/benchmarks/string/extract.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static void bench_extract(nvbench::state& state)
std::uniform_int_distribution<int> words_dist(0, 999);
std::vector<std::string> samples(100); // 100 unique rows of data to reuse
std::generate(samples.begin(), samples.end(), [&]() {
std::string row; // build a row of random tokens
std::string row; // build a row of random tokens
while (static_cast<cudf::size_type>(row.size()) < row_width) {
row += std::to_string(words_dist(generator)) + " ";
}
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/cudf/column/column_device_view.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -1393,7 +1393,7 @@ struct pair_accessor {
*/
template <typename T, bool has_nulls = false>
struct pair_rep_accessor {
column_device_view const col; ///< column view of column in device
column_device_view const col; ///< column view of column in device

using rep_type = device_storage_type_t<T>; ///< representation type

Expand Down
2 changes: 1 addition & 1 deletion cpp/include/cudf/detail/copy_if.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ __launch_bounds__(block_size) __global__
if (has_validity) {
temp_valids[threadIdx.x] = false; // init shared memory
if (threadIdx.x < cudf::detail::warp_size) temp_valids[block_size + threadIdx.x] = false;
__syncthreads(); // wait for init
__syncthreads(); // wait for init
}

if (mask_true) {
Expand Down
4 changes: 2 additions & 2 deletions cpp/include/cudf/detail/indexalator.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ struct input_indexalator : base_indexalator<input_indexalator> {
friend struct indexalator_factory;
friend struct base_indexalator<input_indexalator>; // for CRTP

using reference = size_type const; // this keeps STL and thrust happy
using reference = size_type const; // this keeps STL and thrust happy

input_indexalator() = default;
input_indexalator(input_indexalator const&) = default;
Expand Down Expand Up @@ -332,7 +332,7 @@ struct output_indexalator : base_indexalator<output_indexalator> {
friend struct indexalator_factory;
friend struct base_indexalator<output_indexalator>; // for CRTP

using reference = output_indexalator const&; // required for output iterators
using reference = output_indexalator const&; // required for output iterators

output_indexalator() = default;
output_indexalator(output_indexalator const&) = default;
Expand Down
4 changes: 2 additions & 2 deletions cpp/include/cudf/detail/join.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ struct hash_join {
cudf::null_equality const _nulls_equal; ///< whether to consider nulls as equal
cudf::table_view _build; ///< input table to build the hash map
std::shared_ptr<cudf::experimental::row::equality::preprocessed_table>
_preprocessed_build; ///< input table preprocssed for row operators
map_type _hash_table; ///< hash table built on `_build`
_preprocessed_build; ///< input table preprocssed for row operators
map_type _hash_table; ///< hash table built on `_build`

public:
/**
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/cudf/fixed_point/fixed_point.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -829,5 +829,5 @@ using decimal32 = fixed_point<int32_t, Radix::BASE_10>; ///< 32-bit decima
using decimal64 = fixed_point<int64_t, Radix::BASE_10>; ///< 64-bit decimal fixed point
using decimal128 = fixed_point<__int128_t, Radix::BASE_10>; ///< 128-bit decimal fixed point

/** @} */ // end of group
/** @} */ // end of group
} // namespace numeric
4 changes: 2 additions & 2 deletions cpp/include/cudf/groupby.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,8 @@ class groupby {
///< indicates null order
///< of each column
std::unique_ptr<detail::sort::sort_groupby_helper>
_helper; ///< Helper object
///< used by sort based implementation
_helper; ///< Helper object
///< used by sort based implementation

/**
* @brief Get the sort helper object
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/cudf/io/csv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ class csv_reader_options {

auto const max_row_bytes = 16 * 1024; // 16KB
auto const column_bytes = 64;
auto const base_padding = 1024; // 1KB
auto const base_padding = 1024; // 1KB

if (num_columns == 0) {
// Use flat size if the number of columns is not known
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/cudf/io/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ class json_reader_options {

auto const max_row_bytes = 16 * 1024; // 16KB
auto const column_bytes = 64;
auto const base_padding = 1024; // 1KB
auto const base_padding = 1024; // 1KB

if (num_columns == 0) {
// Use flat size if the number of columns is not known
Expand Down
36 changes: 18 additions & 18 deletions cpp/include/cudf/strings/detail/utf8.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,18 +155,18 @@ constexpr inline size_type from_char_utf8(char_utf8 character, char* str)
constexpr uint32_t utf8_to_codepoint(cudf::char_utf8 utf8_char)
{
uint32_t unchr = 0;
if (utf8_char < 0x0000'0080) // single-byte pass thru
if (utf8_char < 0x0000'0080) // single-byte pass thru
unchr = utf8_char;
else if (utf8_char < 0x0000'E000) // two bytes
else if (utf8_char < 0x0000'E000) // two bytes
{
unchr = (utf8_char & 0x1F00) >> 2; // shift and
unchr |= (utf8_char & 0x003F); // unmask
} else if (utf8_char < 0x00F0'0000) // three bytes
unchr = (utf8_char & 0x1F00) >> 2; // shift and
unchr |= (utf8_char & 0x003F); // unmask
} else if (utf8_char < 0x00F0'0000) // three bytes
{
unchr = (utf8_char & 0x0F'0000) >> 4; // get upper 4 bits
unchr |= (utf8_char & 0x00'3F00) >> 2; // shift and
unchr |= (utf8_char & 0x00'003F); // unmask
} else if (utf8_char <= 0xF800'0000u) // four bytes
unchr = (utf8_char & 0x0F'0000) >> 4; // get upper 4 bits
unchr |= (utf8_char & 0x00'3F00) >> 2; // shift and
unchr |= (utf8_char & 0x00'003F); // unmask
} else if (utf8_char <= 0xF800'0000u) // four bytes
{
unchr = (utf8_char & 0x0300'0000) >> 6; // upper 3 bits
unchr |= (utf8_char & 0x003F'0000) >> 4; // next 6 bits
Expand All @@ -185,20 +185,20 @@ constexpr uint32_t utf8_to_codepoint(cudf::char_utf8 utf8_char)
constexpr cudf::char_utf8 codepoint_to_utf8(uint32_t unchr)
{
cudf::char_utf8 utf8 = 0;
if (unchr < 0x0000'0080) // single byte utf8
if (unchr < 0x0000'0080) // single byte utf8
utf8 = unchr;
else if (unchr < 0x0000'0800) // double byte utf8
else if (unchr < 0x0000'0800) // double byte utf8
{
utf8 = (unchr << 2) & 0x1F00; // shift bits for
utf8 |= (unchr & 0x3F); // utf8 encoding
utf8 = (unchr << 2) & 0x1F00; // shift bits for
utf8 |= (unchr & 0x3F); // utf8 encoding
utf8 |= 0x0000'C080;
} else if (unchr < 0x0001'0000) // triple byte utf8
} else if (unchr < 0x0001'0000) // triple byte utf8
{
utf8 = (unchr << 4) & 0x0F'0000; // upper 4 bits
utf8 |= (unchr << 2) & 0x00'3F00; // next 6 bits
utf8 |= (unchr & 0x3F); // last 6 bits
utf8 = (unchr << 4) & 0x0F'0000; // upper 4 bits
utf8 |= (unchr << 2) & 0x00'3F00; // next 6 bits
utf8 |= (unchr & 0x3F); // last 6 bits
utf8 |= 0x00E0'8080;
} else if (unchr < 0x0011'0000) // quadruple byte utf8
} else if (unchr < 0x0011'0000) // quadruple byte utf8
{
utf8 = (unchr << 6) & 0x0700'0000; // upper 3 bits
utf8 |= (unchr << 4) & 0x003F'0000; // next 6 bits
Expand Down
4 changes: 2 additions & 2 deletions cpp/include/cudf/table/row_operators.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ inline __device__ auto null_compare(bool lhs_is_null, bool rhs_is_null, null_ord
{
if (lhs_is_null and rhs_is_null) { // null <? null
return weak_ordering::EQUIVALENT;
} else if (lhs_is_null) { // null <? x
} else if (lhs_is_null) { // null <? x
return (null_precedence == null_order::BEFORE) ? weak_ordering::LESS : weak_ordering::GREATER;
} else if (rhs_is_null) { // x <? null
} else if (rhs_is_null) { // x <? null
return (null_precedence == null_order::AFTER) ? weak_ordering::LESS : weak_ordering::GREATER;
}
return weak_ordering::EQUIVALENT;
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/cudf/table/table_view.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class table_view_base {

table_view_base(table_view_base const&) = default; ///< Copy constructor

table_view_base(table_view_base&&) = default; ///< Move constructor
table_view_base(table_view_base&&) = default; ///< Move constructor
/**
* @brief Copy assignment operator
*
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/cudf/wrappers/dictionary.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,5 +215,5 @@ CUDF_HOST_DEVICE inline bool operator>(dictionary_wrapper<Integer> const& lhs,

using dictionary32 = dictionary_wrapper<int32_t>; ///< 32-bit integer indexed dictionary wrapper

/** @} */ // end of group
/** @} */ // end of group
} // namespace cudf
4 changes: 2 additions & 2 deletions cpp/include/cudf_test/base_fixture.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,9 +331,9 @@ inline auto parse_cudf_test_opts(int argc, char** argv)
cxxopts::Options options(argv[0], " - cuDF tests command line options");
char const* env_rmm_mode = std::getenv("GTEST_CUDF_RMM_MODE"); // Overridden by CLI options
char const* env_stream_mode =
std::getenv("GTEST_CUDF_STREAM_MODE"); // Overridden by CLI options
std::getenv("GTEST_CUDF_STREAM_MODE"); // Overridden by CLI options
char const* env_stream_error_mode =
std::getenv("GTEST_CUDF_STREAM_ERROR_MODE"); // Overridden by CLI options
std::getenv("GTEST_CUDF_STREAM_ERROR_MODE"); // Overridden by CLI options
auto default_rmm_mode = env_rmm_mode ? env_rmm_mode : "pool";
auto default_stream_mode = env_stream_mode ? env_stream_mode : "default";
auto default_stream_error_mode = env_stream_error_mode ? env_stream_error_mode : "error";
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/nvtext/subword_tokenize.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ struct hashed_vocabulary {
std::unique_ptr<cudf::column> bin_offsets; ///< uint16 column, containing the start index of each
///< bin in the flattened hash table
std::unique_ptr<cudf::column>
cp_metadata; ///< uint32 column, The code point metadata table to use for normalization
cp_metadata; ///< uint32 column, The code point metadata table to use for normalization
std::unique_ptr<cudf::column>
aux_cp_table; ///< uint64 column, The auxiliary code point table to use for normalization
};
Expand Down
2 changes: 1 addition & 1 deletion cpp/scripts/run-clang-tidy.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import shutil


EXPECTED_VERSION = "16.0.1"
EXPECTED_VERSION = "16.0.6"
VERSION_REGEX = re.compile(r" LLVM version ([0-9.]+)")
GPU_ARCH_REGEX = re.compile(r"sm_(\d+)")
SPACES = re.compile(r"\s+")
Expand Down
8 changes: 4 additions & 4 deletions cpp/src/copying/contiguous_split.cu
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ struct dst_buf_info {
int bit_shift; // # of bits to shift right by (for validity buffers)
size_type valid_count; // validity count for this block of work

int src_buf_index; // source buffer index
int dst_buf_index; // destination buffer index
int src_buf_index; // source buffer index
int dst_buf_index; // destination buffer index
};

/**
Expand Down Expand Up @@ -1384,7 +1384,7 @@ struct chunk_iteration_state {
std::size_t starting_batch; ///< Starting batch index for the current iteration
std::vector<std::size_t> const h_num_buffs_per_iteration; ///< The count of batches per iteration
std::vector<std::size_t> const
h_size_of_buffs_per_iteration; ///< The size in bytes per iteration
h_size_of_buffs_per_iteration; ///< The size in bytes per iteration
};

std::unique_ptr<chunk_iteration_state> chunk_iteration_state::create(
Expand Down Expand Up @@ -1989,7 +1989,7 @@ struct contiguous_split_state {
// This can be 1 if `contiguous_split` is just packing and not splitting
std::size_t const num_partitions; ///< The number of partitions to produce

size_type const num_src_bufs; ///< Number of source buffers including children
size_type const num_src_bufs; ///< Number of source buffers including children

std::size_t const num_bufs; ///< Number of source buffers including children * number of splits

Expand Down
10 changes: 5 additions & 5 deletions cpp/src/groupby/sort/functors.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ struct store_result_functor {
};

protected:
sort::sort_groupby_helper& helper; ///< Sort helper
cudf::detail::result_cache& cache; ///< cache of results to store into
column_view const& values; ///< Column of values to group and aggregate
sort::sort_groupby_helper& helper; ///< Sort helper
cudf::detail::result_cache& cache; ///< cache of results to store into
column_view const& values; ///< Column of values to group and aggregate

rmm::cuda_stream_view stream; ///< CUDA stream on which to execute kernels
rmm::mr::device_memory_resource* mr; ///< Memory resource to allocate space for results
rmm::cuda_stream_view stream; ///< CUDA stream on which to execute kernels
rmm::mr::device_memory_resource* mr; ///< Memory resource to allocate space for results

sorted keys_are_sorted; ///< Whether the keys are sorted
std::unique_ptr<column> sorted_values; ///< Memoised grouped and sorted values
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/io/avro/avro_gpu.cu
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ avro_decode_row(schemadesc_s const* schema,
// If within an array, check if we reached the last item
if (array_repeat_count != 0 && array_children <= 0 && cur < end) {
if (!--array_repeat_count) {
i = array_start; // Restart at the array parent
i = array_start; // Restart at the array parent
} else {
i = array_start + 1; // Restart after the array parent
array_children = schema[array_start].count;
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/io/comp/cpu_unbz2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ int32_t bz2_decompress_block(unbz_state_s* s)

s->currBlockNo++;

skipbits(s, 32); // block CRC
skipbits(s, 32); // block CRC

if (getbits(s, 1)) return BZ_DATA_ERROR; // blockRandomized not supported (old bzip versions)

Expand Down
4 changes: 2 additions & 2 deletions cpp/src/io/comp/debrotli.cu
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ __inline__ __device__ int brotli_context(int p1, int p2, int lut)
struct huff_scratch_s {
uint16_t code_length_histo[16];
uint8_t code_length_code_lengths[brotli_code_length_codes];
int8_t offset[6]; // offsets in sorted table for each length
int8_t offset[6]; // offsets in sorted table for each length
uint16_t lenvlctab[32];
uint16_t sorted[brotli_code_length_codes]; // symbols sorted by code length
int16_t next_symbol[32];
Expand Down Expand Up @@ -1298,7 +1298,7 @@ static __device__ void InverseMoveToFrontTransform(debrotli_state_s* s, uint8_t*
// Reinitialize elements that could have been changed.
uint32_t i = 1;
uint32_t upper_bound = s->mtf_upper_bound;
uint32_t* mtf = &s->mtf[1]; // Make mtf[-1] addressable.
uint32_t* mtf = &s->mtf[1]; // Make mtf[-1] addressable.
auto* mtf_u8 = reinterpret_cast<uint8_t*>(mtf);
uint32_t pattern = 0x0302'0100; // Little-endian

Expand Down
18 changes: 9 additions & 9 deletions cpp/src/io/comp/gpuinflate.cu
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ struct inflate_state_s {
uint8_t* outbase; ///< start of output buffer
uint8_t* outend; ///< end of output buffer
// Input state
uint8_t const* cur; ///< input buffer
uint8_t const* end; ///< end of input buffer
uint8_t const* cur; ///< input buffer
uint8_t const* end; ///< end of input buffer

uint2 bitbuf; ///< bit buffer (64-bit)
uint32_t bitpos; ///< position in bit buffer
uint2 bitbuf; ///< bit buffer (64-bit)
uint32_t bitpos; ///< position in bit buffer

int32_t err; ///< Error status
int btype; ///< current block type
Expand Down Expand Up @@ -295,7 +295,7 @@ __device__ int construct(
return 0; // complete, but decode() will fail

// check for an over-subscribed or incomplete set of lengths
left = 1; // one possible code of zero length
left = 1; // one possible code of zero length
for (len = 1; len <= max_bits; len++) {
left <<= 1; // one more bit, double codes left
left -= counts[len]; // deduct count from possible codes
Expand Down Expand Up @@ -349,18 +349,18 @@ __device__ int init_dynamic(inflate_state_s* s)
index = 0;
while (index < nlen + ndist) {
int symbol = decode(s, s->lencnt, s->lensym);
if (symbol < 0) return symbol; // invalid symbol
if (symbol < 16) // length in 0..15
if (symbol < 0) return symbol; // invalid symbol
if (symbol < 16) // length in 0..15
lengths[index++] = symbol;
else { // repeat instruction
int len = 0; // last length to repeat, assume repeating zeros
if (symbol == 16) { // repeat last length 3..6 times
if (index == 0) return -5; // no last length!
len = lengths[index - 1]; // last length
symbol = 3 + getbits(s, 2);
} else if (symbol == 17) // repeat zero 3..10 times
} else if (symbol == 17) // repeat zero 3..10 times
symbol = 3 + getbits(s, 3);
else // == 18, repeat zero 11..138 times
else // == 18, repeat zero 11..138 times
symbol = 11 + getbits(s, 7);
if (index + symbol > nlen + ndist) return -6; // too many lengths!
while (symbol--) // repeat last or zero symbol times
Expand Down
Loading

0 comments on commit c016b58

Please sign in to comment.