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