Skip to content

Commit

Permalink
Add workaround for ambiguous complex multiplication overloads in HIP …
Browse files Browse the repository at this point in the history
…in `larft.cu` (#1241)
  • Loading branch information
msimberg committed Dec 18, 2024
1 parent 9d80ad2 commit dd4a4f6
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions src/lapack/gpu/larft.cu
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
// SPDX-License-Identifier: BSD-3-Clause
//

#include <complex>
#include <type_traits>

#include <whip.hpp>

#include <dlaf/common/assert.h>
Expand Down Expand Up @@ -46,8 +49,20 @@ __global__ void fix_tau(const unsigned k, const T* tau, unsigned inctau, T* t, u
t_ij = {};
else if (i == j)
t_ij = tau_j;
else
t_ij = -tau_j * t_ij;
else {
#if defined(DLAF_WITH_HIP)
if constexpr (std::is_same_v<T, hipFloatComplex>) {
t_ij = hipCmulf(-tau_j, t_ij);
}
else if constexpr (std::is_same_v<T, hipDoubleComplex>) {
t_ij = hipCmul(-tau_j, t_ij);
}
else
#endif
{
t_ij = -tau_j * t_ij;
}
}
}
}

Expand Down

0 comments on commit dd4a4f6

Please sign in to comment.