MLX
Loading...
Searching...
No Matches
lapack.h
Go to the documentation of this file.
1// Copyright © 2023-2024 Apple Inc.
2
3#pragma once
4
5#ifdef ACCELERATE_NEW_LAPACK
6#include <Accelerate/Accelerate.h>
7#else
8#include <cblas.h>
9#include <lapack.h>
10#endif
11
12#if defined(LAPACK_GLOBAL) || defined(LAPACK_NAME)
13
14// This is to work around a change in the function signatures of lapack >= 3.9.1
15// where functions taking char* also include a strlen argument, see a similar
16// change in OpenCV:
17// https://github.com/opencv/opencv/blob/1eb061f89de0fb85c4c75a2deeb0f61a961a63ad/cmake/OpenCVFindLAPACK.cmake#L57
18#define MLX_LAPACK_FUNC(f) LAPACK_##f
19
20#else
21
22#define MLX_LAPACK_FUNC(f) f##_
23
24#endif