From 16549d47e8484c1b8ac21f5175d74062546e7348 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sat, 7 Dec 2024 10:35:48 +0000 Subject: [PATCH] Use correct complex type for MSVC --- mlx/backend/common/lapack.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mlx/backend/common/lapack.h b/mlx/backend/common/lapack.h index b3bb7ebf0..42d937785 100644 --- a/mlx/backend/common/lapack.h +++ b/mlx/backend/common/lapack.h @@ -2,6 +2,15 @@ #pragma once +// Required for Visual Studio. +// https://github.com/OpenMathLib/OpenBLAS/blob/develop/docs/install.md +#ifdef _MSC_VER +#include +#define LAPACK_COMPLEX_CUSTOM +#define lapack_complex_float std::complex +#define lapack_complex_double std::complex +#endif + #ifdef ACCELERATE_NEW_LAPACK #include #else