|
kusano |
2b45e8 |
/*
|
|
kusano |
2b45e8 |
* Written by T. H. Do, 1/23/98, SGI/CRAY Research.
|
|
kusano |
2b45e8 |
*/
|
|
kusano |
2b45e8 |
#include <string.h></string.h>
|
|
kusano |
2b45e8 |
#include "common.h"
|
|
kusano |
2b45e8 |
#include "cblas_test.h"
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
void get_transpose_type(char *type, enum CBLAS_TRANSPOSE *trans) {
|
|
kusano |
2b45e8 |
if( (strncmp( type,"n",1 )==0)||(strncmp( type,"N",1 )==0) )
|
|
kusano |
2b45e8 |
*trans = CblasNoTrans;
|
|
kusano |
2b45e8 |
else if( (strncmp( type,"t",1 )==0)||(strncmp( type,"T",1 )==0) )
|
|
kusano |
2b45e8 |
*trans = CblasTrans;
|
|
kusano |
2b45e8 |
else if( (strncmp( type,"c",1 )==0)||(strncmp( type,"C",1 )==0) )
|
|
kusano |
2b45e8 |
*trans = CblasConjTrans;
|
|
kusano |
2b45e8 |
else *trans = UNDEFINED;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
void get_uplo_type(char *type, enum CBLAS_UPLO *uplo) {
|
|
kusano |
2b45e8 |
if( (strncmp( type,"u",1 )==0)||(strncmp( type,"U",1 )==0) )
|
|
kusano |
2b45e8 |
*uplo = CblasUpper;
|
|
kusano |
2b45e8 |
else if( (strncmp( type,"l",1 )==0)||(strncmp( type,"L",1 )==0) )
|
|
kusano |
2b45e8 |
*uplo = CblasLower;
|
|
kusano |
2b45e8 |
else *uplo = UNDEFINED;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
void get_diag_type(char *type, enum CBLAS_DIAG *diag) {
|
|
kusano |
2b45e8 |
if( (strncmp( type,"u",1 )==0)||(strncmp( type,"U",1 )==0) )
|
|
kusano |
2b45e8 |
*diag = CblasUnit;
|
|
kusano |
2b45e8 |
else if( (strncmp( type,"n",1 )==0)||(strncmp( type,"N",1 )==0) )
|
|
kusano |
2b45e8 |
*diag = CblasNonUnit;
|
|
kusano |
2b45e8 |
else *diag = UNDEFINED;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
void get_side_type(char *type, enum CBLAS_SIDE *side) {
|
|
kusano |
2b45e8 |
if( (strncmp( type,"l",1 )==0)||(strncmp( type,"L",1 )==0) )
|
|
kusano |
2b45e8 |
*side = CblasLeft;
|
|
kusano |
2b45e8 |
else if( (strncmp( type,"r",1 )==0)||(strncmp( type,"R",1 )==0) )
|
|
kusano |
2b45e8 |
*side = CblasRight;
|
|
kusano |
2b45e8 |
else *side = UNDEFINED;
|
|
kusano |
2b45e8 |
}
|