mirror of
https://github.com/ml-explore/mlx.git
synced 2025-12-16 01:49:05 +08:00
Refactor CPU compile preamble (#708)
* refactor cpu preamble * fix include order * fix some issues' * fixes for linux * try to fix includes * add back warning suppression * more linux fixes
This commit is contained in:
@@ -38,9 +38,9 @@ inline bool operator>(const complex64_t& a, const complex64_t& b) {
|
||||
inline complex64_t operator%(complex64_t a, complex64_t b) {
|
||||
auto real = a.real() - (b.real() * static_cast<int64_t>(a.real() / b.real()));
|
||||
auto imag = a.imag() - (b.imag() * static_cast<int64_t>(a.imag() / b.imag()));
|
||||
if (real != 0 && (real < 0 != b.real() < 0))
|
||||
if (real != 0 && ((real < 0) != (b.real() < 0)))
|
||||
real += b.real();
|
||||
if (imag != 0 && (imag < 0 != b.imag() < 0))
|
||||
if (imag != 0 && ((imag < 0) != (b.imag() < 0)))
|
||||
imag += b.imag();
|
||||
return {real, imag};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user