Skip to content

Commit

Permalink
libflame: Added DTL code to stprfb.c stprfs.c stptri.c stptrs.c strev…
Browse files Browse the repository at this point in the history
…c.c strevc3.c strexc.c files

Enabled DTL logging and tracing in the specified files

Change-Id: I0e56a9b12b05c5c3b3726b2c87061cbd1afbf90a
  • Loading branch information
dnikku authored and Deepika Nikku committed Jun 18, 2021
1 parent 18e966e commit 001ac4c
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 2 deletions.
10 changes: 9 additions & 1 deletion src/map/lapack2flamec/f2c/c/stprfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,12 @@
/* ===================================================================== */
/* Subroutine */
int stprfb_(char *side, char *trans, char *direct, char * storev, integer *m, integer *n, integer *k, integer *l, real *v, integer *ldv, real *t, integer *ldt, real *a, integer *lda, real *b, integer *ldb, real *work, integer *ldwork) {
AOCL_DTL_TRACE_ENTRY(AOCL_DTL_LEVEL_TRACE_5);
#if AOCL_DTL_LOG_ENABLE
char buffer[256];
snprintf(buffer, 256,"stprfb inputs: side %c, trans %c, direct %c, storev %c, m %d, n %d, k %d, l %d, ldv %d, ldt %d, lda %d, ldb %d",*side, *trans, *direct, *storev, *m, *n, *k, *l, *ldv, *ldt, *lda, *ldb);
AOCL_DTL_LOG(AOCL_DTL_LEVEL_TRACE_5, buffer);
#endif
/* System generated locals */
integer a_dim1, a_offset, b_dim1, b_offset, t_dim1, t_offset, v_dim1, v_offset, work_dim1, work_offset, i__1, i__2;
/* Local variables */
Expand Down Expand Up @@ -297,6 +303,7 @@
work -= work_offset;
/* Function Body */
if (*m <= 0 || *n <= 0 || *k <= 0 || *l < 0) {
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5);
return 0;
}
if (lsame_(storev, "C")) {
Expand Down Expand Up @@ -911,8 +918,9 @@
}
}
}
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5);
return 0;
/* End of STPRFB */
}
/* stprfb_ */


