Skip to content

Commit 4ad4dfb

Browse files
authored
Lapack fixes (#667)
1 parent 5fcb54c commit 4ad4dfb

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

cmake/FindARMPL.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#===============================================================================
1919

2020
include_guard()
21-
set(ARMPL_SEQ armpl_intp64)
21+
set(ARMPL_SEQ armpl_int64)
2222
set(ARMPL_OMP armpl_int64_mp)
2323

2424
include(FindPackageHandleStandardArgs)

src/lapack/backends/armpl/armpl_common.hpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,12 @@ inline constexpr bool is_complex<armpl_doublecomplex_t> = true;
142142
template <typename T>
143143
constexpr auto cast_to_int_if_complex(const T& alpha) {
144144
if constexpr (is_complex<T>) {
145-
return static_cast<std::int64_t>((*((T*)&alpha)));
145+
//armpl 25.04 uses directly std::complex so most of the ArmEquivalentType gymnastics is redundant
146+
if constexpr (std::is_same_v<T, std::complex<float>> ||
147+
std::is_same_v<T, std::complex<double>>)
148+
return static_cast<std::int64_t>(alpha.real());
149+
else
150+
return static_cast<std::int64_t>((*((T*)&alpha)));
146151
}
147152
else {
148153
return (std::int64_t)alpha;

0 commit comments

Comments
 (0)