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.

auxiliary.c 1.3 kB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Written by T. H. Do, 1/23/98, SGI/CRAY Research.
  3. */
  4. #include <string.h>
  5. #include "common.h"
  6. #include "cblas_test.h"
  7. void get_transpose_type(char *type, enum CBLAS_TRANSPOSE *trans) {
  8. if( (strncmp( type,"n",1 )==0)||(strncmp( type,"N",1 )==0) )
  9. *trans = CblasNoTrans;
  10. else if( (strncmp( type,"t",1 )==0)||(strncmp( type,"T",1 )==0) )
  11. *trans = CblasTrans;
  12. else if( (strncmp( type,"c",1 )==0)||(strncmp( type,"C",1 )==0) )
  13. *trans = CblasConjTrans;
  14. else *trans = UNDEFINED;
  15. }
  16. void get_uplo_type(char *type, enum CBLAS_UPLO *uplo) {
  17. if( (strncmp( type,"u",1 )==0)||(strncmp( type,"U",1 )==0) )
  18. *uplo = CblasUpper;
  19. else if( (strncmp( type,"l",1 )==0)||(strncmp( type,"L",1 )==0) )
  20. *uplo = CblasLower;
  21. else *uplo = UNDEFINED;
  22. }
  23. void get_diag_type(char *type, enum CBLAS_DIAG *diag) {
  24. if( (strncmp( type,"u",1 )==0)||(strncmp( type,"U",1 )==0) )
  25. *diag = CblasUnit;
  26. else if( (strncmp( type,"n",1 )==0)||(strncmp( type,"N",1 )==0) )
  27. *diag = CblasNonUnit;
  28. else *diag = UNDEFINED;
  29. }
  30. void get_side_type(char *type, enum CBLAS_SIDE *side) {
  31. if( (strncmp( type,"l",1 )==0)||(strncmp( type,"L",1 )==0) )
  32. *side = CblasLeft;
  33. else if( (strncmp( type,"r",1 )==0)||(strncmp( type,"R",1 )==0) )
  34. *side = CblasRight;
  35. else *side = UNDEFINED;
  36. }

OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.

Contributors (1)