mirror of
https://github.com/ml-explore/mlx.git
synced 2025-08-24 06:16:38 +08:00
Using math defines requires switch in MSVC (#1665)
* Using math defines requires switch in MSVC * Fix more math macros * Fix type * Remove _MSC_VER guard for math defines
This commit is contained in:
parent
6f316b8bf5
commit
d0f471cff7
@ -1,4 +1,8 @@
|
|||||||
// Copyright © 2023-2024 Apple Inc.
|
// Copyright © 2023-2024 Apple Inc.
|
||||||
|
|
||||||
|
// Required for using M_PI in MSVC.
|
||||||
|
#define _USE_MATH_DEFINES
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <climits>
|
#include <climits>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
// Copyright © 2023-2024 Apple Inc.
|
// Copyright © 2023-2024 Apple Inc.
|
||||||
|
|
||||||
|
// Required for using M_2_SQRTPI in MSVC.
|
||||||
|
#define _USE_MATH_DEFINES
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
// Copyright © 2023 Apple Inc.
|
// Copyright © 2023 Apple Inc.
|
||||||
|
|
||||||
|
// Required for using M_2_SQRTPI in MSVC.
|
||||||
|
#define _USE_MATH_DEFINES
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <numeric>
|
#include <numeric>
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
// Copyright © 2023-2024 Apple Inc.
|
// Copyright © 2023-2024 Apple Inc.
|
||||||
|
|
||||||
|
// Required for using M_SQRT2 in MSVC.
|
||||||
|
#define _USE_MATH_DEFINES
|
||||||
|
|
||||||
#include "doctest/doctest.h"
|
#include "doctest/doctest.h"
|
||||||
|
|
||||||
#include "mlx/mlx.h"
|
#include "mlx/mlx.h"
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
// Copyright © 2023-2024 Apple Inc.
|
// Copyright © 2023-2024 Apple Inc.
|
||||||
|
|
||||||
|
// Required for using M_PI_2 in MSVC.
|
||||||
|
#define _USE_MATH_DEFINES
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <numeric>
|
#include <numeric>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user