Go to the documentation of this file.00001
00002
00003
00004 #include <string.h>
00005 #include "cblas.h"
00006 #include "cblas_test.h"
00007
00008 void get_transpose_type(char *type, enum CBLAS_TRANSPOSE *trans) {
00009 if( (strncmp( type,"n",1 )==0)||(strncmp( type,"N",1 )==0) )
00010 *trans = CblasNoTrans;
00011 else if( (strncmp( type,"t",1 )==0)||(strncmp( type,"T",1 )==0) )
00012 *trans = CblasTrans;
00013 else if( (strncmp( type,"c",1 )==0)||(strncmp( type,"C",1 )==0) )
00014 *trans = CblasConjTrans;
00015 else *trans = UNDEFINED;
00016 }
00017
00018 void get_uplo_type(char *type, enum CBLAS_UPLO *uplo) {
00019 if( (strncmp( type,"u",1 )==0)||(strncmp( type,"U",1 )==0) )
00020 *uplo = CblasUpper;
00021 else if( (strncmp( type,"l",1 )==0)||(strncmp( type,"L",1 )==0) )
00022 *uplo = CblasLower;
00023 else *uplo = UNDEFINED;
00024 }
00025 void get_diag_type(char *type, enum CBLAS_DIAG *diag) {
00026 if( (strncmp( type,"u",1 )==0)||(strncmp( type,"U",1 )==0) )
00027 *diag = CblasUnit;
00028 else if( (strncmp( type,"n",1 )==0)||(strncmp( type,"N",1 )==0) )
00029 *diag = CblasNonUnit;
00030 else *diag = UNDEFINED;
00031 }
00032 void get_side_type(char *type, enum CBLAS_SIDE *side) {
00033 if( (strncmp( type,"l",1 )==0)||(strncmp( type,"L",1 )==0) )
00034 *side = CblasLeft;
00035 else if( (strncmp( type,"r",1 )==0)||(strncmp( type,"R",1 )==0) )
00036 *side = CblasRight;
00037 else *side = UNDEFINED;
00038 }