c@427: #include c@427: #include c@427: #include c@427: #include c@427: #include "cblas.h" c@427: #include "cblas_f77.h" c@427: c@427: void cblas_xerbla(int info, const char *rout, const char *form, ...) c@427: { c@427: extern int RowMajorStrg; c@427: char empty[1] = ""; c@427: va_list argptr; c@427: c@427: va_start(argptr, form); c@427: c@427: if (RowMajorStrg) c@427: { c@427: if (strstr(rout,"gemm") != 0) c@427: { c@427: if (info == 5 ) info = 4; c@427: else if (info == 4 ) info = 5; c@427: else if (info == 11) info = 9; c@427: else if (info == 9 ) info = 11; c@427: } c@427: else if (strstr(rout,"symm") != 0 || strstr(rout,"hemm") != 0) c@427: { c@427: if (info == 5 ) info = 4; c@427: else if (info == 4 ) info = 5; c@427: } c@427: else if (strstr(rout,"trmm") != 0 || strstr(rout,"trsm") != 0) c@427: { c@427: if (info == 7 ) info = 6; c@427: else if (info == 6 ) info = 7; c@427: } c@427: else if (strstr(rout,"gemv") != 0) c@427: { c@427: if (info == 4) info = 3; c@427: else if (info == 3) info = 4; c@427: } c@427: else if (strstr(rout,"gbmv") != 0) c@427: { c@427: if (info == 4) info = 3; c@427: else if (info == 3) info = 4; c@427: else if (info == 6) info = 5; c@427: else if (info == 5) info = 6; c@427: } c@427: else if (strstr(rout,"ger") != 0) c@427: { c@427: if (info == 3) info = 2; c@427: else if (info == 2) info = 3; c@427: else if (info == 8) info = 6; c@427: else if (info == 6) info = 8; c@427: } c@427: else if ( (strstr(rout,"her2") != 0 || strstr(rout,"hpr2") != 0) c@427: && strstr(rout,"her2k") == 0 ) c@427: { c@427: if (info == 8) info = 6; c@427: else if (info == 6) info = 8; c@427: } c@427: } c@427: if (info) c@427: fprintf(stderr, "Parameter %d to routine %s was incorrect\n", info, rout); c@427: vfprintf(stderr, form, argptr); c@427: va_end(argptr); c@427: if (info && !info) c@427: F77_xerbla(empty, &info); /* Force link of our F77 error handler */ c@427: exit(-1); c@427: }