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

chore: use clang-format 19 #1085

Merged
merged 1 commit into from
Mar 24, 2025
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/libspu/core/half.h
Original file line number Diff line number Diff line change
Expand Up @@ -1196,8 +1196,8 @@ unsigned int float2half_impl(T value, ...) {
template <std::float_round_style R, typename T>
unsigned int float2half(T value) {
return float2half_impl<R>(
value, bool_type < std::numeric_limits<T>::is_iec559 &&
sizeof(typename bits<T>::type) == sizeof(T) > ());
value, bool_type<std::numeric_limits<T>::is_iec559 &&
sizeof(typename bits<T>::type) == sizeof(T)>());
}

/// Convert integer to half-precision floating-point.
Expand Down Expand Up @@ -1664,9 +1664,10 @@ T half2float_impl(unsigned int value, T, ...) {
/// \return floating-point value
template <typename T>
T half2float(unsigned int value) {
return half2float_impl(value, T(),
bool_type < std::numeric_limits<T>::is_iec559 &&
sizeof(typename bits<T>::type) == sizeof(T) > ());
return half2float_impl(
value, T(),
bool_type<std::numeric_limits<T>::is_iec559 &&
sizeof(typename bits<T>::type) == sizeof(T)>());
}

/// Convert half-precision floating-point to integer.
Expand Down
5 changes: 2 additions & 3 deletions src/libspu/core/parallel_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ namespace spu {
constexpr int64_t kMinTaskSize = 50000;

template <class F>
inline auto pforeach(int64_t begin, int64_t end, F&& f)
-> std::enable_if_t<
std::is_same_v<decltype(f(int64_t(), int64_t())), void>> {
inline auto pforeach(int64_t begin, int64_t end, F&& f) -> std::enable_if_t<
std::is_same_v<decltype(f(int64_t(), int64_t())), void>> {
return yacl::parallel_for(begin, end, kMinTaskSize, f);
}

Expand Down
2 changes: 1 addition & 1 deletion src/libspu/mpc/api_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ TEST_BINARY_OP(xor)
TEST_UNARY_OP_P(OP)

TEST_UNARY_OP(negate)
TEST_UNARY_OP(not )
TEST_UNARY_OP(not)
TEST_UNARY_OP_V(msb)
TEST_UNARY_OP_P(msb)

Expand Down
2 changes: 1 addition & 1 deletion src/libspu/spu.h
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ struct RuntimeConfig {
int64_t fxp_fraction_bits = 0)
: protocol(protocol),
field(field),
fxp_fraction_bits(fxp_fraction_bits){};
fxp_fraction_bits(fxp_fraction_bits) {};
RuntimeConfig(const RuntimeConfig& other) = default;
explicit RuntimeConfig(const pb::RuntimeConfig& pb_conf);

Expand Down
Loading