Skip to content

allow the use of LAPACK_COMPLEX_CPP when using MSVC compiler #5244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 10, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions lapack-netlib/LAPACKE/include/lapacke_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,16 @@ extern "C" {

#ifndef LAPACK_COMPLEX_CUSTOM
#if defined(_MSC_VER) && !defined(__INTEL_CLANG_COMPILER)
#if defined(LAPACK_COMPLEX_CPP)
#include <complex>
#define lapack_complex_float std::complex<float>
#define lapack_complex_double std::complex<double>
#define lapack_complex_float_real(z) ((z).real())
#define lapack_complex_float_imag(z) ((z).imag())
#define lapack_complex_double_real(z) ((z).real())
#define lapack_complex_double_imag(z) ((z).imag())
#define _CRT_USE_C_COMPLEX_H
#else
#include <complex.h>
#define LAPACK_COMPLEX_CUSTOM
#define lapack_complex_float _Fcomplex
Expand All @@ -84,6 +93,7 @@ extern "C" {
#define lapack_complex_float_imag(z) (cimag(z))
#define lapack_complex_double_real(z) (creal(z))
#define lapack_complex_double_imag(z) (cimag(z))
#endif
#else

#if defined(LAPACK_COMPLEX_STRUCTURE)
Expand Down
Loading