Skip to content

Commit

Permalink
trmm: fix up to make trmm tests run at designated steps
Browse files Browse the repository at this point in the history
Without this change, trmm test steps don't follow what specified by the
caller.

Also fix a bug in Makefile about test_dtrmm.

Signed-off-by: Guodong Xu <guodong.xu@linaro.com>
  • Loading branch information
Guodong Xu committed May 15, 2020
1 parent d9bbac9 commit 8ca11c4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ UTIL := bl_test.o
MFLAGS :=
PREF :=

Double_Tests := test_ddot test_drot test_daxpy test_dscal test_dasum test_dcopy test_dswap test_idamax test_idamin test_dgemm test_trmm
Double_Tests := test_ddot test_drot test_daxpy test_dscal test_dasum test_dcopy test_dswap test_idamax test_idamin test_dgemm test_dtrmm
Float_Tests := $(foreach tests,$(Double_Tests), $(subst _id,_is,$(subst _d,_s,$(tests))))
Complex_Double_Tests := $(foreach tests,$(Double_Tests), $(subst _id,_iz,$(subst _d,_z,$(tests))))
Complex_Float_Tests := $(foreach tests,$(Double_Tests), $(subst _id,_ic,$(subst _d,_c,$(tests))))
Expand Down
23 changes: 11 additions & 12 deletions trmm.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ int main(int argc, char* argv[]) {



fprintf(stderr,
"From : %3d To : %3d Step = %3d Side = %c Uplo = %c Trans = %c Diag "
"= %c\n",
from, to, step, side, uplo, trans, diag);

argc--;
argv++;

Expand Down Expand Up @@ -100,6 +95,12 @@ int main(int argc, char* argv[]) {
n = to;
}

fprintf(stderr,
"From : %3d To : %3d Step = %3d Side = %c Uplo = %c Trans = %c Diag "
"= %c\n",
from, to, step, side, uplo, trans, diag);


if ( side=='L') {
k = m;
}
Expand Down Expand Up @@ -148,10 +149,6 @@ int main(int argc, char* argv[]) {

}
for (i = from; i <= to; i += step) {




if (!has_param_m) {
m = i;
}
Expand Down Expand Up @@ -213,12 +210,14 @@ int main(int argc, char* argv[]) {
}

} else{
for (i = 0; i < (k + lc_add) * (n + lc_add) * COMPSIZE; i++) {
b[i] = bi[i];
bref[i] = bi[i];
for (j = 0; j < (k + lc_add) * (n + lc_add) * COMPSIZE; j++) {
b[j] = bi[j];
bref[j] = bi[j];
}
}

fprintf(stderr, " M=%4d, N=%4d, lda=%4d, ldb=%4d, alpha[0]=%f: \n", (int) m, (int) n, lda, ldb, alpha[0]);

TRMM(&side, &uplo, &trans, &diag, &m, &n, alpha, a, &lda, b, &ldb);

#ifndef COMPLEX
Expand Down

0 comments on commit 8ca11c4

Please sign in to comment.