mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
misc cleaning
This commit is contained in:
@@ -7,7 +7,7 @@ void ei_r1mpyq(int m, int n, Scalar *a, int
|
||||
int a_dim1, a_offset;
|
||||
|
||||
/* Local variables */
|
||||
int i, j, nm1, nmj;
|
||||
int i, j, nmj;
|
||||
Scalar cos__=0., sin__=0., temp;
|
||||
|
||||
/* Parameter adjustments */
|
||||
@@ -18,12 +18,11 @@ void ei_r1mpyq(int m, int n, Scalar *a, int
|
||||
a -= a_offset;
|
||||
|
||||
/* Function Body */
|
||||
nm1 = n - 1;
|
||||
if (nm1 < 1)
|
||||
if (n<=1)
|
||||
return;
|
||||
|
||||
/* apply the first set of givens rotations to a. */
|
||||
for (nmj = 1; nmj <= nm1; ++nmj) {
|
||||
for (nmj = 1; nmj <= n-1; ++nmj) {
|
||||
j = n - nmj;
|
||||
if (ei_abs(v[j]) > 1.) {
|
||||
cos__ = 1. / v[j];
|
||||
@@ -40,7 +39,7 @@ void ei_r1mpyq(int m, int n, Scalar *a, int
|
||||
}
|
||||
}
|
||||
/* apply the second set of givens rotations to a. */
|
||||
for (j = 1; j <= nm1; ++j) {
|
||||
for (j = 1; j <= n-1; ++j) {
|
||||
if (ei_abs(w[j]) > 1.) {
|
||||
cos__ = 1. / w[j];
|
||||
sin__ = ei_sqrt(1. - ei_abs2(cos__));
|
||||
@@ -56,5 +55,5 @@ void ei_r1mpyq(int m, int n, Scalar *a, int
|
||||
}
|
||||
}
|
||||
return;
|
||||
} /* r1mpyq_ */
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user