9 changes: 9 additions & 0 deletions src/map/lapack2flamec/f2c/c/stprfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ static real c_b19 = -1.f;
/* Subroutine */
int stprfs_(char *uplo, char *trans, char *diag, integer *n, integer *nrhs, real *ap, real *b, integer *ldb, real *x, integer *ldx, real *ferr, real *berr, real *work, integer *iwork, integer *info)
{
AOCL_DTL_TRACE_ENTRY(AOCL_DTL_LEVEL_TRACE_5);
#if AOCL_DTL_LOG_ENABLE
char buffer[256];
snprintf(buffer, 256,"stprfs inputs: uplo %c, trans %c, diag %c, n %d, nrhs %d, ldb %d, ldx %d",*uplo, *trans, *diag, *n, *nrhs, *ldb, *ldx);
AOCL_DTL_LOG(AOCL_DTL_LEVEL_TRACE_5, buffer);
#endif
/* System generated locals */
integer b_dim1, b_offset, x_dim1, x_offset, i__1, i__2, i__3;
real r__1, r__2, r__3;
Expand Down Expand Up @@ -265,6 +271,7 @@ int stprfs_(char *uplo, char *trans, char *diag, integer *n, integer *nrhs, real
{
i__1 = -(*info);
xerbla_("STPRFS", &i__1);
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5);
return 0;
}
/* Quick return if possible */
Expand All @@ -279,6 +286,7 @@ int stprfs_(char *uplo, char *trans, char *diag, integer *n, integer *nrhs, real
berr[j] = 0.f;
/* L10: */
}
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5);
return 0;
}
if (notran)
Expand Down Expand Up @@ -617,6 +625,7 @@ int stprfs_(char *uplo, char *trans, char *diag, integer *n, integer *nrhs, real
}
/* L250: */
}
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5);
return 0;
/* End of STPRFS */
}
Expand Down
10 changes: 10 additions & 0 deletions src/map/lapack2flamec/f2c/c/stptri.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ static integer c__1 = 1;
/* Subroutine */
int stptri_(char *uplo, char *diag, integer *n, real *ap, integer *info)
{
AOCL_DTL_TRACE_ENTRY(AOCL_DTL_LEVEL_TRACE_5);
#if AOCL_DTL_LOG_ENABLE
char buffer[256];
snprintf(buffer, 256,"stptri inputs: uplo %c, diag %c, n %d",*uplo, *diag, *n);
AOCL_DTL_LOG(AOCL_DTL_LEVEL_TRACE_5, buffer);
#endif
/* System generated locals */
integer i__1, i__2;
/* Local variables */
Expand Down Expand Up @@ -164,6 +170,7 @@ int stptri_(char *uplo, char *diag, integer *n, real *ap, integer *info)
{
i__1 = -(*info);
xerbla_("STPTRI", &i__1);
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5);
return 0;
}
/* Check for singularity if non-unit. */
Expand All @@ -180,6 +187,7 @@ int stptri_(char *uplo, char *diag, integer *n, real *ap, integer *info)
jj += *info;
if (ap[jj] == 0.f)
{
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5);
return 0;
}
/* L10: */
Expand All @@ -195,6 +203,7 @@ int stptri_(char *uplo, char *diag, integer *n, real *ap, integer *info)
{
if (ap[jj] == 0.f)
{
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5);
return 0;
}
jj = jj + *n - *info + 1;
Expand Down Expand Up @@ -260,6 +269,7 @@ int stptri_(char *uplo, char *diag, integer *n, real *ap, integer *info)
/* L40: */
}
}
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5);
return 0;
/* End of STPTRI */
}
Expand Down
11 changes: 11 additions & 0 deletions src/map/lapack2flamec/f2c/c/stptrs.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ static integer c__1 = 1;
/* Subroutine */
int stptrs_(char *uplo, char *trans, char *diag, integer *n, integer *nrhs, real *ap, real *b, integer *ldb, integer *info)
{
AOCL_DTL_TRACE_ENTRY(AOCL_DTL_LEVEL_TRACE_5);
#if AOCL_DTL_LOG_ENABLE
char buffer[256];
snprintf(buffer, 256,"stptrs inputs: uplo %c, trans %c, diag %c, n %d, nrhs %d, ldb %d",*uplo, *trans, *diag, *n, *nrhs, *ldb);
AOCL_DTL_LOG(AOCL_DTL_LEVEL_TRACE_5, buffer);
#endif
/* System generated locals */
integer b_dim1, b_offset, i__1;
/* Local variables */
Expand Down Expand Up @@ -190,11 +196,13 @@ int stptrs_(char *uplo, char *trans, char *diag, integer *n, integer *nrhs, real
{
i__1 = -(*info);
xerbla_("STPTRS", &i__1);
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5);
return 0;
}
/* Quick return if possible */
if (*n == 0)
{
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5);
return 0;
}
/* Check for singularity. */
Expand All @@ -210,6 +218,7 @@ int stptrs_(char *uplo, char *trans, char *diag, integer *n, integer *nrhs, real
{
if (ap[jc + *info - 1] == 0.f)
{
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5);
return 0;
}
jc += *info;
Expand All @@ -226,6 +235,7 @@ int stptrs_(char *uplo, char *trans, char *diag, integer *n, integer *nrhs, real
{
if (ap[jc] == 0.f)
{
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5);
return 0;
}
jc = jc + *n - *info + 1;
Expand All @@ -243,6 +253,7 @@ int stptrs_(char *uplo, char *trans, char *diag, integer *n, integer *nrhs, real
stpsv_(uplo, trans, diag, n, &ap[1], &b[j * b_dim1 + 1], &c__1);
/* L30: */
}
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5);
return 0;
/* End of STPTRS */
}
Expand Down
9 changes: 9 additions & 0 deletions src/map/lapack2flamec/f2c/c/strevc.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,12 @@ here the magnitude of a complex number */
/* Subroutine */
int strevc_(char *side, char *howmny, logical *select, integer *n, real *t, integer *ldt, real *vl, integer *ldvl, real *vr, integer *ldvr, integer *mm, integer *m, real *work, integer *info)
{
AOCL_DTL_TRACE_ENTRY(AOCL_DTL_LEVEL_TRACE_5);
#if AOCL_DTL_LOG_ENABLE
char buffer[256];
snprintf(buffer, 256,"strevc inputs: side %c, howmny %c, n %d, ldt %d, ldvl %d, ldvr %d, mm %d",*side, *howmny, *n, *ldt, *ldvl, *ldvr, *mm);
AOCL_DTL_LOG(AOCL_DTL_LEVEL_TRACE_5, buffer);
#endif
/* System generated locals */
integer t_dim1, t_offset, vl_dim1, vl_offset, vr_dim1, vr_offset, i__1, i__2, i__3;
real r__1, r__2, r__3, r__4;
Expand Down Expand Up @@ -397,11 +403,13 @@ int strevc_(char *side, char *howmny, logical *select, integer *n, real *t, inte
{
i__1 = -(*info);
xerbla_("STREVC", &i__1);
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5);
return 0;
}
/* Quick return if possible. */
if (*n == 0)
{
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5);
return 0;
}
/* Set the constants to control overflow. */
Expand Down Expand Up @@ -1228,6 +1236,7 @@ int strevc_(char *side, char *howmny, logical *select, integer *n, real *t, inte
/* L260: */
}
}
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5);
return 0;
/* End of STREVC */
}
Expand Down
10 changes: 10 additions & 0 deletions src/map/lapack2flamec/f2c/c/strevc3.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,12 @@
/* ===================================================================== */
/* Subroutine */
int strevc3_(char *side, char *howmny, logical *select, integer *n, real *t, integer *ldt, real *vl, integer *ldvl, real *vr, integer *ldvr, integer *mm, integer *m, real *work, integer *lwork, integer *info) {
AOCL_DTL_TRACE_ENTRY(AOCL_DTL_LEVEL_TRACE_5);
#if AOCL_DTL_LOG_ENABLE
char buffer[256];
snprintf(buffer, 256,"strevc3 inputs: side %c, howmny %c, n %d, ldt %d, ldvl %d, ldvr %d, mm %d",*side, *howmny, *n, *ldt, *ldvl, *ldvr, *mm);
AOCL_DTL_LOG(AOCL_DTL_LEVEL_TRACE_5, buffer);
#endif
/* System generated locals */
address a__1[2];
integer t_dim1, t_offset, vl_dim1, vl_offset, vr_dim1, vr_offset, i__1[2], i__2, i__3, i__4;
Expand Down Expand Up @@ -416,13 +422,16 @@
if (*info != 0) {
i__2 = -(*info);
xerbla_("STREVC3", &i__2);
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5);
return 0;
}
else if (lquery) {
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5);
return 0;
}
/* Quick return if possible. */
if (*n == 0) {
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5);
return 0;
}
/* Use blocked version of back-transformation if sufficient workspace. */
Expand Down Expand Up @@ -1344,6 +1353,7 @@
L260: ;
}
}
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5);
return 0;
/* End of STREVC3 */
}
Expand Down
18 changes: 17 additions & 1 deletion src/map/lapack2flamec/f2c/c/strexc.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@
/* ===================================================================== */
/* Subroutine */
int strexc_(char *compq, integer *n, real *t, integer *ldt, real *q, integer *ldq, integer *ifst, integer *ilst, real *work, integer *info) {
AOCL_DTL_TRACE_ENTRY(AOCL_DTL_LEVEL_TRACE_5);
#if AOCL_DTL_LOG_ENABLE
char buffer[256];
snprintf(buffer, 256,"strexc inputs: compq %c, n %d, ldt %d, ldq %d, ifst %d, ilst %d",*compq, *n, *ldt, *ldq, *ifst, *ilst);
AOCL_DTL_LOG(AOCL_DTL_LEVEL_TRACE_5, buffer);
#endif
/* System generated locals */
integer q_dim1, q_offset, t_dim1, t_offset, i__1;
/* Local variables */
Expand Down Expand Up @@ -204,10 +210,12 @@
if (*info != 0) {
i__1 = -(*info);
xerbla_("STREXC", &i__1);
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5);
return 0;
}
/* Quick return if possible */
if (*n <= 1) {
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5);
return 0;
}
/* Determine the first row of specified block */
Expand Down Expand Up @@ -237,6 +245,7 @@
}
}
if (*ifst == *ilst) {
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5);
return 0;
}
if (*ifst < *ilst) {
Expand All @@ -260,6 +269,7 @@
slaexc_(&wantq, n, &t[t_offset], ldt, &q[q_offset], ldq, &here, & nbf, &nbnext, &work[1], info);
if (*info != 0) {
*ilst = here;
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5);
return 0;
}
here += nbnext;
Expand All @@ -283,6 +293,7 @@
slaexc_(&wantq, n, &t[t_offset], ldt, &q[q_offset], ldq, &i__1, & c__1, &nbnext, &work[1], info);
if (*info != 0) {
*ilst = here;
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5);
return 0;
}
if (nbnext == 1) {
Expand All @@ -300,6 +311,7 @@
slaexc_(&wantq, n, &t[t_offset], ldt, &q[q_offset], ldq, & here, &c__1, &nbnext, &work[1], info);
if (*info != 0) {
*ilst = here;
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5);
return 0;
}
here += 2;
Expand Down Expand Up @@ -332,6 +344,7 @@
slaexc_(&wantq, n, &t[t_offset], ldt, &q[q_offset], ldq, &i__1, & nbnext, &nbf, &work[1], info);
if (*info != 0) {
*ilst = here;
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5);
return 0;
}
here -= nbnext;
Expand All @@ -355,6 +368,7 @@
slaexc_(&wantq, n, &t[t_offset], ldt, &q[q_offset], ldq, &i__1, & nbnext, &c__1, &work[1], info);
if (*info != 0) {
*ilst = here;
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5);
return 0;
}
if (nbnext == 1) {
Expand All @@ -373,6 +387,7 @@
slaexc_(&wantq, n, &t[t_offset], ldt, &q[q_offset], ldq, & i__1, &c__2, &c__1, &work[1], info);
if (*info != 0) {
*ilst = here;
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5);
return 0;
}
here += -2;
Expand All @@ -391,8 +406,9 @@
}
}
*ilst = here;
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_5);
return 0;
/* End of STREXC */
}
/* strexc_ */


0 comments on commit 001ac4c

Please sign in to comment.