Fix MSVC build due to use of M_LN2 (#2058)

This commit is contained in:
Cheng 2025-04-10 23:41:41 +09:00 committed by GitHub
parent 515f104926
commit dfae2c6989
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,5 +1,8 @@
// Copyright © 2024 Apple Inc. // Copyright © 2024 Apple Inc.
// Required for using M_LN2 in MSVC.
#define _USE_MATH_DEFINES
#include <cassert> #include <cassert>
#include "mlx/backend/cpu/unary.h" #include "mlx/backend/cpu/unary.h"