cblas_xerbla.c
Go to the documentation of this file.
00001 #include <stdio.h>
00002 #include <stdlib.h>
00003 #include <string.h>
00004 #include <stdarg.h>
00005 #include "cblas.h"
00006 #include "cblas_f77.h"
00007 
00008 void cblas_xerbla(int info, const char *rout, const char *form, ...)
00009 {
00010    extern int RowMajorStrg;
00011    char empty[1] = "";
00012    va_list argptr;
00013 
00014    va_start(argptr, form);
00015 
00016    if (RowMajorStrg)
00017    {
00018       if (strstr(rout,"gemm") != 0)
00019       {
00020          if      (info == 5 ) info =  4;
00021          else if (info == 4 ) info =  5;
00022          else if (info == 11) info =  9;
00023          else if (info == 9 ) info = 11;
00024       }
00025       else if (strstr(rout,"symm") != 0 || strstr(rout,"hemm") != 0)
00026       {
00027          if      (info == 5 ) info =  4;
00028          else if (info == 4 ) info =  5;
00029       }
00030       else if (strstr(rout,"trmm") != 0 || strstr(rout,"trsm") != 0)
00031       {
00032          if      (info == 7 ) info =  6;
00033          else if (info == 6 ) info =  7;
00034       }
00035       else if (strstr(rout,"gemv") != 0)
00036       {
00037          if      (info == 4)  info = 3;
00038          else if (info == 3)  info = 4;
00039       }
00040       else if (strstr(rout,"gbmv") != 0)
00041       {
00042          if      (info == 4)  info = 3;
00043          else if (info == 3)  info = 4;
00044          else if (info == 6)  info = 5;
00045          else if (info == 5)  info = 6;
00046       }
00047       else if (strstr(rout,"ger") != 0)
00048       {
00049          if      (info == 3) info = 2;
00050          else if (info == 2) info = 3;
00051          else if (info == 8) info = 6;
00052          else if (info == 6) info = 8;
00053       }
00054       else if ( (strstr(rout,"her2") != 0 || strstr(rout,"hpr2") != 0)
00055                  && strstr(rout,"her2k") == 0 )
00056       {
00057          if      (info == 8) info = 6;
00058          else if (info == 6) info = 8;
00059       }
00060    }
00061    if (info)
00062       fprintf(stderr, "Parameter %d to routine %s was incorrect\n", info, rout);
00063    vfprintf(stderr, form, argptr);
00064    va_end(argptr);
00065    if (info && !info) 
00066       F77_xerbla(empty, &info); /* Force link of our F77 error handler */
00067    exit(-1);
00068 }


swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:55:16