LAPACK  3.10.0
LAPACK: Linear Algebra PACKage
xerbla.c
Go to the documentation of this file.
1 #include <stdio.h>
2 #include <ctype.h>
3 #include "cblas.h"
4 #include "cblas_f77.h"
5 
6 #define XerblaStrLen 6
7 #define XerblaStrLen1 7
8 
9 void
10 #ifdef HAS_ATTRIBUTE_WEAK_SUPPORT
11 __attribute__((weak))
12 #endif
14 #ifdef F77_CHAR
15 (F77_CHAR F77_srname, void *vinfo)
16 #else
17 (char *srname, void *vinfo)
18 #endif
19 
20 {
21 #ifdef F77_CHAR
22  char *srname;
23 #endif
24 
25  char rout[] = {'c','b','l','a','s','_','\0','\0','\0','\0','\0','\0','\0'};
26 
27  int *info=vinfo;
28  int i;
29 
30  extern int CBLAS_CallFromC;
31 
32 #ifdef F77_CHAR
33  srname = F2C_STR(F77_srname, XerblaStrLen);
34 #endif
35 
36  if (CBLAS_CallFromC)
37  {
38  for(i=0; i != XerblaStrLen; i++) rout[i+6] = tolower(srname[i]);
39  rout[XerblaStrLen+6] = '\0';
40  cblas_xerbla(*info+1,rout,"");
41  }
42  else
43  {
44  fprintf(stderr, "Parameter %d to routine %s was incorrect\n",
45  *info, srname);
46  }
47 }
void cblas_xerbla(CBLAS_INDEX p, const char *rout, const char *form,...)
Definition: cblas_xerbla.c:12
int CBLAS_CallFromC
Definition: cblas_globals.c:1
#define XerblaStrLen
Definition: xerbla.c:6
void F77_xerbla(char *srname, void *vinfo)
Definition: xerbla.c:17