Restore clang tidy test. (#8861)

This commit is contained in:
Jiaming Yuan
2023-03-04 05:47:04 +08:00
committed by GitHub
parent 2dc22e7aad
commit 4d665b3fb0
55 changed files with 216 additions and 205 deletions

View File

@@ -1,5 +1,5 @@
/*!
* Copyright 2022 XGBoost contributors
/**
* Copyright 2022-2023 by XGBoost contributors
*/
#pragma once
#include <string>
@@ -9,7 +9,7 @@
namespace xgboost {
namespace collective {
/*!
/**
* \brief Initialize the collective communicator.
*
* Currently the communicator API is experimental, function signatures may change in the future
@@ -210,7 +210,7 @@ inline void Allreduce(uint64_t *send_receive_buffer, size_t count) {
template <Operation op, typename T,
typename = std::enable_if_t<std::is_same<size_t, T>{} && !std::is_same<uint64_t, T>{}> >
inline void Allreduce(T *send_receive_buffer, size_t count) {
static_assert(sizeof(T) == sizeof(uint64_t), "");
static_assert(sizeof(T) == sizeof(uint64_t));
Communicator::Get()->AllReduce(send_receive_buffer, count, DataType::kUInt64, op);
}