misc cleaning

This commit is contained in:
Thomas Capricelli
2010-01-26 13:20:24 +01:00
parent 71f513e250
commit 55f328b264
6 changed files with 48 additions and 80 deletions

View File

@@ -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_ */
}