You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

xerbla.c 804 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #include <stdio.h>
  2. #include <ctype.h>
  3. #include "cblas.h"
  4. #include "cblas_f77.h"
  5. #define XerblaStrLen 6
  6. #define XerblaStrLen1 7
  7. #ifdef F77_CHAR
  8. void F77_xerbla(F77_CHAR F77_srname, void *vinfo)
  9. #else
  10. void F77_xerbla(char *srname, void *vinfo)
  11. #endif
  12. {
  13. #ifdef F77_CHAR
  14. char *srname;
  15. #endif
  16. char rout[] = {'c','b','l','a','s','_','\0','\0','\0','\0','\0','\0','\0'};
  17. int *info=vinfo;
  18. int i;
  19. extern int CBLAS_CallFromC;
  20. #ifdef F77_CHAR
  21. srname = F2C_STR(F77_srname, XerblaStrLen);
  22. #endif
  23. if (CBLAS_CallFromC)
  24. {
  25. for(i=0; i != XerblaStrLen; i++) rout[i+6] = tolower(srname[i]);
  26. rout[XerblaStrLen+6] = '\0';
  27. cblas_xerbla(*info+1,rout,"");
  28. }
  29. else
  30. {
  31. fprintf(stderr, "Parameter %d to routine %s was incorrect\n",
  32. *info, srname);
  33. }
  34. }