Update clang-tidy. (#10730)
- Install cmake using pip. - Fix compile command generation. - Clean up the tidy script and remove the need to load the yaml file. - Fix modernized type traits. - Fix span class. Polymorphism support is dropped
This commit is contained in:
@@ -82,7 +82,7 @@ class AllreduceFunctor {
|
||||
}
|
||||
|
||||
private:
|
||||
template <class T, std::enable_if_t<std::is_integral<T>::value>* = nullptr>
|
||||
template <class T, std::enable_if_t<std::is_integral_v<T>>* = nullptr>
|
||||
void AccumulateBitwise(T* buffer, T const* input, std::size_t size, Op reduce_operation) const {
|
||||
switch (reduce_operation) {
|
||||
case Op::kBitwiseAND:
|
||||
@@ -99,7 +99,7 @@ class AllreduceFunctor {
|
||||
}
|
||||
}
|
||||
|
||||
template <class T, std::enable_if_t<std::is_floating_point<T>::value>* = nullptr>
|
||||
template <class T, std::enable_if_t<std::is_floating_point_v<T>>* = nullptr>
|
||||
void AccumulateBitwise(T*, T const*, std::size_t, Op) const {
|
||||
LOG(FATAL) << "Floating point types do not support bitwise operations.";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user