Fix lapack complex implementation of lauu2 and potf2 for Android (use FLOAT instead of FLOAT[2] as imaginary part is not used).

This commit is contained in:
buffer51 2015-11-07 19:31:13 -05:00
parent a1a96589aa
commit 4e1b521e27
4 changed files with 23 additions and 27 deletions

View File

@ -46,7 +46,7 @@ blasint CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *sa,
BLASLONG n, lda;
FLOAT *a;
FLOAT temp[2];
FLOAT temp;
BLASLONG i;
n = args -> n;
@ -64,12 +64,11 @@ blasint CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *sa,
a + i * COMPSIZE, lda, NULL, 0, NULL, 0);
if (i < n - 1) {
temp[0] = DOTC_K(n - i - 1,
temp = CREAL(DOTC_K(n - i - 1,
a + (i + 1 + i * lda) * COMPSIZE, 1,
a + (i + 1 + i * lda) * COMPSIZE, 1);
GET_IMAGE(temp[1]);
a + (i + 1 + i * lda) * COMPSIZE, 1));
*(a + (i + i * lda) * COMPSIZE + 0) += temp[0];
*(a + (i + i * lda) * COMPSIZE + 0) += temp;
*(a + (i + i * lda) * COMPSIZE + 1) = ZERO;
GEMV_U(n - i - 1, i, 0, dp1, ZERO,

View File

@ -46,7 +46,7 @@ blasint CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *sa,
BLASLONG n, lda;
FLOAT *a;
FLOAT temp[2];
FLOAT temp;
BLASLONG i;
n = args -> n;
@ -64,10 +64,9 @@ blasint CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *sa,
a + i * lda * COMPSIZE, 1, NULL, 0, NULL, 0);
if (i < n - 1) {
temp[0] = DOTC_K(n - i - 1, a + (i + (i + 1) * lda) * COMPSIZE, lda, a + (i + (i + 1) * lda) * COMPSIZE, lda);
GET_IMAGE(temp[1]);
temp = CREAL(DOTC_K(n - i - 1, a + (i + (i + 1) * lda) * COMPSIZE, lda, a + (i + (i + 1) * lda) * COMPSIZE, lda));
*(a + (i + i * lda) * COMPSIZE + 0) += temp[0];
*(a + (i + i * lda) * COMPSIZE + 0) += temp;
*(a + (i + i * lda) * COMPSIZE + 1) = ZERO;
GEMV_O(i, n - i - 1, 0, dp1, ZERO,

View File

@ -51,7 +51,7 @@ blasint CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *sa,
BLASLONG n, lda;
FLOAT *a;
FLOAT ajj[2];
FLOAT ajj;
FLOAT *aoffset;
BLASLONG i, j;
@ -68,18 +68,17 @@ blasint CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *sa,
for (j = 0; j < n; j++) {
ajj[0] = DOTC_K(j, a + j * 2, lda, a + j * 2, lda);
GET_IMAGE(ajj[1]);
ajj = CREAL(DOTC_K(j, a + j * 2, lda, a + j * 2, lda));
ajj[0] = *(aoffset + j * 2) - ajj[0];
ajj = *(aoffset + j * 2) - ajj;
if (ajj[0] <= 0){
*(aoffset + j * 2 + 0) = ajj[0];
if (ajj <= 0){
*(aoffset + j * 2 + 0) = ajj;
*(aoffset + j * 2 + 1) = ZERO;
return j + 1;
}
ajj[0] = SQRT(ajj[0]);
*(aoffset + j * 2 + 0) = ajj[0];
ajj = SQRT(ajj);
*(aoffset + j * 2 + 0) = ajj;
*(aoffset + j * 2 + 1) = ZERO;
i = n - j - 1;
@ -90,7 +89,7 @@ blasint CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *sa,
a + j * 2, lda,
aoffset + (j + 1) * 2, 1, sb);
SCAL_K(i, 0, 0, ONE / ajj[0], ZERO,
SCAL_K(i, 0, 0, ONE / ajj, ZERO,
aoffset + (j + 1) * 2, 1, NULL, 0, NULL, 0);
}

View File

@ -51,7 +51,7 @@ blasint CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *sa,
BLASLONG n, lda;
FLOAT *a;
FLOAT ajj[2];
FLOAT ajj;
BLASLONG i, j;
n = args -> n;
@ -65,19 +65,18 @@ blasint CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *sa,
for (j = 0; j < n; j++) {
ajj[0] = DOTC_K(j, a, 1, a, 1);
GET_IMAGE(ajj[1]);
ajj = CREAL(DOTC_K(j, a, 1, a, 1));
ajj[0] = *(a + j * 2) - ajj[0];
ajj = *(a + j * 2) - ajj;
if (ajj[0] <= 0){
*(a + j * 2 + 0) = ajj[0];
if (ajj <= 0){
*(a + j * 2 + 0) = ajj;
*(a + j * 2 + 1) = ZERO;
return j + 1;
}
ajj[0] = SQRT(ajj[0]);
*(a + j * 2 + 0) = ajj[0];
ajj = SQRT(ajj);
*(a + j * 2 + 0) = ajj;
*(a + j * 2 + 1) = ZERO;
i = n - j - 1;
@ -88,7 +87,7 @@ blasint CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *sa,
a, 1,
a + (j + lda) * 2, lda, sb);
SCAL_K(i, 0, 0, ONE / ajj[0], ZERO,
SCAL_K(i, 0, 0, ONE / ajj, ZERO,
a + (j + lda) * 2, lda, NULL, 0, NULL, 0);
}