mirror of
https://github.com/ml-explore/mlx.git
synced 2025-10-22 02:58:16 +08:00
Fix round to round half-cases to even (#482)
This commit is contained in:

committed by
GitHub

parent
135fd796d2
commit
90c234b7ac
@@ -134,8 +134,8 @@ struct Negative {
|
||||
};
|
||||
|
||||
struct Round {
|
||||
template <typename T> T operator()(T x) { return metal::round(x); };
|
||||
template <> complex64_t operator()(complex64_t x) { return {metal::round(x.real), metal::round(x.imag)}; };
|
||||
template <typename T> T operator()(T x) { return metal::rint(x); };
|
||||
template <> complex64_t operator()(complex64_t x) { return {metal::rint(x.real), metal::rint(x.imag)}; };
|
||||
};
|
||||
|
||||
struct Sigmoid {
|
||||
|
Reference in New Issue
Block a user