Skip to content

Commit

Permalink
Fix compile warnings in xflens
Browse files Browse the repository at this point in the history
  • Loading branch information
james-d-mitchell committed Jan 24, 2023
1 parent 6f6ccb0 commit 36ec721
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/xflens/cxxblas/level1/nrm2.tcc
Original file line number Diff line number Diff line change
Expand Up @@ -104,19 +104,19 @@ nrm2_generic(IndexType n, const std::complex<X> *x, IndexType incX, T &norm)
if (real(x[iX]) != Zero) {
T absXi = abs(real(x[iX]));
if (scale<absXi) {
ssq = One + ssq * pow(scale/absXi, 2);
ssq = One + ssq * static_cast<T>(pow(scale/absXi, 2));
scale = absXi;
} else {
ssq += pow(absXi/scale, 2);
ssq += static_cast<T>(pow(absXi/scale, 2));
}
}
if (imag(x[iX]) != Zero) {
T absXi = abs(imag(x[iX]));
if (scale<absXi) {
ssq = One + ssq * pow(scale/absXi, 2);
ssq = One + static_cast<T>(ssq * pow(scale/absXi, 2));
scale = absXi;
} else {
ssq += pow(absXi/scale, 2);
ssq += static_cast<T>(pow(absXi/scale, 2));
}
}
}
Expand Down

0 comments on commit 36ec721

Please sign in to comment.