Go to the source code of this file.
FLA_Error FLA_Gemv | ( | FLA_Trans | transa, | |
FLA_Obj | alpha, | |||
FLA_Obj | A, | |||
FLA_Obj | x, | |||
FLA_Obj | beta, | |||
FLA_Obj | y | |||
) |
References FLA_Check_error_level(), FLA_Gemv_check(), FLA_Gemv_external(), and FLA_Gemv_internal().
Referenced by fla_gemv_f().
00036 { 00037 return FLA_Gemv_external( transa, alpha, A, x, beta, y ); 00038 }
FLA_Error FLA_Gemv_c_task | ( | FLA_Obj | alpha, | |
FLA_Obj | A, | |||
FLA_Obj | x, | |||
FLA_Obj | beta, | |||
FLA_Obj | y, | |||
fla_gemv_t * | cntl | |||
) |
References FLA_Gemv_external().
Referenced by FLA_Gemv_c().
00041 { 00042 return FLA_Gemv_external( FLA_CONJ_TRANSPOSE, alpha, A, x, beta, y ); 00043 }
FLA_Error FLA_Gemv_check | ( | FLA_Trans | transa, | |
FLA_Obj | alpha, | |||
FLA_Obj | A, | |||
FLA_Obj | x, | |||
FLA_Obj | beta, | |||
FLA_Obj | y | |||
) |
References FLA_Check_consistent_object_datatype(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_scalar(), FLA_Check_if_vector(), FLA_Check_matrix_vector_dims(), FLA_Check_nonconstant_object(), and FLA_Check_valid_trans().
Referenced by FLA_Gemv(), FLA_Gemv_external(), and FLASH_Gemv().
00036 { 00037 FLA_Error e_val; 00038 00039 e_val = FLA_Check_valid_trans( transa ); 00040 FLA_Check_error_code( e_val ); 00041 00042 e_val = FLA_Check_floating_object( A ); 00043 FLA_Check_error_code( e_val ); 00044 00045 e_val = FLA_Check_nonconstant_object( A ); 00046 FLA_Check_error_code( e_val ); 00047 00048 e_val = FLA_Check_identical_object_datatype( A, x ); 00049 FLA_Check_error_code( e_val ); 00050 00051 e_val = FLA_Check_identical_object_datatype( A, y ); 00052 FLA_Check_error_code( e_val ); 00053 00054 e_val = FLA_Check_consistent_object_datatype( A, alpha ); 00055 FLA_Check_error_code( e_val ); 00056 00057 e_val = FLA_Check_consistent_object_datatype( A, beta ); 00058 FLA_Check_error_code( e_val ); 00059 00060 e_val = FLA_Check_if_vector( x ); 00061 FLA_Check_error_code( e_val ); 00062 00063 e_val = FLA_Check_if_vector( y ); 00064 FLA_Check_error_code( e_val ); 00065 00066 e_val = FLA_Check_if_scalar( alpha ); 00067 FLA_Check_error_code( e_val ); 00068 00069 e_val = FLA_Check_if_scalar( beta ); 00070 FLA_Check_error_code( e_val ); 00071 00072 e_val = FLA_Check_matrix_vector_dims( transa, A, x, y ); 00073 FLA_Check_error_code( e_val ); 00074 00075 return FLA_SUCCESS; 00076 }
FLA_Error FLA_Gemv_external | ( | FLA_Trans | transa, | |
FLA_Obj | alpha, | |||
FLA_Obj | A, | |||
FLA_Obj | x, | |||
FLA_Obj | beta, | |||
FLA_Obj | y | |||
) |
References cblas_cgemv(), cblas_dgemv(), cblas_sgemv(), cblas_zgemv(), CblasColMajor, cgemv(), dgemv(), FLA_Check_error_level(), FLA_Copyt_external(), FLA_Gemv_check(), FLA_Obj_create_conf_to(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Obj_width(), FLA_Param_map_to_blas_trans(), sgemv(), and zgemv().
Referenced by FLA_Accum_T_UT_fc_unb_var1(), FLA_Chol_l_unb_var2(), FLA_Chol_u_unb_var2(), FLA_Gemm_hn_unb_var3(), FLA_Gemm_hn_unb_var4(), FLA_Gemm_ht_unb_var3(), FLA_Gemm_ht_unb_var4(), FLA_Gemm_nh_unb_var1(), FLA_Gemm_nh_unb_var2(), FLA_Gemm_nn_unb_var1(), FLA_Gemm_nn_unb_var2(), FLA_Gemm_nn_unb_var3(), FLA_Gemm_nn_unb_var4(), FLA_Gemm_nt_unb_var1(), FLA_Gemm_nt_unb_var2(), FLA_Gemm_nt_unb_var3(), FLA_Gemm_nt_unb_var4(), FLA_Gemm_th_unb_var1(), FLA_Gemm_th_unb_var2(), FLA_Gemm_th_unb_var3(), FLA_Gemm_th_unb_var4(), FLA_Gemm_tn_unb_var1(), FLA_Gemm_tn_unb_var2(), FLA_Gemm_tn_unb_var3(), FLA_Gemm_tn_unb_var4(), FLA_Gemm_tt_unb_var1(), FLA_Gemm_tt_unb_var2(), FLA_Gemm_tt_unb_var3(), FLA_Gemm_tt_unb_var4(), FLA_Gemv(), FLA_Gemv_c_external(), FLA_Gemv_c_task(), fla_gemv_external_f(), FLA_Gemv_n_external(), FLA_Gemv_n_task(), FLA_Gemv_t_external(), FLA_Gemv_t_task(), FLA_Gemv_task(), FLA_Hemm_ll_unb_var1(), FLA_Hemm_ll_unb_var2(), FLA_Hemm_ll_unb_var6(), FLA_Hemm_ll_unb_var7(), FLA_Hemm_lu_unb_var2(), FLA_Hemm_lu_unb_var3(), FLA_Hemm_lu_unb_var5(), FLA_Hemm_lu_unb_var6(), FLA_Hemm_rl_unb_var2(), FLA_Hemm_rl_unb_var3(), FLA_Hemm_rl_unb_var5(), FLA_Hemm_rl_unb_var6(), FLA_Hemm_ru_unb_var1(), FLA_Hemm_ru_unb_var2(), FLA_Hemm_ru_unb_var6(), FLA_Hemm_ru_unb_var7(), FLA_Her2k_lh_unb_var2(), FLA_Her2k_lh_unb_var3(), FLA_Her2k_lh_unb_var4(), FLA_Her2k_lh_unb_var5(), FLA_Her2k_lh_unb_var6(), FLA_Her2k_lh_unb_var7(), FLA_Her2k_ln_unb_var1(), FLA_Her2k_ln_unb_var2(), FLA_Her2k_ln_unb_var3(), FLA_Her2k_ln_unb_var6(), FLA_Her2k_ln_unb_var7(), FLA_Her2k_ln_unb_var8(), FLA_Her2k_uh_unb_var2(), FLA_Her2k_uh_unb_var3(), FLA_Her2k_uh_unb_var4(), FLA_Her2k_uh_unb_var5(), FLA_Her2k_uh_unb_var6(), FLA_Her2k_uh_unb_var7(), FLA_Her2k_un_unb_var1(), FLA_Her2k_un_unb_var2(), FLA_Her2k_un_unb_var3(), FLA_Her2k_un_unb_var6(), FLA_Her2k_un_unb_var7(), FLA_Her2k_un_unb_var8(), FLA_Herk_lh_unb_var2(), FLA_Herk_lh_unb_var3(), FLA_Herk_ln_unb_var1(), FLA_Herk_ln_unb_var4(), FLA_Herk_uh_unb_var2(), FLA_Herk_uh_unb_var4(), FLA_Herk_un_unb_var1(), FLA_Herk_un_unb_var3(), FLA_LU_nopiv_unb_var2(), FLA_LU_nopiv_unb_var3(), FLA_LU_nopiv_unb_var4(), FLA_LU_piv_unb_var3(), FLA_LU_piv_unb_var3b(), FLA_LU_piv_unb_var4(), FLA_QR_UT_Accum_T_unb_var1(), FLA_QR_UT_UD_Accum_T_unb_var1(), FLA_Symm_ll_unb_var1(), FLA_Symm_ll_unb_var2(), FLA_Symm_ll_unb_var3(), FLA_Symm_ll_unb_var5(), FLA_Symm_ll_unb_var6(), FLA_Symm_ll_unb_var7(), FLA_Symm_lu_unb_var1(), FLA_Symm_lu_unb_var2(), FLA_Symm_lu_unb_var3(), FLA_Symm_lu_unb_var5(), FLA_Symm_lu_unb_var6(), FLA_Symm_lu_unb_var7(), FLA_Symm_rl_unb_var1(), FLA_Symm_rl_unb_var2(), FLA_Symm_rl_unb_var3(), FLA_Symm_rl_unb_var5(), FLA_Symm_rl_unb_var6(), FLA_Symm_rl_unb_var7(), FLA_Symm_ru_unb_var1(), FLA_Symm_ru_unb_var2(), FLA_Symm_ru_unb_var3(), FLA_Symm_ru_unb_var5(), FLA_Symm_ru_unb_var6(), FLA_Symm_ru_unb_var7(), FLA_Syr2k_ln_unb_var1(), FLA_Syr2k_ln_unb_var2(), FLA_Syr2k_ln_unb_var3(), FLA_Syr2k_ln_unb_var4(), FLA_Syr2k_ln_unb_var5(), FLA_Syr2k_ln_unb_var6(), FLA_Syr2k_ln_unb_var7(), FLA_Syr2k_ln_unb_var8(), FLA_Syr2k_lt_unb_var1(), FLA_Syr2k_lt_unb_var2(), FLA_Syr2k_lt_unb_var3(), FLA_Syr2k_lt_unb_var4(), FLA_Syr2k_lt_unb_var5(), FLA_Syr2k_lt_unb_var6(), FLA_Syr2k_lt_unb_var7(), FLA_Syr2k_lt_unb_var8(), FLA_Syr2k_un_unb_var1(), FLA_Syr2k_un_unb_var2(), FLA_Syr2k_un_unb_var3(), FLA_Syr2k_un_unb_var4(), FLA_Syr2k_un_unb_var5(), FLA_Syr2k_un_unb_var6(), FLA_Syr2k_un_unb_var7(), FLA_Syr2k_un_unb_var8(), FLA_Syr2k_ut_unb_var1(), FLA_Syr2k_ut_unb_var2(), FLA_Syr2k_ut_unb_var3(), FLA_Syr2k_ut_unb_var4(), FLA_Syr2k_ut_unb_var5(), FLA_Syr2k_ut_unb_var6(), FLA_Syr2k_ut_unb_var7(), FLA_Syr2k_ut_unb_var8(), FLA_Syrk_ln_unb_var1(), FLA_Syrk_ln_unb_var2(), FLA_Syrk_ln_unb_var3(), FLA_Syrk_ln_unb_var4(), FLA_Syrk_lt_unb_var1(), FLA_Syrk_lt_unb_var2(), FLA_Syrk_lt_unb_var3(), FLA_Syrk_lt_unb_var4(), FLA_Syrk_un_unb_var1(), FLA_Syrk_un_unb_var2(), FLA_Syrk_un_unb_var3(), FLA_Syrk_un_unb_var4(), FLA_Syrk_ut_unb_var1(), FLA_Syrk_ut_unb_var2(), FLA_Syrk_ut_unb_var3(), FLA_Syrk_ut_unb_var4(), FLA_Trmm_lln_unb_var1(), FLA_Trmm_llt_unb_var1(), FLA_Trmm_lun_unb_var1(), FLA_Trmm_lut_unb_var1(), FLA_Trmm_rln_unb_var1(), FLA_Trmm_rlt_unb_var1(), FLA_Trmm_run_unb_var1(), FLA_Trmm_rut_unb_var1(), FLA_Trsm_lln_unb_var1(), FLA_Trsm_llt_unb_var1(), FLA_Trsm_lun_unb_var1(), FLA_Trsm_lut_unb_var1(), FLA_Trsm_rln_unb_var1(), FLA_Trsm_rlt_unb_var1(), FLA_Trsm_run_unb_var1(), FLA_Trsm_rut_unb_var1(), FLA_Ttmm_l_unb_var2(), and FLA_Ttmm_u_unb_var2().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, n_A, ldim_A; 00039 int m_x, ldim_x; 00040 int m_y, ldim_y; 00041 int inc_x, inc_y; 00042 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00043 CBLAS_ORDER cblas_order = CblasColMajor; 00044 CBLAS_TRANSPOSE blas_transa; 00045 #else 00046 char blas_transa; 00047 #endif 00048 FLA_Obj A_copy; 00049 FLA_Trans transa_copy; 00050 00051 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00052 FLA_Gemv_check( transa, alpha, A, x, beta, y ); 00053 00054 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00055 00056 datatype = FLA_Obj_datatype( A ); 00057 00058 m_A = FLA_Obj_length( A ); 00059 n_A = FLA_Obj_width( A ); 00060 ldim_A = FLA_Obj_ldim( A ); 00061 00062 m_x = FLA_Obj_length( x ); 00063 ldim_x = FLA_Obj_ldim( x ); 00064 00065 m_y = FLA_Obj_length( y ); 00066 ldim_y = FLA_Obj_ldim( y ); 00067 00068 inc_x = ( m_x == 1 ? ldim_x : 1 ); 00069 inc_y = ( m_y == 1 ? ldim_y : 1 ); 00070 00071 if ( transa == FLA_CONJ_NO_TRANSPOSE ) 00072 { 00073 FLA_Obj_create_conf_to( FLA_NO_TRANSPOSE, A, &A_copy ); 00074 FLA_Copyt_external( FLA_CONJ_NO_TRANSPOSE, A, A_copy ); 00075 transa_copy = FLA_NO_TRANSPOSE; 00076 00077 ldim_A = FLA_Obj_ldim( A_copy ); 00078 } 00079 else 00080 { 00081 A_copy = A; 00082 transa_copy = transa; 00083 } 00084 00085 FLA_Param_map_to_blas_trans( transa_copy, &blas_transa ); 00086 00087 00088 switch( datatype ){ 00089 00090 case FLA_FLOAT: 00091 { 00092 float *buff_A = ( float * ) FLA_FLOAT_PTR( A ); 00093 float *buff_x = ( float * ) FLA_FLOAT_PTR( x ); 00094 float *buff_y = ( float * ) FLA_FLOAT_PTR( y ); 00095 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha ); 00096 float *buff_beta = ( float * ) FLA_FLOAT_PTR( beta ); 00097 00098 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00099 cblas_sgemv( cblas_order, 00100 blas_transa, 00101 m_A, n_A, 00102 *buff_alpha, 00103 buff_A, ldim_A, 00104 buff_x, inc_x, 00105 *buff_beta, 00106 buff_y, inc_y ); 00107 #else 00108 FLA_C2F( sgemv )( &blas_transa, 00109 &m_A, &n_A, 00110 buff_alpha, 00111 buff_A, &ldim_A, 00112 buff_x, &inc_x, 00113 buff_beta, 00114 buff_y, &inc_y ); 00115 #endif 00116 break; 00117 } 00118 00119 case FLA_DOUBLE: 00120 { 00121 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A ); 00122 double *buff_x = ( double * ) FLA_DOUBLE_PTR( x ); 00123 double *buff_y = ( double * ) FLA_DOUBLE_PTR( y ); 00124 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha ); 00125 double *buff_beta = ( double * ) FLA_DOUBLE_PTR( beta ); 00126 00127 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00128 cblas_dgemv( cblas_order, 00129 blas_transa, 00130 m_A, n_A, 00131 *buff_alpha, 00132 buff_A, ldim_A, 00133 buff_x, inc_x, 00134 *buff_beta, 00135 buff_y, inc_y ); 00136 #else 00137 FLA_C2F( dgemv )( &blas_transa, 00138 &m_A, &n_A, 00139 buff_alpha, 00140 buff_A, &ldim_A, 00141 buff_x, &inc_x, 00142 buff_beta, 00143 buff_y, &inc_y ); 00144 #endif 00145 break; 00146 } 00147 00148 case FLA_COMPLEX: 00149 { 00150 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A_copy ); 00151 scomplex *buff_x = ( scomplex * ) FLA_COMPLEX_PTR( x ); 00152 scomplex *buff_y = ( scomplex * ) FLA_COMPLEX_PTR( y ); 00153 scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha ); 00154 scomplex *buff_beta = ( scomplex * ) FLA_COMPLEX_PTR( beta ); 00155 00156 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00157 cblas_cgemv( cblas_order, 00158 blas_transa, 00159 m_A, n_A, 00160 buff_alpha, 00161 buff_A, ldim_A, 00162 buff_x, inc_x, 00163 buff_beta, 00164 buff_y, inc_y ); 00165 #else 00166 FLA_C2F( cgemv )( &blas_transa, 00167 &m_A, &n_A, 00168 buff_alpha, 00169 buff_A, &ldim_A, 00170 buff_x, &inc_x, 00171 buff_beta, 00172 buff_y, &inc_y ); 00173 #endif 00174 break; 00175 } 00176 00177 case FLA_DOUBLE_COMPLEX: 00178 { 00179 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A_copy ); 00180 dcomplex *buff_x = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( x ); 00181 dcomplex *buff_y = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( y ); 00182 dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha ); 00183 dcomplex *buff_beta = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( beta ); 00184 00185 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00186 cblas_zgemv( cblas_order, 00187 blas_transa, 00188 m_A, n_A, 00189 buff_alpha, 00190 buff_A, ldim_A, 00191 buff_x, inc_x, 00192 buff_beta, 00193 buff_y, inc_y ); 00194 #else 00195 FLA_C2F( zgemv )( &blas_transa, 00196 &m_A, &n_A, 00197 buff_alpha, 00198 buff_A, &ldim_A, 00199 buff_x, &inc_x, 00200 buff_beta, 00201 buff_y, &inc_y ); 00202 #endif 00203 break; 00204 } 00205 00206 } 00207 00208 if ( transa == FLA_CONJ_NO_TRANSPOSE ) 00209 FLA_Obj_free( &A_copy ); 00210 00211 return FLA_SUCCESS; 00212 }
void FLA_F2C() fla_gemv_external_f | ( | F_INT * | trans, | |
F_INT * | alpha, | |||
F_INT * | A, | |||
F_INT * | x, | |||
F_INT * | beta, | |||
F_INT * | y, | |||
F_INT * | IERROR | |||
) |
References FLA_Gemv_external().
00217 { 00218 *IERROR = FLA_Gemv_external( *( ( FLA_Trans * ) trans ), 00219 *( ( FLA_Obj * ) alpha ), 00220 *( ( FLA_Obj * ) A ), 00221 *( ( FLA_Obj * ) x ), 00222 *( ( FLA_Obj * ) beta ), 00223 *( ( FLA_Obj * ) y ) ); 00224 }
void FLA_F2C() fla_gemv_f | ( | F_INT * | transa, | |
F_INT * | alpha, | |||
F_INT * | A, | |||
F_INT * | x, | |||
F_INT * | beta, | |||
F_INT * | y, | |||
F_INT * | IERROR | |||
) |
FLA_Error FLA_Gemv_internal | ( | FLA_Trans | transa, | |
FLA_Obj | alpha, | |||
FLA_Obj | A, | |||
FLA_Obj | x, | |||
FLA_Obj | beta, | |||
FLA_Obj | y, | |||
fla_gemv_t * | cntl | |||
) |
Referenced by FLA_Gemv(), FLA_Gemv_c_blk_var1(), FLA_Gemv_c_blk_var2(), FLA_Gemv_c_blk_var5(), FLA_Gemv_c_blk_var6(), FLA_Gemv_internal(), FLA_Gemv_n_blk_var1(), FLA_Gemv_n_blk_var2(), FLA_Gemv_n_blk_var5(), FLA_Gemv_n_blk_var6(), FLA_Gemv_t_blk_var1(), FLA_Gemv_t_blk_var2(), FLA_Gemv_t_blk_var5(), FLA_Gemv_t_blk_var6(), FLA_Trsv_lc_blk_var1(), FLA_Trsv_lc_blk_var2(), FLA_Trsv_ln_blk_var1(), FLA_Trsv_ln_blk_var2(), FLA_Trsv_lt_blk_var1(), FLA_Trsv_lt_blk_var2(), FLA_Trsv_uc_blk_var1(), FLA_Trsv_uc_blk_var2(), FLA_Trsv_un_blk_var1(), FLA_Trsv_un_blk_var2(), FLA_Trsv_ut_blk_var1(), FLA_Trsv_ut_blk_var2(), and FLASH_Gemv().
00039 { 00040 FLA_Error r_val = FLA_SUCCESS; 00041 00042 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00043 FLA_Gemv_internal_check( transa, alpha, A, x, beta, y, cntl ); 00044 00045 if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER && 00046 FLA_Obj_elemtype( A ) == FLA_MATRIX && 00047 FLA_Cntl_variant( cntl ) == FLA_SUBPROBLEM ) 00048 { 00049 // Recurse 00050 r_val = FLA_Gemv_internal( transa, 00051 alpha, 00052 *FLASH_OBJ_PTR_AT( A ), 00053 *FLASH_OBJ_PTR_AT( x ), 00054 beta, 00055 *FLASH_OBJ_PTR_AT( y ), 00056 flash_gemv_cntl_fm_rp ); 00057 } 00058 else if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER && 00059 FLA_Obj_elemtype( A ) == FLA_SCALAR && 00060 FLASH_Queue_get_enabled( ) ) 00061 { 00062 // Enqueue 00063 ENQUEUE_FLASH_Gemv( transa, alpha, A, x, beta, y, cntl ); 00064 } 00065 else 00066 { 00067 if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER && 00068 FLA_Obj_elemtype( A ) == FLA_SCALAR && 00069 !FLASH_Queue_get_enabled( ) ) 00070 { 00071 // Execute leaf 00072 cntl = flash_gemv_cntl_blas; 00073 } 00074 00075 // Parameter combinations 00076 if ( transa == FLA_NO_TRANSPOSE ) 00077 { 00078 r_val = FLA_Gemv_n( alpha, A, x, beta, y, cntl ); 00079 } 00080 else if ( transa == FLA_TRANSPOSE ) 00081 { 00082 r_val = FLA_Gemv_t( alpha, A, x, beta, y, cntl ); 00083 } 00084 else if ( transa == FLA_CONJ_TRANSPOSE ) 00085 { 00086 r_val = FLA_Gemv_c( alpha, A, x, beta, y, cntl ); 00087 } 00088 } 00089 00090 return r_val; 00091 }
FLA_Error FLA_Gemv_internal_check | ( | FLA_Trans | transa, | |
FLA_Obj | alpha, | |||
FLA_Obj | A, | |||
FLA_Obj | x, | |||
FLA_Obj | beta, | |||
FLA_Obj | y, | |||
fla_gemv_t * | cntl | |||
) |
References FLA_Check_identical_object_elemtype(), FLA_Check_matrix_vector_dims(), and FLA_Check_null_pointer().
Referenced by FLA_Gemv_internal().
00036 { 00037 FLA_Error e_val; 00038 00039 // Abort if the control structure is NULL. 00040 e_val = FLA_Check_null_pointer( ( void* ) cntl ); 00041 FLA_Check_error_code( e_val ); 00042 00043 // Verify that the object element types are identical. 00044 e_val = FLA_Check_identical_object_elemtype( A, x ); 00045 FLA_Check_error_code( e_val ); 00046 00047 e_val = FLA_Check_identical_object_elemtype( A, y ); 00048 FLA_Check_error_code( e_val ); 00049 00050 // Verify conformality between all the objects. This check works regardless 00051 // of whether the element type is FLA_MATRIX or FLA_SCALAR because the 00052 // element length and width are used instead of scalar length and width. 00053 e_val = FLA_Check_matrix_vector_dims( transa, A, x, y ); 00054 FLA_Check_error_code( e_val ); 00055 00056 return FLA_SUCCESS; 00057 }
FLA_Error FLA_Gemv_n_task | ( | FLA_Obj | alpha, | |
FLA_Obj | A, | |||
FLA_Obj | x, | |||
FLA_Obj | beta, | |||
FLA_Obj | y, | |||
fla_gemv_t * | cntl | |||
) |
References FLA_Gemv_external().
Referenced by FLA_Gemv_n().
00046 { 00047 return FLA_Gemv_external( FLA_NO_TRANSPOSE, alpha, A, x, beta, y ); 00048 }
FLA_Error FLA_Gemv_t_task | ( | FLA_Obj | alpha, | |
FLA_Obj | A, | |||
FLA_Obj | x, | |||
FLA_Obj | beta, | |||
FLA_Obj | y, | |||
fla_gemv_t * | cntl | |||
) |
References FLA_Gemv_external().
Referenced by FLA_Gemv_t().
00051 { 00052 return FLA_Gemv_external( FLA_TRANSPOSE, alpha, A, x, beta, y ); 00053 }
FLA_Error FLA_Gemv_task | ( | FLA_Trans | transa, | |
FLA_Obj | alpha, | |||
FLA_Obj | A, | |||
FLA_Obj | x, | |||
FLA_Obj | beta, | |||
FLA_Obj | y, | |||
fla_gemv_t * | cntl | |||
) |
References FLA_Gemv_external().
Referenced by FLASH_Queue_exec_task().
00036 { 00037 return FLA_Gemv_external( transa, alpha, A, x, beta, y ); 00038 }
FLA_Error FLA_Gemvc | ( | FLA_Trans | transa, | |
FLA_Conj | conjx, | |||
FLA_Obj | alpha, | |||
FLA_Obj | A, | |||
FLA_Obj | x, | |||
FLA_Obj | beta, | |||
FLA_Obj | y | |||
) |
References FLA_Gemvc_external().
00036 { 00037 return FLA_Gemvc_external( transa, conjx, alpha, A, x, beta, y ); 00038 }
FLA_Error FLA_Gemvc_check | ( | FLA_Trans | transa, | |
FLA_Conj | conjx, | |||
FLA_Obj | alpha, | |||
FLA_Obj | A, | |||
FLA_Obj | x, | |||
FLA_Obj | beta, | |||
FLA_Obj | y | |||
) |
References FLA_Check_consistent_object_datatype(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_scalar(), FLA_Check_if_vector(), FLA_Check_matrix_vector_dims(), FLA_Check_nonconstant_object(), FLA_Check_valid_conj(), and FLA_Check_valid_trans().
Referenced by FLA_Gemvc_external().
00036 { 00037 FLA_Error e_val; 00038 00039 e_val = FLA_Check_valid_trans( transa ); 00040 FLA_Check_error_code( e_val ); 00041 00042 e_val = FLA_Check_valid_conj( conjx ); 00043 FLA_Check_error_code( e_val ); 00044 00045 e_val = FLA_Check_floating_object( A ); 00046 FLA_Check_error_code( e_val ); 00047 00048 e_val = FLA_Check_nonconstant_object( A ); 00049 FLA_Check_error_code( e_val ); 00050 00051 e_val = FLA_Check_identical_object_datatype( A, x ); 00052 FLA_Check_error_code( e_val ); 00053 00054 e_val = FLA_Check_identical_object_datatype( A, y ); 00055 FLA_Check_error_code( e_val ); 00056 00057 e_val = FLA_Check_consistent_object_datatype( A, alpha ); 00058 FLA_Check_error_code( e_val ); 00059 00060 e_val = FLA_Check_consistent_object_datatype( A, beta ); 00061 FLA_Check_error_code( e_val ); 00062 00063 e_val = FLA_Check_if_vector( x ); 00064 FLA_Check_error_code( e_val ); 00065 00066 e_val = FLA_Check_if_vector( y ); 00067 FLA_Check_error_code( e_val ); 00068 00069 e_val = FLA_Check_if_scalar( alpha ); 00070 FLA_Check_error_code( e_val ); 00071 00072 e_val = FLA_Check_if_scalar( beta ); 00073 FLA_Check_error_code( e_val ); 00074 00075 e_val = FLA_Check_matrix_vector_dims( transa, A, x, y ); 00076 FLA_Check_error_code( e_val ); 00077 00078 return FLA_SUCCESS; 00079 }
FLA_Error FLA_Gemvc_external | ( | FLA_Trans | transa, | |
FLA_Conj | conjx, | |||
FLA_Obj | alpha, | |||
FLA_Obj | A, | |||
FLA_Obj | x, | |||
FLA_Obj | beta, | |||
FLA_Obj | y | |||
) |
References cblas_cgemv(), cblas_dgemv(), cblas_sgemv(), cblas_zgemv(), CblasColMajor, cgemv(), dgemv(), FLA_Check_error_level(), FLA_Copyt_external(), FLA_Gemvc_check(), FLA_Obj_create_conf_to(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Obj_width(), FLA_Param_map_to_blas_trans(), sgemv(), and zgemv().
Referenced by FLA_Apply_househ2_UT(), FLA_Chol_l_unb_var2(), FLA_Chol_u_unb_var2(), FLA_Gemm_hh_unb_var1(), FLA_Gemm_hh_unb_var2(), FLA_Gemm_hh_unb_var3(), FLA_Gemm_hh_unb_var4(), FLA_Gemm_hn_unb_var1(), FLA_Gemm_hn_unb_var2(), FLA_Gemm_ht_unb_var1(), FLA_Gemm_ht_unb_var2(), FLA_Gemm_nh_unb_var3(), FLA_Gemm_nh_unb_var4(), FLA_Gemvc(), fla_gemvc_external_f(), FLA_Hemm_ll_unb_var2(), FLA_Hemm_ll_unb_var3(), FLA_Hemm_ll_unb_var5(), FLA_Hemm_ll_unb_var6(), FLA_Hemm_lu_unb_var1(), FLA_Hemm_lu_unb_var2(), FLA_Hemm_lu_unb_var6(), FLA_Hemm_lu_unb_var7(), FLA_Hemm_rl_unb_var1(), FLA_Hemm_rl_unb_var2(), FLA_Hemm_rl_unb_var6(), FLA_Hemm_rl_unb_var7(), FLA_Hemm_ru_unb_var2(), FLA_Hemm_ru_unb_var3(), FLA_Hemm_ru_unb_var5(), FLA_Hemm_ru_unb_var6(), FLA_Her2k_lh_unb_var1(), FLA_Her2k_lh_unb_var2(), FLA_Her2k_lh_unb_var3(), FLA_Her2k_lh_unb_var6(), FLA_Her2k_lh_unb_var7(), FLA_Her2k_lh_unb_var8(), FLA_Her2k_ln_unb_var2(), FLA_Her2k_ln_unb_var3(), FLA_Her2k_ln_unb_var4(), FLA_Her2k_ln_unb_var5(), FLA_Her2k_ln_unb_var6(), FLA_Her2k_ln_unb_var7(), FLA_Her2k_uh_unb_var1(), FLA_Her2k_uh_unb_var2(), FLA_Her2k_uh_unb_var3(), FLA_Her2k_uh_unb_var6(), FLA_Her2k_uh_unb_var7(), FLA_Her2k_uh_unb_var8(), FLA_Her2k_un_unb_var2(), FLA_Her2k_un_unb_var3(), FLA_Her2k_un_unb_var4(), FLA_Her2k_un_unb_var5(), FLA_Her2k_un_unb_var6(), FLA_Her2k_un_unb_var7(), FLA_Herk_lh_unb_var1(), FLA_Herk_lh_unb_var4(), FLA_Herk_ln_unb_var2(), FLA_Herk_ln_unb_var3(), FLA_Herk_uh_unb_var1(), FLA_Herk_uh_unb_var3(), FLA_Herk_un_unb_var2(), FLA_Herk_un_unb_var4(), FLA_Trmm_llh_unb_var1(), FLA_Trmm_luh_unb_var1(), FLA_Trmm_rlh_unb_var1(), FLA_Trmm_ruh_unb_var1(), FLA_Trsm_llh_unb_var1(), FLA_Trsm_luh_unb_var1(), FLA_Trsm_rlh_unb_var1(), FLA_Trsm_ruh_unb_var1(), FLA_Ttmm_l_unb_var2(), and FLA_Ttmm_u_unb_var2().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, n_A, ldim_A; 00039 int m_x, ldim_x; 00040 int m_y, ldim_y; 00041 int inc_x, inc_y; 00042 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00043 CBLAS_ORDER cblas_order = CblasColMajor; 00044 CBLAS_TRANSPOSE blas_transa; 00045 #else 00046 char blas_transa; 00047 #endif 00048 FLA_Obj A_copy; 00049 FLA_Obj x_copy; 00050 FLA_Trans transa_copy; 00051 00052 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00053 FLA_Gemvc_check( transa, conjx, alpha, A, x, beta, y ); 00054 00055 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00056 00057 datatype = FLA_Obj_datatype( A ); 00058 00059 m_A = FLA_Obj_length( A ); 00060 n_A = FLA_Obj_width( A ); 00061 ldim_A = FLA_Obj_ldim( A ); 00062 00063 m_x = FLA_Obj_length( x ); 00064 ldim_x = FLA_Obj_ldim( x ); 00065 00066 m_y = FLA_Obj_length( y ); 00067 ldim_y = FLA_Obj_ldim( y ); 00068 00069 inc_x = ( m_x == 1 ? ldim_x : 1 ); 00070 inc_y = ( m_y == 1 ? ldim_y : 1 ); 00071 00072 if ( transa == FLA_CONJ_NO_TRANSPOSE ) 00073 { 00074 FLA_Obj_create_conf_to( FLA_NO_TRANSPOSE, A, &A_copy ); 00075 FLA_Copyt_external( FLA_CONJ_NO_TRANSPOSE, A, A_copy ); 00076 transa_copy = FLA_NO_TRANSPOSE; 00077 00078 ldim_A = FLA_Obj_ldim( A_copy ); 00079 } 00080 else 00081 { 00082 A_copy = A; 00083 transa_copy = transa; 00084 } 00085 00086 if ( conjx == FLA_CONJUGATE ) 00087 { 00088 FLA_Obj_create_conf_to( FLA_NO_TRANSPOSE, x, &x_copy ); 00089 FLA_Copyt_external( FLA_CONJ_NO_TRANSPOSE, x, x_copy ); 00090 00091 m_x = FLA_Obj_length( x_copy ); 00092 ldim_x = FLA_Obj_ldim( x_copy ); 00093 inc_x = ( m_x == 1 ? ldim_x : 1 ); 00094 } 00095 else 00096 { 00097 x_copy = x; 00098 } 00099 00100 FLA_Param_map_to_blas_trans( transa_copy, &blas_transa ); 00101 00102 00103 switch( datatype ){ 00104 00105 case FLA_FLOAT: 00106 { 00107 float *buff_A = ( float * ) FLA_FLOAT_PTR( A ); 00108 float *buff_x = ( float * ) FLA_FLOAT_PTR( x ); 00109 float *buff_y = ( float * ) FLA_FLOAT_PTR( y ); 00110 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha ); 00111 float *buff_beta = ( float * ) FLA_FLOAT_PTR( beta ); 00112 00113 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00114 cblas_sgemv( cblas_order, 00115 blas_transa, 00116 m_A, n_A, 00117 *buff_alpha, 00118 buff_A, ldim_A, 00119 buff_x, inc_x, 00120 *buff_beta, 00121 buff_y, inc_y ); 00122 #else 00123 FLA_C2F( sgemv )( &blas_transa, 00124 &m_A, &n_A, 00125 buff_alpha, 00126 buff_A, &ldim_A, 00127 buff_x, &inc_x, 00128 buff_beta, 00129 buff_y, &inc_y ); 00130 #endif 00131 break; 00132 } 00133 00134 case FLA_DOUBLE: 00135 { 00136 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A ); 00137 double *buff_x = ( double * ) FLA_DOUBLE_PTR( x ); 00138 double *buff_y = ( double * ) FLA_DOUBLE_PTR( y ); 00139 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha ); 00140 double *buff_beta = ( double * ) FLA_DOUBLE_PTR( beta ); 00141 00142 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00143 cblas_dgemv( cblas_order, 00144 blas_transa, 00145 m_A, n_A, 00146 *buff_alpha, 00147 buff_A, ldim_A, 00148 buff_x, inc_x, 00149 *buff_beta, 00150 buff_y, inc_y ); 00151 #else 00152 FLA_C2F( dgemv )( &blas_transa, 00153 &m_A, &n_A, 00154 buff_alpha, 00155 buff_A, &ldim_A, 00156 buff_x, &inc_x, 00157 buff_beta, 00158 buff_y, &inc_y ); 00159 #endif 00160 break; 00161 } 00162 00163 case FLA_COMPLEX: 00164 { 00165 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A_copy ); 00166 scomplex *buff_x = ( scomplex * ) FLA_COMPLEX_PTR( x_copy ); 00167 scomplex *buff_y = ( scomplex * ) FLA_COMPLEX_PTR( y ); 00168 scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha ); 00169 scomplex *buff_beta = ( scomplex * ) FLA_COMPLEX_PTR( beta ); 00170 00171 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00172 cblas_cgemv( cblas_order, 00173 blas_transa, 00174 m_A, n_A, 00175 buff_alpha, 00176 buff_A, ldim_A, 00177 buff_x, inc_x, 00178 buff_beta, 00179 buff_y, inc_y ); 00180 #else 00181 FLA_C2F( cgemv )( &blas_transa, 00182 &m_A, &n_A, 00183 buff_alpha, 00184 buff_A, &ldim_A, 00185 buff_x, &inc_x, 00186 buff_beta, 00187 buff_y, &inc_y ); 00188 #endif 00189 break; 00190 } 00191 00192 case FLA_DOUBLE_COMPLEX: 00193 { 00194 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A_copy ); 00195 dcomplex *buff_x = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( x_copy ); 00196 dcomplex *buff_y = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( y ); 00197 dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha ); 00198 dcomplex *buff_beta = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( beta ); 00199 00200 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00201 cblas_zgemv( cblas_order, 00202 blas_transa, 00203 m_A, n_A, 00204 buff_alpha, 00205 buff_A, ldim_A, 00206 buff_x, inc_x, 00207 buff_beta, 00208 buff_y, inc_y ); 00209 #else 00210 FLA_C2F( zgemv )( &blas_transa, 00211 &m_A, &n_A, 00212 buff_alpha, 00213 buff_A, &ldim_A, 00214 buff_x, &inc_x, 00215 buff_beta, 00216 buff_y, &inc_y ); 00217 #endif 00218 break; 00219 } 00220 00221 } 00222 00223 if ( transa == FLA_CONJ_NO_TRANSPOSE ) 00224 FLA_Obj_free( &A_copy ); 00225 00226 if ( conjx == FLA_CONJUGATE ) 00227 FLA_Obj_free( &x_copy ); 00228 00229 return FLA_SUCCESS; 00230 }
void FLA_F2C() fla_gemvc_external_f | ( | F_INT * | transa, | |
F_INT * | conjx, | |||
F_INT * | alpha, | |||
F_INT * | A, | |||
F_INT * | x, | |||
F_INT * | beta, | |||
F_INT * | y, | |||
F_INT * | IERROR | |||
) |
References FLA_Gemvc_external().
00235 { 00236 *IERROR = FLA_Gemvc_external( *( ( FLA_Trans * ) trans ), 00237 *( ( FLA_Conj * ) conj ), 00238 *( ( FLA_Obj * ) alpha ), 00239 *( ( FLA_Obj * ) A ), 00240 *( ( FLA_Obj * ) x ), 00241 *( ( FLA_Obj * ) beta ), 00242 *( ( FLA_Obj * ) y ) ); 00243 }
References FLA_Check_consistent_object_datatype(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_scalar(), FLA_Check_if_vector(), FLA_Check_matrix_vector_dims(), and FLA_Check_nonconstant_object().
Referenced by FLA_Ger_external().
00036 { 00037 FLA_Error e_val; 00038 00039 e_val = FLA_Check_floating_object( A ); 00040 FLA_Check_error_code( e_val ); 00041 00042 e_val = FLA_Check_nonconstant_object( A ); 00043 FLA_Check_error_code( e_val ); 00044 00045 e_val = FLA_Check_identical_object_datatype( A, x ); 00046 FLA_Check_error_code( e_val ); 00047 00048 e_val = FLA_Check_identical_object_datatype( A, y ); 00049 FLA_Check_error_code( e_val ); 00050 00051 e_val = FLA_Check_consistent_object_datatype( A, alpha ); 00052 FLA_Check_error_code( e_val ); 00053 00054 e_val = FLA_Check_if_vector( x ); 00055 FLA_Check_error_code( e_val ); 00056 00057 e_val = FLA_Check_if_vector( y ); 00058 FLA_Check_error_code( e_val ); 00059 00060 e_val = FLA_Check_if_scalar( alpha ); 00061 FLA_Check_error_code( e_val ); 00062 00063 e_val = FLA_Check_matrix_vector_dims( FLA_TRANSPOSE, A, x, y ); 00064 FLA_Check_error_code( e_val ); 00065 00066 return FLA_SUCCESS; 00067 }
References cblas_cgeru(), cblas_dger(), cblas_sger(), cblas_zgeru(), CblasColMajor, cgeru(), dger(), FLA_Check_error_level(), FLA_Ger_check(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Obj_width(), sger(), and zgeru().
Referenced by FLA_Apply_househ2_UT(), FLA_Gemm_nn_unb_var5(), FLA_Gemm_nn_unb_var6(), FLA_Gemm_nt_unb_var5(), FLA_Gemm_nt_unb_var6(), FLA_Gemm_th_unb_var5(), FLA_Gemm_th_unb_var6(), FLA_Gemm_tn_unb_var5(), FLA_Gemm_tn_unb_var6(), FLA_Gemm_tt_unb_var5(), FLA_Gemm_tt_unb_var6(), FLA_Ger(), fla_ger_external_f(), FLA_Hemm_ll_unb_var3(), FLA_Hemm_ll_unb_var4(), FLA_Hemm_ll_unb_var5(), FLA_Hemm_ll_unb_var8(), FLA_Hemm_lu_unb_var1(), FLA_Hemm_lu_unb_var4(), FLA_Hemm_lu_unb_var7(), FLA_Hemm_lu_unb_var8(), FLA_Hemm_rl_unb_var1(), FLA_Hemm_rl_unb_var4(), FLA_Hemm_rl_unb_var7(), FLA_Hemm_rl_unb_var8(), FLA_Hemm_ru_unb_var3(), FLA_Hemm_ru_unb_var4(), FLA_Hemm_ru_unb_var5(), FLA_Hemm_ru_unb_var8(), FLA_LU_nopiv_unb_var5(), FLA_LU_piv_unb_var5(), FLA_Symm_ll_unb_var1(), FLA_Symm_ll_unb_var3(), FLA_Symm_ll_unb_var4(), FLA_Symm_ll_unb_var5(), FLA_Symm_ll_unb_var7(), FLA_Symm_ll_unb_var8(), FLA_Symm_lu_unb_var1(), FLA_Symm_lu_unb_var3(), FLA_Symm_lu_unb_var4(), FLA_Symm_lu_unb_var5(), FLA_Symm_lu_unb_var7(), FLA_Symm_lu_unb_var8(), FLA_Symm_rl_unb_var1(), FLA_Symm_rl_unb_var4(), FLA_Symm_rl_unb_var7(), FLA_Symm_rl_unb_var8(), FLA_Symm_ru_unb_var3(), FLA_Symm_ru_unb_var4(), FLA_Symm_ru_unb_var5(), FLA_Symm_ru_unb_var8(), FLA_Trinv_l_unb_var3(), FLA_Trinv_l_unb_var4(), FLA_Trinv_u_unb_var3(), FLA_Trinv_u_unb_var4(), FLA_Trmm_lln_unb_var2(), FLA_Trmm_llt_unb_var2(), FLA_Trmm_lun_unb_var2(), FLA_Trmm_lut_unb_var2(), FLA_Trmm_rln_unb_var2(), FLA_Trmm_rlt_unb_var2(), FLA_Trmm_run_unb_var2(), FLA_Trmm_rut_unb_var2(), FLA_Trsm_lln_unb_var2(), FLA_Trsm_llt_unb_var2(), FLA_Trsm_lun_unb_var2(), FLA_Trsm_lut_unb_var2(), FLA_Trsm_rln_unb_var2(), FLA_Trsm_rlt_unb_var2(), FLA_Trsm_run_unb_var2(), and FLA_Trsm_rut_unb_var2().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, n_A, ldim_A; 00039 int m_x, ldim_x, inc_x; 00040 int m_y, ldim_y, inc_y; 00041 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00042 CBLAS_ORDER cblas_order = CblasColMajor; 00043 #endif 00044 00045 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00046 FLA_Ger_check( alpha, x, y, A ); 00047 00048 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00049 00050 datatype = FLA_Obj_datatype( A ); 00051 00052 m_A = FLA_Obj_length( A ); 00053 n_A = FLA_Obj_width( A ); 00054 ldim_A = FLA_Obj_ldim( A ); 00055 00056 m_x = FLA_Obj_length( x ); 00057 ldim_x = FLA_Obj_ldim( x ); 00058 00059 m_y = FLA_Obj_length( y ); 00060 ldim_y = FLA_Obj_ldim( y ); 00061 00062 inc_x = ( m_x == 1 ? ldim_x : 1 ); 00063 inc_y = ( m_y == 1 ? ldim_y : 1 ); 00064 00065 00066 switch( datatype ){ 00067 00068 case FLA_FLOAT: 00069 { 00070 float *buff_A = ( float * ) FLA_FLOAT_PTR( A ); 00071 float *buff_x = ( float * ) FLA_FLOAT_PTR( x ); 00072 float *buff_y = ( float * ) FLA_FLOAT_PTR( y ); 00073 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha ); 00074 00075 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00076 cblas_sger( cblas_order, 00077 m_A, n_A, 00078 *buff_alpha, 00079 buff_x, inc_x, 00080 buff_y, inc_y, 00081 buff_A, ldim_A ); 00082 #else 00083 FLA_C2F( sger )( &m_A, &n_A, 00084 buff_alpha, 00085 buff_x, &inc_x, 00086 buff_y, &inc_y, 00087 buff_A, &ldim_A ); 00088 #endif 00089 break; 00090 } 00091 00092 case FLA_DOUBLE: 00093 { 00094 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A ); 00095 double *buff_x = ( double * ) FLA_DOUBLE_PTR( x ); 00096 double *buff_y = ( double * ) FLA_DOUBLE_PTR( y ); 00097 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha ); 00098 00099 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00100 cblas_dger( cblas_order, 00101 m_A, n_A, 00102 *buff_alpha, 00103 buff_x, inc_x, 00104 buff_y, inc_y, 00105 buff_A, ldim_A ); 00106 #else 00107 FLA_C2F( dger )( &m_A, &n_A, 00108 buff_alpha, 00109 buff_x, &inc_x, 00110 buff_y, &inc_y, 00111 buff_A, &ldim_A ); 00112 #endif 00113 break; 00114 } 00115 00116 case FLA_COMPLEX: 00117 { 00118 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A ); 00119 scomplex *buff_x = ( scomplex * ) FLA_COMPLEX_PTR( x ); 00120 scomplex *buff_y = ( scomplex * ) FLA_COMPLEX_PTR( y ); 00121 scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha ); 00122 00123 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00124 cblas_cgeru( cblas_order, 00125 m_A, n_A, 00126 buff_alpha, 00127 buff_x, inc_x, 00128 buff_y, inc_y, 00129 buff_A, ldim_A ); 00130 #else 00131 FLA_C2F( cgeru )( &m_A, &n_A, 00132 buff_alpha, 00133 buff_x, &inc_x, 00134 buff_y, &inc_y, 00135 buff_A, &ldim_A ); 00136 #endif 00137 break; 00138 } 00139 00140 case FLA_DOUBLE_COMPLEX: 00141 { 00142 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A ); 00143 dcomplex *buff_x = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( x ); 00144 dcomplex *buff_y = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( y ); 00145 dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha ); 00146 00147 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00148 cblas_zgeru( cblas_order, 00149 m_A, n_A, 00150 buff_alpha, 00151 buff_x, inc_x, 00152 buff_y, inc_y, 00153 buff_A, ldim_A ); 00154 #else 00155 FLA_C2F( zgeru )( &m_A, &n_A, 00156 buff_alpha, 00157 buff_x, &inc_x, 00158 buff_y, &inc_y, 00159 buff_A, &ldim_A ); 00160 #endif 00161 break; 00162 } 00163 00164 } 00165 00166 return FLA_SUCCESS; 00167 }
void FLA_F2C() fla_ger_f | ( | F_INT * | alpha, | |
F_INT * | x, | |||
F_INT * | y, | |||
F_INT * | A, | |||
F_INT * | IERROR | |||
) |
FLA_Error FLA_Gerc | ( | FLA_Conj | conjx, | |
FLA_Conj | conjy, | |||
FLA_Obj | alpha, | |||
FLA_Obj | x, | |||
FLA_Obj | y, | |||
FLA_Obj | A | |||
) |
References FLA_Gerc_external().
00036 { 00037 return FLA_Gerc_external( conjx, conjy, alpha, x, y, A ); 00038 }
FLA_Error FLA_Gerc_check | ( | FLA_Conj | conjx, | |
FLA_Conj | conjy, | |||
FLA_Obj | alpha, | |||
FLA_Obj | x, | |||
FLA_Obj | y, | |||
FLA_Obj | A | |||
) |
References FLA_Check_consistent_object_datatype(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_scalar(), FLA_Check_if_vector(), FLA_Check_matrix_vector_dims(), FLA_Check_nonconstant_object(), and FLA_Check_valid_conj().
Referenced by FLA_Gerc_external().
00036 { 00037 FLA_Error e_val; 00038 00039 e_val = FLA_Check_valid_conj( conjx ); 00040 FLA_Check_error_code( e_val ); 00041 00042 e_val = FLA_Check_valid_conj( conjy ); 00043 FLA_Check_error_code( e_val ); 00044 00045 e_val = FLA_Check_floating_object( A ); 00046 FLA_Check_error_code( e_val ); 00047 00048 e_val = FLA_Check_nonconstant_object( A ); 00049 FLA_Check_error_code( e_val ); 00050 00051 e_val = FLA_Check_identical_object_datatype( A, x ); 00052 FLA_Check_error_code( e_val ); 00053 00054 e_val = FLA_Check_identical_object_datatype( A, y ); 00055 FLA_Check_error_code( e_val ); 00056 00057 e_val = FLA_Check_consistent_object_datatype( A, alpha ); 00058 FLA_Check_error_code( e_val ); 00059 00060 e_val = FLA_Check_if_vector( x ); 00061 FLA_Check_error_code( e_val ); 00062 00063 e_val = FLA_Check_if_vector( y ); 00064 FLA_Check_error_code( e_val ); 00065 00066 e_val = FLA_Check_if_scalar( alpha ); 00067 FLA_Check_error_code( e_val ); 00068 00069 e_val = FLA_Check_matrix_vector_dims( FLA_TRANSPOSE, A, x, y ); 00070 FLA_Check_error_code( e_val ); 00071 00072 return FLA_SUCCESS; 00073 }
FLA_Error FLA_Gerc_external | ( | FLA_Conj | conjx, | |
FLA_Conj | conjy, | |||
FLA_Obj | alpha, | |||
FLA_Obj | x, | |||
FLA_Obj | y, | |||
FLA_Obj | A | |||
) |
References cblas_cgerc(), cblas_cgeru(), cblas_dger(), cblas_sger(), cblas_zgerc(), cblas_zgeru(), CblasColMajor, cgerc(), cgeru(), dger(), FLA_Check_error_level(), FLA_Copyt_external(), FLA_Gerc_check(), FLA_Obj_create_conf_to(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Obj_width(), sger(), zgerc(), and zgeru().
Referenced by FLA_Gemm_hh_unb_var5(), FLA_Gemm_hh_unb_var6(), FLA_Gemm_hn_unb_var5(), FLA_Gemm_hn_unb_var6(), FLA_Gemm_ht_unb_var5(), FLA_Gemm_ht_unb_var6(), FLA_Gemm_nh_unb_var5(), FLA_Gemm_nh_unb_var6(), FLA_Gerc(), fla_gerc_external_f(), FLA_Hemm_ll_unb_var1(), FLA_Hemm_ll_unb_var4(), FLA_Hemm_ll_unb_var7(), FLA_Hemm_ll_unb_var8(), FLA_Hemm_lu_unb_var3(), FLA_Hemm_lu_unb_var4(), FLA_Hemm_lu_unb_var5(), FLA_Hemm_lu_unb_var8(), FLA_Hemm_rl_unb_var3(), FLA_Hemm_rl_unb_var4(), FLA_Hemm_rl_unb_var5(), FLA_Hemm_rl_unb_var8(), FLA_Hemm_ru_unb_var1(), FLA_Hemm_ru_unb_var4(), FLA_Hemm_ru_unb_var7(), FLA_Hemm_ru_unb_var8(), FLA_Symm_rl_unb_var3(), FLA_Symm_rl_unb_var4(), FLA_Symm_rl_unb_var5(), FLA_Symm_rl_unb_var8(), FLA_Symm_ru_unb_var1(), FLA_Symm_ru_unb_var4(), FLA_Symm_ru_unb_var7(), FLA_Symm_ru_unb_var8(), FLA_Trmm_llh_unb_var2(), FLA_Trmm_luh_unb_var2(), FLA_Trmm_rlh_unb_var2(), FLA_Trmm_ruh_unb_var2(), FLA_Trsm_llh_unb_var2(), FLA_Trsm_luh_unb_var2(), FLA_Trsm_rlh_unb_var2(), and FLA_Trsm_ruh_unb_var2().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, n_A, ldim_A; 00039 int m_x, inc_x, ldim_x; 00040 int m_y, inc_y, ldim_y; 00041 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00042 CBLAS_ORDER cblas_order = CblasColMajor; 00043 #endif 00044 FLA_Obj x_copy; 00045 00046 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00047 FLA_Gerc_check( conjx, conjy, alpha, x, y, A ); 00048 00049 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00050 00051 datatype = FLA_Obj_datatype( A ); 00052 00053 m_A = FLA_Obj_length( A ); 00054 n_A = FLA_Obj_width( A ); 00055 ldim_A = FLA_Obj_ldim( A ); 00056 00057 m_x = FLA_Obj_length( x ); 00058 ldim_x = FLA_Obj_ldim( x ); 00059 00060 m_y = FLA_Obj_length( y ); 00061 ldim_y = FLA_Obj_ldim( y ); 00062 00063 inc_x = ( m_x == 1 ? ldim_x : 1 ); 00064 inc_y = ( m_y == 1 ? ldim_y : 1 ); 00065 00066 if ( conjx == FLA_CONJUGATE ) 00067 { 00068 FLA_Obj_create_conf_to( FLA_NO_TRANSPOSE, x, &x_copy ); 00069 FLA_Copyt_external( FLA_CONJ_NO_TRANSPOSE, x, x_copy ); 00070 00071 m_x = FLA_Obj_length( x_copy ); 00072 ldim_x = FLA_Obj_ldim( x_copy ); 00073 inc_x = ( m_x == 1 ? ldim_x : 1 ); 00074 } 00075 else 00076 { 00077 x_copy = x; 00078 } 00079 00080 00081 switch( datatype ){ 00082 00083 case FLA_FLOAT: 00084 { 00085 float *buff_A = ( float * ) FLA_FLOAT_PTR( A ); 00086 float *buff_x = ( float * ) FLA_FLOAT_PTR( x ); 00087 float *buff_y = ( float * ) FLA_FLOAT_PTR( y ); 00088 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha ); 00089 00090 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00091 cblas_sger( cblas_order, 00092 m_A, n_A, 00093 *buff_alpha, 00094 buff_x, inc_x, 00095 buff_y, inc_y, 00096 buff_A, ldim_A ); 00097 #else 00098 FLA_C2F( sger )( &m_A, &n_A, 00099 buff_alpha, 00100 buff_x, &inc_x, 00101 buff_y, &inc_y, 00102 buff_A, &ldim_A ); 00103 #endif 00104 break; 00105 } 00106 00107 case FLA_DOUBLE: 00108 { 00109 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A ); 00110 double *buff_x = ( double * ) FLA_DOUBLE_PTR( x ); 00111 double *buff_y = ( double * ) FLA_DOUBLE_PTR( y ); 00112 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha ); 00113 00114 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00115 cblas_dger( cblas_order, 00116 m_A, n_A, 00117 *buff_alpha, 00118 buff_x, inc_x, 00119 buff_y, inc_y, 00120 buff_A, ldim_A ); 00121 #else 00122 FLA_C2F( dger )( &m_A, &n_A, 00123 buff_alpha, 00124 buff_x, &inc_x, 00125 buff_y, &inc_y, 00126 buff_A, &ldim_A ); 00127 #endif 00128 break; 00129 } 00130 00131 case FLA_COMPLEX: 00132 { 00133 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A ); 00134 scomplex *buff_x = ( scomplex * ) FLA_COMPLEX_PTR( x_copy ); 00135 scomplex *buff_y = ( scomplex * ) FLA_COMPLEX_PTR( y ); 00136 scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha ); 00137 00138 if ( conjy == FLA_NO_CONJUGATE ) 00139 { 00140 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00141 cblas_cgeru( cblas_order, 00142 m_A, n_A, 00143 buff_alpha, 00144 buff_x, inc_x, 00145 buff_y, inc_y, 00146 buff_A, ldim_A ); 00147 #else 00148 FLA_C2F( cgeru )( &m_A, &n_A, 00149 buff_alpha, 00150 buff_x, &inc_x, 00151 buff_y, &inc_y, 00152 buff_A, &ldim_A ); 00153 #endif 00154 } 00155 else 00156 { 00157 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00158 cblas_cgerc( cblas_order, 00159 m_A, n_A, 00160 buff_alpha, 00161 buff_x, inc_x, 00162 buff_y, inc_y, 00163 buff_A, ldim_A ); 00164 #else 00165 FLA_C2F( cgerc )( &m_A, &n_A, 00166 buff_alpha, 00167 buff_x, &inc_x, 00168 buff_y, &inc_y, 00169 buff_A, &ldim_A ); 00170 #endif 00171 } 00172 00173 break; 00174 } 00175 00176 case FLA_DOUBLE_COMPLEX: 00177 { 00178 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A ); 00179 dcomplex *buff_x = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( x_copy ); 00180 dcomplex *buff_y = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( y ); 00181 dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha ); 00182 00183 if ( conjy == FLA_NO_CONJUGATE ) 00184 { 00185 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00186 cblas_zgeru( cblas_order, 00187 m_A, n_A, 00188 buff_alpha, 00189 buff_x, inc_x, 00190 buff_y, inc_y, 00191 buff_A, ldim_A ); 00192 #else 00193 FLA_C2F( zgeru )( &m_A, &n_A, 00194 buff_alpha, 00195 buff_x, &inc_x, 00196 buff_y, &inc_y, 00197 buff_A, &ldim_A ); 00198 #endif 00199 } 00200 else 00201 { 00202 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00203 cblas_zgerc( cblas_order, 00204 m_A, n_A, 00205 buff_alpha, 00206 buff_x, inc_x, 00207 buff_y, inc_y, 00208 buff_A, ldim_A ); 00209 #else 00210 FLA_C2F( zgerc )( &m_A, &n_A, 00211 buff_alpha, 00212 buff_x, &inc_x, 00213 buff_y, &inc_y, 00214 buff_A, &ldim_A ); 00215 #endif 00216 } 00217 00218 break; 00219 } 00220 00221 } 00222 00223 if ( conjx == FLA_CONJUGATE ) 00224 FLA_Obj_free( &x_copy ); 00225 00226 return FLA_SUCCESS; 00227 }
void FLA_F2C() fla_gerc_external_f | ( | F_INT * | conjx, | |
F_INT * | conjy, | |||
F_INT * | alpha, | |||
F_INT * | x, | |||
F_INT * | y, | |||
F_INT * | A, | |||
F_INT * | IERROR | |||
) |
References FLA_Gerc_external().
00232 { 00233 *IERROR = FLA_Gerc_external( *( ( FLA_Conj * ) conjx ), 00234 *( ( FLA_Conj * ) conjy ), 00235 *( ( FLA_Obj * ) alpha ), 00236 *( ( FLA_Obj * ) x ), 00237 *( ( FLA_Obj * ) y ), 00238 *( ( FLA_Obj * ) A ) ); 00239 }
References FLA_Hemv_external().
00036 { 00037 return FLA_Hemv_external( uplo, alpha, A, x, beta, y ); 00038 }
FLA_Error FLA_Hemv_check | ( | FLA_Uplo | uplo, | |
FLA_Obj | alpha, | |||
FLA_Obj | A, | |||
FLA_Obj | x, | |||
FLA_Obj | beta, | |||
FLA_Obj | y | |||
) |
References FLA_Check_complex_object(), FLA_Check_consistent_object_datatype(), FLA_Check_identical_object_datatype(), FLA_Check_if_scalar(), FLA_Check_if_vector(), FLA_Check_matrix_vector_dims(), FLA_Check_nonconstant_object(), FLA_Check_square(), and FLA_Check_valid_uplo().
Referenced by FLA_Hemv_external().
00036 { 00037 FLA_Error e_val; 00038 00039 e_val = FLA_Check_valid_uplo( uplo ); 00040 FLA_Check_error_code( e_val ); 00041 00042 e_val = FLA_Check_complex_object( A ); 00043 FLA_Check_error_code( e_val ); 00044 00045 e_val = FLA_Check_nonconstant_object( A ); 00046 FLA_Check_error_code( e_val ); 00047 00048 e_val = FLA_Check_identical_object_datatype( A, x ); 00049 FLA_Check_error_code( e_val ); 00050 00051 e_val = FLA_Check_identical_object_datatype( A, y ); 00052 FLA_Check_error_code( e_val ); 00053 00054 e_val = FLA_Check_consistent_object_datatype( A, alpha ); 00055 FLA_Check_error_code( e_val ); 00056 00057 e_val = FLA_Check_consistent_object_datatype( A, beta ); 00058 FLA_Check_error_code( e_val ); 00059 00060 e_val = FLA_Check_square( A ); 00061 FLA_Check_error_code( e_val ); 00062 00063 e_val = FLA_Check_if_vector( x ); 00064 FLA_Check_error_code( e_val ); 00065 00066 e_val = FLA_Check_if_vector( y ); 00067 FLA_Check_error_code( e_val ); 00068 00069 e_val = FLA_Check_if_scalar( alpha ); 00070 FLA_Check_error_code( e_val ); 00071 00072 e_val = FLA_Check_if_scalar( beta ); 00073 FLA_Check_error_code( e_val ); 00074 00075 e_val = FLA_Check_matrix_vector_dims( FLA_NO_TRANSPOSE, A, x, y ); 00076 FLA_Check_error_code( e_val ); 00077 00078 return FLA_SUCCESS; 00079 }
FLA_Error FLA_Hemv_external | ( | FLA_Uplo | uplo, | |
FLA_Obj | alpha, | |||
FLA_Obj | A, | |||
FLA_Obj | x, | |||
FLA_Obj | beta, | |||
FLA_Obj | y | |||
) |
References cblas_chemv(), cblas_zhemv(), CblasColMajor, chemv(), FLA_Check_error_level(), FLA_Hemv_check(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Param_map_to_blas_uplo(), and zhemv().
Referenced by FLA_Hemm_ll_unb_var10(), FLA_Hemm_ll_unb_var9(), FLA_Hemm_lu_unb_var10(), FLA_Hemm_lu_unb_var9(), FLA_Hemv(), and fla_hemv_external_f().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, ldim_A; 00039 int m_x, inc_x, ldim_x; 00040 int m_y, inc_y, ldim_y; 00041 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00042 CBLAS_ORDER cblas_order = CblasColMajor; 00043 CBLAS_UPLO blas_uplo; 00044 #else 00045 char blas_uplo; 00046 #endif 00047 00048 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00049 FLA_Hemv_check( uplo, alpha, A, x, beta, y ); 00050 00051 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00052 00053 datatype = FLA_Obj_datatype( A ); 00054 00055 m_A = FLA_Obj_length( A ); 00056 ldim_A = FLA_Obj_ldim( A ); 00057 00058 m_x = FLA_Obj_length( x ); 00059 ldim_x = FLA_Obj_ldim( x ); 00060 00061 m_y = FLA_Obj_length( y ); 00062 ldim_y = FLA_Obj_ldim( y ); 00063 00064 inc_x = ( m_x == 1 ? ldim_x : 1 ); 00065 inc_y = ( m_y == 1 ? ldim_y : 1 ); 00066 00067 FLA_Param_map_to_blas_uplo( uplo, &blas_uplo ); 00068 00069 00070 switch( datatype ){ 00071 00072 case FLA_COMPLEX: 00073 { 00074 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A ); 00075 scomplex *buff_x = ( scomplex * ) FLA_COMPLEX_PTR( x ); 00076 scomplex *buff_y = ( scomplex * ) FLA_COMPLEX_PTR( y ); 00077 scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha ); 00078 scomplex *buff_beta = ( scomplex * ) FLA_COMPLEX_PTR( beta ); 00079 00080 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00081 cblas_chemv( cblas_order, 00082 blas_uplo, 00083 m_A, 00084 buff_alpha, 00085 buff_A, ldim_A, 00086 buff_x, inc_x, 00087 buff_beta, 00088 buff_y, inc_y ); 00089 #else 00090 FLA_C2F( chemv )( &blas_uplo, 00091 &m_A, 00092 buff_alpha, 00093 buff_A, &ldim_A, 00094 buff_x, &inc_x, 00095 buff_beta, 00096 buff_y, &inc_y ); 00097 #endif 00098 break; 00099 } 00100 00101 case FLA_DOUBLE_COMPLEX: 00102 { 00103 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A ); 00104 dcomplex *buff_x = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( x ); 00105 dcomplex *buff_y = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( y ); 00106 dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha ); 00107 dcomplex *buff_beta = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( beta ); 00108 00109 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00110 cblas_zhemv( cblas_order, 00111 blas_uplo, 00112 m_A, 00113 buff_alpha, 00114 buff_A, ldim_A, 00115 buff_x, inc_x, 00116 buff_beta, 00117 buff_y, inc_y ); 00118 #else 00119 FLA_C2F( zhemv )( &blas_uplo, 00120 &m_A, 00121 buff_alpha, 00122 buff_A, &ldim_A, 00123 buff_x, &inc_x, 00124 buff_beta, 00125 buff_y, &inc_y ); 00126 #endif 00127 break; 00128 } 00129 00130 } 00131 00132 return FLA_SUCCESS; 00133 }
void FLA_F2C() fla_hemv_external_f | ( | F_INT * | uplo, | |
F_INT * | alpha, | |||
F_INT * | A, | |||
F_INT * | x, | |||
F_INT * | beta, | |||
F_INT * | y, | |||
F_INT * | IERROR | |||
) |
References FLA_Hemv_external().
00137 { 00138 *IERROR = FLA_Hemv_external( *( ( FLA_Uplo * ) uplo ), 00139 *( ( FLA_Obj * ) alpha ), 00140 *( ( FLA_Obj * ) A ), 00141 *( ( FLA_Obj * ) x ), 00142 *( ( FLA_Obj * ) beta ), 00143 *( ( FLA_Obj * ) y ) ); 00144 }
FLA_Error FLA_Hemvc | ( | FLA_Uplo | uplo, | |
FLA_Conj | conja, | |||
FLA_Obj | alpha, | |||
FLA_Obj | A, | |||
FLA_Obj | x, | |||
FLA_Obj | beta, | |||
FLA_Obj | y | |||
) |
References FLA_Hemvc_external().
00036 { 00037 return FLA_Hemvc_external( uplo, conja, alpha, A, x, beta, y ); 00038 }
FLA_Error FLA_Hemvc_check | ( | FLA_Uplo | uplo, | |
FLA_Conj | conja, | |||
FLA_Obj | alpha, | |||
FLA_Obj | A, | |||
FLA_Obj | x, | |||
FLA_Obj | beta, | |||
FLA_Obj | y | |||
) |
References FLA_Check_complex_object(), FLA_Check_consistent_object_datatype(), FLA_Check_identical_object_datatype(), FLA_Check_if_scalar(), FLA_Check_if_vector(), FLA_Check_matrix_vector_dims(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_valid_conj(), and FLA_Check_valid_uplo().
Referenced by FLA_Hemvc_external().
00036 { 00037 FLA_Error e_val; 00038 00039 e_val = FLA_Check_valid_uplo( uplo ); 00040 FLA_Check_error_code( e_val ); 00041 00042 e_val = FLA_Check_valid_conj( conja ); 00043 FLA_Check_error_code( e_val ); 00044 00045 e_val = FLA_Check_complex_object( A ); 00046 FLA_Check_error_code( e_val ); 00047 00048 e_val = FLA_Check_nonconstant_object( A ); 00049 FLA_Check_error_code( e_val ); 00050 00051 e_val = FLA_Check_identical_object_datatype( A, x ); 00052 FLA_Check_error_code( e_val ); 00053 00054 e_val = FLA_Check_identical_object_datatype( A, y ); 00055 FLA_Check_error_code( e_val ); 00056 00057 e_val = FLA_Check_consistent_object_datatype( A, alpha ); 00058 FLA_Check_error_code( e_val ); 00059 00060 e_val = FLA_Check_consistent_object_datatype( A, beta ); 00061 FLA_Check_error_code( e_val ); 00062 00063 e_val = FLA_Check_square( A ); 00064 FLA_Check_error_code( e_val ); 00065 00066 e_val = FLA_Check_if_vector( x ); 00067 FLA_Check_error_code( e_val ); 00068 00069 e_val = FLA_Check_if_vector( y ); 00070 FLA_Check_error_code( e_val ); 00071 00072 e_val = FLA_Check_if_scalar( alpha ); 00073 FLA_Check_error_code( e_val ); 00074 00075 e_val = FLA_Check_if_scalar( beta ); 00076 FLA_Check_error_code( e_val ); 00077 00078 e_val = FLA_Check_matrix_vector_dims( FLA_NO_TRANSPOSE, A, x, y ); 00079 FLA_Check_error_code( e_val ); 00080 00081 return FLA_SUCCESS; 00082 }
FLA_Error FLA_Hemvc_external | ( | FLA_Uplo | uplo, | |
FLA_Conj | conja, | |||
FLA_Obj | alpha, | |||
FLA_Obj | A, | |||
FLA_Obj | x, | |||
FLA_Obj | beta, | |||
FLA_Obj | y | |||
) |
References cblas_chemv(), cblas_zhemv(), CblasColMajor, chemv(), FLA_Check_error_level(), FLA_Copyt_external(), FLA_Hemvc_check(), FLA_Obj_create_conf_to(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Param_map_to_blas_uplo(), and zhemv().
Referenced by FLA_Hemm_rl_unb_var10(), FLA_Hemm_rl_unb_var9(), FLA_Hemm_ru_unb_var10(), FLA_Hemm_ru_unb_var9(), FLA_Hemvc(), and fla_hemvc_external_f().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, ldim_A; 00039 int m_x, inc_x, ldim_x; 00040 int m_y, inc_y, ldim_y; 00041 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00042 CBLAS_ORDER cblas_order = CblasColMajor; 00043 CBLAS_UPLO blas_uplo; 00044 #else 00045 char blas_uplo; 00046 #endif 00047 FLA_Obj A_copy; 00048 00049 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00050 FLA_Hemvc_check( uplo, conja, alpha, A, x, beta, y ); 00051 00052 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00053 00054 datatype = FLA_Obj_datatype( A ); 00055 00056 m_A = FLA_Obj_length( A ); 00057 ldim_A = FLA_Obj_ldim( A ); 00058 00059 m_x = FLA_Obj_length( x ); 00060 ldim_x = FLA_Obj_ldim( x ); 00061 00062 m_y = FLA_Obj_length( y ); 00063 ldim_y = FLA_Obj_ldim( y ); 00064 00065 inc_x = ( m_x == 1 ? ldim_x : 1 ); 00066 inc_y = ( m_y == 1 ? ldim_y : 1 ); 00067 00068 if ( conja == FLA_CONJUGATE ) 00069 { 00070 FLA_Obj_create_conf_to( FLA_NO_TRANSPOSE, A, &A_copy ); 00071 FLA_Copyt_external( FLA_CONJ_NO_TRANSPOSE, A, A_copy ); 00072 00073 ldim_A = FLA_Obj_ldim( A_copy ); 00074 } 00075 else 00076 { 00077 A_copy = A; 00078 } 00079 00080 FLA_Param_map_to_blas_uplo( uplo, &blas_uplo ); 00081 00082 00083 switch( datatype ){ 00084 00085 case FLA_COMPLEX: 00086 { 00087 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A_copy ); 00088 scomplex *buff_x = ( scomplex * ) FLA_COMPLEX_PTR( x ); 00089 scomplex *buff_y = ( scomplex * ) FLA_COMPLEX_PTR( y ); 00090 scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha ); 00091 scomplex *buff_beta = ( scomplex * ) FLA_COMPLEX_PTR( beta ); 00092 00093 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00094 cblas_chemv( cblas_order, 00095 blas_uplo, 00096 m_A, 00097 buff_alpha, 00098 buff_A, ldim_A, 00099 buff_x, inc_x, 00100 buff_beta, 00101 buff_y, inc_y ); 00102 #else 00103 FLA_C2F( chemv )( &blas_uplo, 00104 &m_A, 00105 buff_alpha, 00106 buff_A, &ldim_A, 00107 buff_x, &inc_x, 00108 buff_beta, 00109 buff_y, &inc_y ); 00110 #endif 00111 break; 00112 } 00113 00114 case FLA_DOUBLE_COMPLEX: 00115 { 00116 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A_copy ); 00117 dcomplex *buff_x = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( x ); 00118 dcomplex *buff_y = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( y ); 00119 dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha ); 00120 dcomplex *buff_beta = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( beta ); 00121 00122 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00123 cblas_zhemv( cblas_order, 00124 blas_uplo, 00125 m_A, 00126 buff_alpha, 00127 buff_A, ldim_A, 00128 buff_x, inc_x, 00129 buff_beta, 00130 buff_y, inc_y ); 00131 #else 00132 FLA_C2F( zhemv )( &blas_uplo, 00133 &m_A, 00134 buff_alpha, 00135 buff_A, &ldim_A, 00136 buff_x, &inc_x, 00137 buff_beta, 00138 buff_y, &inc_y ); 00139 #endif 00140 break; 00141 } 00142 00143 } 00144 00145 if ( conja == FLA_CONJUGATE ) 00146 FLA_Obj_free( &A_copy ); 00147 00148 return FLA_SUCCESS; 00149 }
void FLA_F2C() fla_hemvc_external_f | ( | F_INT * | uplo, | |
F_INT * | conja, | |||
F_INT * | alpha, | |||
F_INT * | A, | |||
F_INT * | x, | |||
F_INT * | beta, | |||
F_INT * | y, | |||
F_INT * | IERROR | |||
) |
References FLA_Hemvc_external().
00153 { 00154 *IERROR = FLA_Hemvc_external( *( ( FLA_Uplo * ) uplo ), 00155 *( ( FLA_Conj * ) conj ), 00156 *( ( FLA_Obj * ) alpha ), 00157 *( ( FLA_Obj * ) A ), 00158 *( ( FLA_Obj * ) x ), 00159 *( ( FLA_Obj * ) beta ), 00160 *( ( FLA_Obj * ) y ) ); 00161 }
References FLA_Her2_external().
00036 { 00037 return FLA_Her2_external( uplo, alpha, x, y, A ); 00038 }
References FLA_Check_complex_object(), FLA_Check_consistent_object_datatype(), FLA_Check_identical_object_datatype(), FLA_Check_if_scalar(), FLA_Check_if_vector(), FLA_Check_matrix_vector_dims(), FLA_Check_nonconstant_object(), FLA_Check_square(), and FLA_Check_valid_uplo().
Referenced by FLA_Her2_external().
00036 { 00037 FLA_Error e_val; 00038 00039 e_val = FLA_Check_valid_uplo( uplo ); 00040 FLA_Check_error_code( e_val ); 00041 00042 e_val = FLA_Check_complex_object( A ); 00043 FLA_Check_error_code( e_val ); 00044 00045 e_val = FLA_Check_nonconstant_object( A ); 00046 FLA_Check_error_code( e_val ); 00047 00048 e_val = FLA_Check_identical_object_datatype( A, x ); 00049 FLA_Check_error_code( e_val ); 00050 00051 e_val = FLA_Check_identical_object_datatype( A, y ); 00052 FLA_Check_error_code( e_val ); 00053 00054 e_val = FLA_Check_consistent_object_datatype( A, alpha ); 00055 FLA_Check_error_code( e_val ); 00056 00057 e_val = FLA_Check_if_vector( x ); 00058 FLA_Check_error_code( e_val ); 00059 00060 e_val = FLA_Check_if_vector( y ); 00061 FLA_Check_error_code( e_val ); 00062 00063 e_val = FLA_Check_if_scalar( alpha ); 00064 FLA_Check_error_code( e_val ); 00065 00066 e_val = FLA_Check_square( A ); 00067 FLA_Check_error_code( e_val ); 00068 00069 e_val = FLA_Check_matrix_vector_dims( FLA_TRANSPOSE, A, x, y ); 00070 FLA_Check_error_code( e_val ); 00071 00072 return FLA_SUCCESS; 00073 }
References cblas_cher2(), cblas_zher2(), CblasColMajor, cher2(), FLA_Check_error_level(), FLA_Her2_check(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Param_map_to_blas_uplo(), and zher2().
Referenced by FLA_Her2(), fla_her2_external_f(), FLA_Her2k_ln_unb_var10(), FLA_Her2k_ln_unb_var9(), FLA_Her2k_un_unb_var10(), and FLA_Her2k_un_unb_var9().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, ldim_A; 00039 int m_x, inc_x, ldim_x; 00040 int m_y, inc_y, ldim_y; 00041 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00042 CBLAS_ORDER cblas_order = CblasColMajor; 00043 CBLAS_UPLO blas_uplo; 00044 #else 00045 char blas_uplo; 00046 #endif 00047 00048 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00049 FLA_Her2_check( uplo, alpha, x, y, A ); 00050 00051 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00052 00053 datatype = FLA_Obj_datatype( A ); 00054 00055 m_A = FLA_Obj_length( A ); 00056 ldim_A = FLA_Obj_ldim( A ); 00057 00058 m_x = FLA_Obj_length( x ); 00059 ldim_x = FLA_Obj_ldim( x ); 00060 00061 m_y = FLA_Obj_length( y ); 00062 ldim_y = FLA_Obj_ldim( y ); 00063 00064 inc_x = ( m_x == 1 ? ldim_x : 1 ); 00065 inc_y = ( m_y == 1 ? ldim_y : 1 ); 00066 00067 FLA_Param_map_to_blas_uplo( uplo, &blas_uplo ); 00068 00069 00070 switch( datatype ){ 00071 00072 case FLA_COMPLEX: 00073 { 00074 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A ); 00075 scomplex *buff_x = ( scomplex * ) FLA_COMPLEX_PTR( x ); 00076 scomplex *buff_y = ( scomplex * ) FLA_COMPLEX_PTR( y ); 00077 scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha ); 00078 00079 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00080 cblas_cher2( cblas_order, 00081 blas_uplo, 00082 m_A, 00083 buff_alpha, 00084 buff_x, inc_x, 00085 buff_y, inc_y, 00086 buff_A, ldim_A ); 00087 #else 00088 FLA_C2F( cher2 )( &blas_uplo, 00089 &m_A, 00090 buff_alpha, 00091 buff_x, &inc_x, 00092 buff_y, &inc_y, 00093 buff_A, &ldim_A ); 00094 #endif 00095 break; 00096 } 00097 00098 case FLA_DOUBLE_COMPLEX: 00099 { 00100 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A ); 00101 dcomplex *buff_x = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( x ); 00102 dcomplex *buff_y = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( y ); 00103 dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha ); 00104 00105 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00106 cblas_zher2( cblas_order, 00107 blas_uplo, 00108 m_A, 00109 buff_alpha, 00110 buff_x, inc_x, 00111 buff_y, inc_y, 00112 buff_A, ldim_A ); 00113 #else 00114 FLA_C2F( zher2 )( &blas_uplo, 00115 &m_A, 00116 buff_alpha, 00117 buff_x, &inc_x, 00118 buff_y, &inc_y, 00119 buff_A, &ldim_A ); 00120 #endif 00121 break; 00122 } 00123 00124 } 00125 00126 return FLA_SUCCESS; 00127 }
void FLA_F2C() fla_her2_external_f | ( | F_INT * | uplo, | |
F_INT * | alpha, | |||
F_INT * | x, | |||
F_INT * | y, | |||
F_INT * | A, | |||
F_INT * | IERROR | |||
) |
References FLA_Her2_external().
00132 { 00133 *IERROR = FLA_Her2_external( *( ( FLA_Uplo * ) uplo ), 00134 *( ( FLA_Obj * ) alpha ), 00135 *( ( FLA_Obj * ) x ), 00136 *( ( FLA_Obj * ) y ), 00137 *( ( FLA_Obj * ) A ) ); 00138 }
FLA_Error FLA_Her2c | ( | FLA_Uplo | uplo, | |
FLA_Conj | conjxy, | |||
FLA_Obj | alpha, | |||
FLA_Obj | x, | |||
FLA_Obj | y, | |||
FLA_Obj | A | |||
) |
References FLA_Her2c_external().
00036 { 00037 return FLA_Her2c_external( uplo, conjxy, alpha, x, y, A ); 00038 }
FLA_Error FLA_Her2c_check | ( | FLA_Uplo | uplo, | |
FLA_Conj | conjxy, | |||
FLA_Obj | alpha, | |||
FLA_Obj | x, | |||
FLA_Obj | y, | |||
FLA_Obj | A | |||
) |
References FLA_Check_complex_object(), FLA_Check_consistent_object_datatype(), FLA_Check_identical_object_datatype(), FLA_Check_if_scalar(), FLA_Check_if_vector(), FLA_Check_matrix_vector_dims(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_valid_conj(), and FLA_Check_valid_uplo().
Referenced by FLA_Her2c_external().
00036 { 00037 FLA_Error e_val; 00038 00039 e_val = FLA_Check_valid_uplo( uplo ); 00040 FLA_Check_error_code( e_val ); 00041 00042 e_val = FLA_Check_valid_conj( conjxy ); 00043 FLA_Check_error_code( e_val ); 00044 00045 e_val = FLA_Check_complex_object( A ); 00046 FLA_Check_error_code( e_val ); 00047 00048 e_val = FLA_Check_nonconstant_object( A ); 00049 FLA_Check_error_code( e_val ); 00050 00051 e_val = FLA_Check_identical_object_datatype( A, x ); 00052 FLA_Check_error_code( e_val ); 00053 00054 e_val = FLA_Check_identical_object_datatype( A, y ); 00055 FLA_Check_error_code( e_val ); 00056 00057 e_val = FLA_Check_consistent_object_datatype( A, alpha ); 00058 FLA_Check_error_code( e_val ); 00059 00060 e_val = FLA_Check_if_vector( x ); 00061 FLA_Check_error_code( e_val ); 00062 00063 e_val = FLA_Check_if_vector( y ); 00064 FLA_Check_error_code( e_val ); 00065 00066 e_val = FLA_Check_if_scalar( alpha ); 00067 FLA_Check_error_code( e_val ); 00068 00069 e_val = FLA_Check_square( A ); 00070 FLA_Check_error_code( e_val ); 00071 00072 e_val = FLA_Check_matrix_vector_dims( FLA_TRANSPOSE, A, x, y ); 00073 FLA_Check_error_code( e_val ); 00074 00075 return FLA_SUCCESS; 00076 }
FLA_Error FLA_Her2c_external | ( | FLA_Uplo | uplo, | |
FLA_Conj | conjxy, | |||
FLA_Obj | alpha, | |||
FLA_Obj | x, | |||
FLA_Obj | y, | |||
FLA_Obj | A | |||
) |
References cblas_cher2(), cblas_zher2(), CblasColMajor, cher2(), FLA_Check_error_level(), FLA_Copyt_external(), FLA_Her2c_check(), FLA_Obj_create_conf_to(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Param_map_to_blas_uplo(), dcomplex::imag, scomplex::imag, and zher2().
Referenced by FLA_Her2c(), fla_her2c_external_f(), FLA_Her2k_lh_unb_var10(), FLA_Her2k_lh_unb_var9(), FLA_Her2k_uh_unb_var10(), and FLA_Her2k_uh_unb_var9().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, ldim_A; 00039 int m_x, ldim_x, inc_x; 00040 int m_y, ldim_y, inc_y; 00041 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00042 CBLAS_ORDER cblas_order = CblasColMajor; 00043 CBLAS_UPLO blas_uplo; 00044 #else 00045 char blas_uplo; 00046 #endif 00047 FLA_Obj x_copy, y_copy; 00048 00049 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00050 FLA_Her2c_check( uplo, conjxy, alpha, x, y, A ); 00051 00052 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00053 00054 datatype = FLA_Obj_datatype( A ); 00055 00056 m_A = FLA_Obj_length( A ); 00057 ldim_A = FLA_Obj_ldim( A ); 00058 00059 m_x = FLA_Obj_length( x ); 00060 ldim_x = FLA_Obj_ldim( x ); 00061 00062 m_y = FLA_Obj_length( y ); 00063 ldim_y = FLA_Obj_ldim( y ); 00064 00065 inc_x = ( m_x == 1 ? ldim_x : 1 ); 00066 inc_y = ( m_y == 1 ? ldim_y : 1 ); 00067 00068 if ( conjxy == FLA_CONJUGATE ) 00069 { 00070 FLA_Obj_create_conf_to( FLA_NO_TRANSPOSE, x, &x_copy ); 00071 FLA_Copyt_external( FLA_CONJ_NO_TRANSPOSE, x, x_copy ); 00072 00073 FLA_Obj_create_conf_to( FLA_NO_TRANSPOSE, y, &y_copy ); 00074 FLA_Copyt_external( FLA_CONJ_NO_TRANSPOSE, y, y_copy ); 00075 00076 m_x = FLA_Obj_length( x_copy ); 00077 ldim_x = FLA_Obj_ldim( x_copy ); 00078 inc_x = ( m_x == 1 ? ldim_x : 1 ); 00079 00080 m_y = FLA_Obj_length( y_copy ); 00081 ldim_y = FLA_Obj_ldim( y_copy ); 00082 inc_y = ( m_y == 1 ? ldim_y : 1 ); 00083 } 00084 else 00085 { 00086 x_copy = x; 00087 y_copy = y; 00088 } 00089 00090 FLA_Param_map_to_blas_uplo( uplo, &blas_uplo ); 00091 00092 00093 switch( datatype ){ 00094 00095 case FLA_COMPLEX: 00096 { 00097 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A ); 00098 scomplex *buff_x = ( scomplex * ) FLA_COMPLEX_PTR( x_copy ); 00099 scomplex *buff_y = ( scomplex * ) FLA_COMPLEX_PTR( y_copy ); 00100 scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha ); 00101 scomplex alphac; 00102 00103 alphac = *buff_alpha; 00104 alphac.imag *= -1.0F; 00105 00106 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00107 cblas_cher2( cblas_order, 00108 blas_uplo, 00109 m_A, 00110 &alphac, 00111 buff_x, inc_x, 00112 buff_y, inc_y, 00113 buff_A, ldim_A ); 00114 #else 00115 FLA_C2F( cher2 )( &blas_uplo, 00116 &m_A, 00117 &alphac, 00118 buff_x, &inc_x, 00119 buff_y, &inc_y, 00120 buff_A, &ldim_A ); 00121 #endif 00122 break; 00123 } 00124 00125 case FLA_DOUBLE_COMPLEX: 00126 { 00127 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A ); 00128 dcomplex *buff_x = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( x_copy ); 00129 dcomplex *buff_y = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( y_copy ); 00130 dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha ); 00131 dcomplex alphac; 00132 00133 alphac = *buff_alpha; 00134 alphac.imag *= -1.0; 00135 00136 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00137 cblas_zher2( cblas_order, 00138 blas_uplo, 00139 m_A, 00140 &alphac, 00141 buff_x, inc_x, 00142 buff_y, inc_y, 00143 buff_A, ldim_A ); 00144 #else 00145 FLA_C2F( zher2 )( &blas_uplo, 00146 &m_A, 00147 &alphac, 00148 buff_x, &inc_x, 00149 buff_y, &inc_y, 00150 buff_A, &ldim_A ); 00151 #endif 00152 break; 00153 } 00154 00155 } 00156 00157 if ( conjxy == FLA_CONJUGATE ) 00158 { 00159 FLA_Obj_free( &x_copy ); 00160 FLA_Obj_free( &y_copy ); 00161 } 00162 00163 return FLA_SUCCESS; 00164 }
void FLA_F2C() fla_her2c_external_f | ( | F_INT * | uplo, | |
F_INT * | conjxy, | |||
F_INT * | alpha, | |||
F_INT * | x, | |||
F_INT * | y, | |||
F_INT * | A, | |||
F_INT * | IERROR | |||
) |
References FLA_Her2c_external().
00169 { 00170 *IERROR = FLA_Her2c_external( *( ( FLA_Uplo * ) uplo ), 00171 *( ( FLA_Conj * ) conjxy ), 00172 *( ( FLA_Obj * ) alpha ), 00173 *( ( FLA_Obj * ) x ), 00174 *( ( FLA_Obj * ) y ), 00175 *( ( FLA_Obj * ) A ) ); 00176 }
References FLA_Check_complex_object(), FLA_Check_identical_object_datatype(), FLA_Check_identical_object_precision(), FLA_Check_if_scalar(), FLA_Check_if_vector(), FLA_Check_matrix_vector_dims(), FLA_Check_nonconstant_object(), FLA_Check_real_object(), FLA_Check_square(), and FLA_Check_valid_uplo().
Referenced by FLA_Her_external().
00036 { 00037 FLA_Error e_val; 00038 00039 e_val = FLA_Check_valid_uplo( uplo ); 00040 FLA_Check_error_code( e_val ); 00041 00042 e_val = FLA_Check_complex_object( A ); 00043 FLA_Check_error_code( e_val ); 00044 00045 e_val = FLA_Check_nonconstant_object( A ); 00046 FLA_Check_error_code( e_val ); 00047 00048 e_val = FLA_Check_real_object( alpha ); 00049 FLA_Check_error_code( e_val ); 00050 00051 e_val = FLA_Check_identical_object_datatype( A, x ); 00052 FLA_Check_error_code( e_val ); 00053 00054 e_val = FLA_Check_identical_object_precision( A, alpha ); 00055 FLA_Check_error_code( e_val ); 00056 00057 e_val = FLA_Check_if_vector( x ); 00058 FLA_Check_error_code( e_val ); 00059 00060 e_val = FLA_Check_if_scalar( alpha ); 00061 FLA_Check_error_code( e_val ); 00062 00063 e_val = FLA_Check_square( A ); 00064 FLA_Check_error_code( e_val ); 00065 00066 e_val = FLA_Check_matrix_vector_dims( FLA_NO_TRANSPOSE, A, x, x ); 00067 FLA_Check_error_code( e_val ); 00068 00069 return FLA_SUCCESS; 00070 }
References cblas_cher(), cblas_zher(), CblasColMajor, cher(), FLA_Check_error_level(), FLA_Her_check(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Param_map_to_blas_uplo(), and zher().
Referenced by FLA_Chol_l_unb_var3(), FLA_Her(), fla_her_external_f(), FLA_Herk_ln_unb_var5(), FLA_Herk_ln_unb_var6(), FLA_Herk_un_unb_var5(), FLA_Herk_un_unb_var6(), and FLA_Ttmm_u_unb_var1().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, ldim_A; 00039 int m_x, ldim_x, inc_x; 00040 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00041 CBLAS_ORDER cblas_order = CblasColMajor; 00042 CBLAS_UPLO blas_uplo; 00043 #else 00044 char blas_uplo; 00045 #endif 00046 00047 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00048 FLA_Her_check( uplo, alpha, x, A ); 00049 00050 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00051 00052 datatype = FLA_Obj_datatype( A ); 00053 00054 m_A = FLA_Obj_length( A ); 00055 ldim_A = FLA_Obj_ldim( A ); 00056 00057 m_x = FLA_Obj_length( x ); 00058 ldim_x = FLA_Obj_ldim( x ); 00059 00060 inc_x = ( m_x == 1 ? ldim_x : 1 ); 00061 00062 FLA_Param_map_to_blas_uplo( uplo, &blas_uplo ); 00063 00064 00065 switch( datatype ){ 00066 00067 case FLA_COMPLEX: 00068 { 00069 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A ); 00070 scomplex *buff_x = ( scomplex * ) FLA_COMPLEX_PTR( x ); 00071 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha ); 00072 00073 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00074 cblas_cher( cblas_order, 00075 blas_uplo, 00076 m_A, 00077 buff_alpha->real, 00078 buff_x, inc_x, 00079 buff_A, ldim_A ); 00080 #else 00081 FLA_C2F( cher )( &blas_uplo, 00082 &m_A, 00083 buff_alpha, 00084 buff_x, &inc_x, 00085 buff_A, &ldim_A ); 00086 #endif 00087 break; 00088 } 00089 00090 case FLA_DOUBLE_COMPLEX: 00091 { 00092 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A ); 00093 dcomplex *buff_x = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( x ); 00094 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha ); 00095 00096 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00097 cblas_zher( cblas_order, 00098 blas_uplo, 00099 m_A, 00100 buff_alpha->real, 00101 buff_x, inc_x, 00102 buff_A, ldim_A ); 00103 #else 00104 FLA_C2F( zher )( &blas_uplo, 00105 &m_A, 00106 buff_alpha, 00107 buff_x, &inc_x, 00108 buff_A, &ldim_A ); 00109 #endif 00110 break; 00111 } 00112 00113 } 00114 00115 return FLA_SUCCESS; 00116 }
void FLA_F2C() fla_her_external_f | ( | F_INT * | uplo, | |
F_INT * | alpha, | |||
F_INT * | x, | |||
F_INT * | A, | |||
F_INT * | IERROR | |||
) |
References FLA_Her_external().
00121 { 00122 *IERROR = FLA_Her_external( *( ( FLA_Uplo * ) uplo ), 00123 *( ( FLA_Obj * ) alpha ), 00124 *( ( FLA_Obj * ) x ), 00125 *( ( FLA_Obj * ) A ) ); 00126 }
References FLA_Herc_external().
00036 { 00037 return FLA_Herc_external( uplo, conjx, alpha, x, A ); 00038 }
References FLA_Check_complex_object(), FLA_Check_identical_object_datatype(), FLA_Check_identical_object_precision(), FLA_Check_if_scalar(), FLA_Check_if_vector(), FLA_Check_matrix_vector_dims(), FLA_Check_nonconstant_object(), FLA_Check_real_object(), FLA_Check_square(), FLA_Check_valid_conj(), and FLA_Check_valid_uplo().
Referenced by FLA_Herc_external().
00036 { 00037 FLA_Error e_val; 00038 00039 e_val = FLA_Check_valid_uplo( uplo ); 00040 FLA_Check_error_code( e_val ); 00041 00042 e_val = FLA_Check_valid_conj( conjx ); 00043 FLA_Check_error_code( e_val ); 00044 00045 e_val = FLA_Check_complex_object( A ); 00046 FLA_Check_error_code( e_val ); 00047 00048 e_val = FLA_Check_nonconstant_object( A ); 00049 FLA_Check_error_code( e_val ); 00050 00051 e_val = FLA_Check_real_object( alpha ); 00052 FLA_Check_error_code( e_val ); 00053 00054 e_val = FLA_Check_identical_object_datatype( A, x ); 00055 FLA_Check_error_code( e_val ); 00056 00057 e_val = FLA_Check_identical_object_precision( A, alpha ); 00058 FLA_Check_error_code( e_val ); 00059 00060 e_val = FLA_Check_if_vector( x ); 00061 FLA_Check_error_code( e_val ); 00062 00063 e_val = FLA_Check_if_scalar( alpha ); 00064 FLA_Check_error_code( e_val ); 00065 00066 e_val = FLA_Check_square( A ); 00067 FLA_Check_error_code( e_val ); 00068 00069 e_val = FLA_Check_matrix_vector_dims( FLA_NO_TRANSPOSE, A, x, x ); 00070 FLA_Check_error_code( e_val ); 00071 00072 return FLA_SUCCESS; 00073 }
References cblas_cher(), cblas_zher(), CblasColMajor, cher(), FLA_Check_error_level(), FLA_Copyt_external(), FLA_Herc_check(), FLA_Obj_create_conf_to(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Param_map_to_blas_uplo(), and zher().
Referenced by FLA_Chol_u_unb_var3(), FLA_Herc(), fla_herc_external_f(), FLA_Herk_lh_unb_var5(), FLA_Herk_lh_unb_var6(), FLA_Herk_uh_unb_var5(), FLA_Herk_uh_unb_var6(), and FLA_Ttmm_l_unb_var1().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, ldim_A; 00039 int m_x, ldim_x, inc_x; 00040 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00041 CBLAS_ORDER cblas_order = CblasColMajor; 00042 CBLAS_UPLO blas_uplo; 00043 #else 00044 char blas_uplo; 00045 #endif 00046 FLA_Obj x_copy; 00047 00048 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00049 FLA_Herc_check( uplo, conjx, alpha, x, A ); 00050 00051 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00052 00053 datatype = FLA_Obj_datatype( A ); 00054 00055 m_A = FLA_Obj_length( A ); 00056 ldim_A = FLA_Obj_ldim( A ); 00057 00058 m_x = FLA_Obj_length( x ); 00059 ldim_x = FLA_Obj_ldim( x ); 00060 00061 inc_x = ( m_x == 1 ? ldim_x : 1 ); 00062 00063 if ( conjx == FLA_CONJUGATE ) 00064 { 00065 FLA_Obj_create_conf_to( FLA_NO_TRANSPOSE, x, &x_copy ); 00066 FLA_Copyt_external( FLA_CONJ_NO_TRANSPOSE, x, x_copy ); 00067 00068 m_x = FLA_Obj_length( x_copy ); 00069 ldim_x = FLA_Obj_ldim( x_copy ); 00070 inc_x = ( m_x == 1 ? ldim_x : 1 ); 00071 } 00072 else 00073 { 00074 x_copy = x; 00075 } 00076 00077 FLA_Param_map_to_blas_uplo( uplo, &blas_uplo ); 00078 00079 00080 switch( datatype ){ 00081 00082 case FLA_COMPLEX: 00083 { 00084 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A ); 00085 scomplex *buff_x = ( scomplex * ) FLA_COMPLEX_PTR( x_copy ); 00086 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha ); 00087 00088 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00089 cblas_cher( cblas_order, 00090 blas_uplo, 00091 m_A, 00092 buff_alpha->real, 00093 buff_x, inc_x, 00094 buff_A, ldim_A ); 00095 #else 00096 FLA_C2F( cher )( &blas_uplo, 00097 &m_A, 00098 buff_alpha, 00099 buff_x, &inc_x, 00100 buff_A, &ldim_A ); 00101 #endif 00102 break; 00103 } 00104 00105 case FLA_DOUBLE_COMPLEX: 00106 { 00107 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A ); 00108 dcomplex *buff_x = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( x_copy ); 00109 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha ); 00110 00111 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00112 cblas_zher( cblas_order, 00113 blas_uplo, 00114 m_A, 00115 buff_alpha->real, 00116 buff_x, inc_x, 00117 buff_A, ldim_A ); 00118 #else 00119 FLA_C2F( zher )( &blas_uplo, 00120 &m_A, 00121 buff_alpha, 00122 buff_x, &inc_x, 00123 buff_A, &ldim_A ); 00124 #endif 00125 break; 00126 } 00127 00128 } 00129 00130 if ( conjx == FLA_CONJUGATE ) 00131 FLA_Obj_free( &x_copy ); 00132 00133 return FLA_SUCCESS; 00134 }
void FLA_F2C() fla_herc_external_f | ( | F_INT * | uplo, | |
F_INT * | conjx, | |||
F_INT * | alpha, | |||
F_INT * | x, | |||
F_INT * | A, | |||
F_INT * | IERROR | |||
) |
References FLA_Herc_external().
00139 { 00140 *IERROR = FLA_Herc_external( *( ( FLA_Uplo * ) uplo ), 00141 *( ( FLA_Conj * ) conjx ), 00142 *( ( FLA_Obj * ) alpha ), 00143 *( ( FLA_Obj * ) x ), 00144 *( ( FLA_Obj * ) A ) ); 00145 }
References FLA_Symv_external().
00036 { 00037 return FLA_Symv_external( uplo, alpha, A, x, beta, y ); 00038 }
FLA_Error FLA_Symv_check | ( | FLA_Uplo | uplo, | |
FLA_Obj | alpha, | |||
FLA_Obj | A, | |||
FLA_Obj | x, | |||
FLA_Obj | beta, | |||
FLA_Obj | y | |||
) |
References FLA_Check_consistent_object_datatype(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_scalar(), FLA_Check_if_vector(), FLA_Check_matrix_vector_dims(), FLA_Check_nonconstant_object(), FLA_Check_square(), and FLA_Check_valid_uplo().
Referenced by FLA_Symv_external().
00036 { 00037 FLA_Error e_val; 00038 00039 e_val = FLA_Check_valid_uplo( uplo ); 00040 FLA_Check_error_code( e_val ); 00041 00042 e_val = FLA_Check_floating_object( A ); 00043 FLA_Check_error_code( e_val ); 00044 00045 e_val = FLA_Check_nonconstant_object( A ); 00046 FLA_Check_error_code( e_val ); 00047 00048 e_val = FLA_Check_identical_object_datatype( A, x ); 00049 FLA_Check_error_code( e_val ); 00050 00051 e_val = FLA_Check_identical_object_datatype( A, y ); 00052 FLA_Check_error_code( e_val ); 00053 00054 e_val = FLA_Check_consistent_object_datatype( A, alpha ); 00055 FLA_Check_error_code( e_val ); 00056 00057 e_val = FLA_Check_consistent_object_datatype( A, beta ); 00058 FLA_Check_error_code( e_val ); 00059 00060 e_val = FLA_Check_square( A ); 00061 FLA_Check_error_code( e_val ); 00062 00063 e_val = FLA_Check_if_vector( x ); 00064 FLA_Check_error_code( e_val ); 00065 00066 e_val = FLA_Check_if_vector( y ); 00067 FLA_Check_error_code( e_val ); 00068 00069 e_val = FLA_Check_if_scalar( alpha ); 00070 FLA_Check_error_code( e_val ); 00071 00072 e_val = FLA_Check_if_scalar( beta ); 00073 FLA_Check_error_code( e_val ); 00074 00075 e_val = FLA_Check_matrix_vector_dims( FLA_NO_TRANSPOSE, A, x, y ); 00076 FLA_Check_error_code( e_val ); 00077 00078 return FLA_SUCCESS; 00079 }
FLA_Error FLA_Symv_external | ( | FLA_Uplo | uplo, | |
FLA_Obj | alpha, | |||
FLA_Obj | A, | |||
FLA_Obj | x, | |||
FLA_Obj | beta, | |||
FLA_Obj | y | |||
) |
References cblas_dsymv(), cblas_ssymv(), CblasColMajor, dsymv(), FLA_Check_error_level(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Param_map_to_blas_uplo(), FLA_Symv_check(), and ssymv().
Referenced by FLA_Symm_ll_unb_var10(), FLA_Symm_ll_unb_var9(), FLA_Symm_lu_unb_var10(), FLA_Symm_lu_unb_var9(), FLA_Symm_rl_unb_var10(), FLA_Symm_rl_unb_var9(), FLA_Symm_ru_unb_var10(), FLA_Symm_ru_unb_var9(), FLA_Symv(), and fla_symv_external_f().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, ldim_A; 00039 int m_x, inc_x, ldim_x; 00040 int m_y, inc_y, ldim_y; 00041 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00042 CBLAS_ORDER cblas_order = CblasColMajor; 00043 CBLAS_UPLO blas_uplo; 00044 #else 00045 char blas_uplo; 00046 #endif 00047 00048 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00049 FLA_Symv_check( uplo, alpha, A, x, beta, y ); 00050 00051 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00052 00053 datatype = FLA_Obj_datatype( A ); 00054 00055 m_A = FLA_Obj_length( A ); 00056 ldim_A = FLA_Obj_ldim( A ); 00057 00058 m_x = FLA_Obj_length( x ); 00059 ldim_x = FLA_Obj_ldim( x ); 00060 00061 m_y = FLA_Obj_length( y ); 00062 ldim_y = FLA_Obj_ldim( y ); 00063 00064 inc_x = ( m_x == 1 ? ldim_x : 1 ); 00065 inc_y = ( m_y == 1 ? ldim_y : 1 ); 00066 00067 FLA_Param_map_to_blas_uplo( uplo, &blas_uplo ); 00068 00069 00070 switch( datatype ){ 00071 00072 case FLA_FLOAT: 00073 { 00074 float *buff_A = ( float * ) FLA_FLOAT_PTR( A ); 00075 float *buff_x = ( float * ) FLA_FLOAT_PTR( x ); 00076 float *buff_y = ( float * ) FLA_FLOAT_PTR( y ); 00077 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha ); 00078 float *buff_beta = ( float * ) FLA_FLOAT_PTR( beta ); 00079 00080 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00081 cblas_ssymv( cblas_order, 00082 blas_uplo, 00083 m_A, 00084 *buff_alpha, 00085 buff_A, ldim_A, 00086 buff_x, inc_x, 00087 *buff_beta, 00088 buff_y, inc_y ); 00089 #else 00090 FLA_C2F( ssymv )( &blas_uplo, 00091 &m_A, 00092 buff_alpha, 00093 buff_A, &ldim_A, 00094 buff_x, &inc_x, 00095 buff_beta, 00096 buff_y, &inc_y ); 00097 #endif 00098 break; 00099 } 00100 00101 case FLA_DOUBLE: 00102 { 00103 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A ); 00104 double *buff_x = ( double * ) FLA_DOUBLE_PTR( x ); 00105 double *buff_y = ( double * ) FLA_DOUBLE_PTR( y ); 00106 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha ); 00107 double *buff_beta = ( double * ) FLA_DOUBLE_PTR( beta ); 00108 00109 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00110 cblas_dsymv( cblas_order, 00111 blas_uplo, 00112 m_A, 00113 *buff_alpha, 00114 buff_A, ldim_A, 00115 buff_x, inc_x, 00116 *buff_beta, 00117 buff_y, inc_y ); 00118 #else 00119 FLA_C2F( dsymv )( &blas_uplo, 00120 &m_A, 00121 buff_alpha, 00122 buff_A, &ldim_A, 00123 buff_x, &inc_x, 00124 buff_beta, 00125 buff_y, &inc_y ); 00126 #endif 00127 break; 00128 } 00129 00130 } 00131 00132 return FLA_SUCCESS; 00133 }
void FLA_F2C() fla_symv_external_f | ( | F_INT * | uplo, | |
F_INT * | alpha, | |||
F_INT * | A, | |||
F_INT * | x, | |||
F_INT * | beta, | |||
F_INT * | y, | |||
F_INT * | IERROR | |||
) |
References FLA_Symv_external().
00137 { 00138 *IERROR = FLA_Symv_external( *( ( FLA_Uplo * ) uplo ), 00139 *( ( FLA_Obj * ) alpha ), 00140 *( ( FLA_Obj * ) A ), 00141 *( ( FLA_Obj * ) x ), 00142 *( ( FLA_Obj * ) beta ), 00143 *( ( FLA_Obj * ) y ) ); 00144 }
References FLA_Syr2_external().
00036 { 00037 return FLA_Syr2_external( uplo, alpha, x, y, A ); 00038 }
References FLA_Check_consistent_object_datatype(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_scalar(), FLA_Check_if_vector(), FLA_Check_matrix_vector_dims(), FLA_Check_nonconstant_object(), FLA_Check_square(), and FLA_Check_valid_uplo().
Referenced by FLA_Syr2_external().
00036 { 00037 FLA_Error e_val; 00038 00039 e_val = FLA_Check_valid_uplo( uplo ); 00040 FLA_Check_error_code( e_val ); 00041 00042 e_val = FLA_Check_floating_object( A ); 00043 FLA_Check_error_code( e_val ); 00044 00045 e_val = FLA_Check_nonconstant_object( A ); 00046 FLA_Check_error_code( e_val ); 00047 00048 e_val = FLA_Check_identical_object_datatype( A, x ); 00049 FLA_Check_error_code( e_val ); 00050 00051 e_val = FLA_Check_identical_object_datatype( A, y ); 00052 FLA_Check_error_code( e_val ); 00053 00054 e_val = FLA_Check_consistent_object_datatype( A, alpha ); 00055 FLA_Check_error_code( e_val ); 00056 00057 e_val = FLA_Check_if_vector( x ); 00058 FLA_Check_error_code( e_val ); 00059 00060 e_val = FLA_Check_if_vector( y ); 00061 FLA_Check_error_code( e_val ); 00062 00063 e_val = FLA_Check_if_scalar( alpha ); 00064 FLA_Check_error_code( e_val ); 00065 00066 e_val = FLA_Check_square( A ); 00067 FLA_Check_error_code( e_val ); 00068 00069 e_val = FLA_Check_matrix_vector_dims( FLA_TRANSPOSE, A, x, y ); 00070 FLA_Check_error_code( e_val ); 00071 00072 return FLA_SUCCESS; 00073 }
References cblas_dsyr2(), cblas_ssyr2(), CblasColMajor, dsyr2(), FLA_Check_error_level(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Param_map_to_blas_uplo(), FLA_Syr2_check(), and ssyr2().
Referenced by FLA_Syr2(), fla_syr2_external_f(), FLA_Syr2k_ln_unb_var10(), FLA_Syr2k_ln_unb_var9(), FLA_Syr2k_lt_unb_var10(), FLA_Syr2k_lt_unb_var9(), FLA_Syr2k_un_unb_var10(), FLA_Syr2k_un_unb_var9(), FLA_Syr2k_ut_unb_var10(), and FLA_Syr2k_ut_unb_var9().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, ldim_A; 00039 int m_x, inc_x, ldim_x; 00040 int m_y, inc_y, ldim_y; 00041 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00042 CBLAS_ORDER cblas_order = CblasColMajor; 00043 CBLAS_UPLO blas_uplo; 00044 #else 00045 char blas_uplo; 00046 #endif 00047 00048 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00049 FLA_Syr2_check( uplo, alpha, x, y, A ); 00050 00051 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00052 00053 datatype = FLA_Obj_datatype( A ); 00054 00055 m_A = FLA_Obj_length( A ); 00056 ldim_A = FLA_Obj_ldim( A ); 00057 00058 m_x = FLA_Obj_length( x ); 00059 ldim_x = FLA_Obj_ldim( x ); 00060 00061 m_y = FLA_Obj_length( y ); 00062 ldim_y = FLA_Obj_ldim( y ); 00063 00064 inc_x = ( m_x == 1 ? ldim_x : 1 ); 00065 inc_y = ( m_y == 1 ? ldim_y : 1 ); 00066 00067 FLA_Param_map_to_blas_uplo( uplo, &blas_uplo ); 00068 00069 00070 switch( datatype ) { 00071 00072 case FLA_FLOAT: 00073 { 00074 float *buff_A = ( float * ) FLA_FLOAT_PTR( A ); 00075 float *buff_x = ( float * ) FLA_FLOAT_PTR( x ); 00076 float *buff_y = ( float * ) FLA_FLOAT_PTR( y ); 00077 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha ); 00078 00079 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00080 cblas_ssyr2( cblas_order, 00081 blas_uplo, 00082 m_A, 00083 *buff_alpha, 00084 buff_x, inc_x, 00085 buff_y, inc_y, 00086 buff_A, ldim_A ); 00087 #else 00088 FLA_C2F( ssyr2 )( &blas_uplo, 00089 &m_A, 00090 buff_alpha, 00091 buff_x, &inc_x, 00092 buff_y, &inc_y, 00093 buff_A, &ldim_A ); 00094 #endif 00095 break; 00096 } 00097 00098 case FLA_DOUBLE: 00099 { 00100 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A ); 00101 double *buff_x = ( double * ) FLA_DOUBLE_PTR( x ); 00102 double *buff_y = ( double * ) FLA_DOUBLE_PTR( y ); 00103 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha ); 00104 00105 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00106 cblas_dsyr2( cblas_order, 00107 blas_uplo, 00108 m_A, 00109 *buff_alpha, 00110 buff_x, inc_x, 00111 buff_y, inc_y, 00112 buff_A, ldim_A ); 00113 #else 00114 FLA_C2F( dsyr2 )( &blas_uplo, 00115 &m_A, 00116 buff_alpha, 00117 buff_x, &inc_x, 00118 buff_y, &inc_y, 00119 buff_A, &ldim_A ); 00120 #endif 00121 break; 00122 } 00123 00124 } 00125 00126 return FLA_SUCCESS; 00127 }
void FLA_F2C() fla_syr2_external_f | ( | F_INT * | uplo, | |
F_INT * | alpha, | |||
F_INT * | x, | |||
F_INT * | y, | |||
F_INT * | A, | |||
F_INT * | IERROR | |||
) |
References FLA_Syr2_external().
00132 { 00133 *IERROR = FLA_Syr2_external( *( ( FLA_Uplo * ) uplo ), 00134 *( ( FLA_Obj * ) alpha ), 00135 *( ( FLA_Obj * ) x ), 00136 *( ( FLA_Obj * ) y ), 00137 *( ( FLA_Obj * ) A ) ); 00138 }
References FLA_Check_consistent_object_datatype(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_scalar(), FLA_Check_if_vector(), FLA_Check_matrix_vector_dims(), FLA_Check_nonconstant_object(), FLA_Check_square(), and FLA_Check_valid_uplo().
Referenced by FLA_Syr_external().
00036 { 00037 FLA_Error e_val; 00038 00039 e_val = FLA_Check_valid_uplo( uplo ); 00040 FLA_Check_error_code( e_val ); 00041 00042 e_val = FLA_Check_floating_object( A ); 00043 FLA_Check_error_code( e_val ); 00044 00045 e_val = FLA_Check_nonconstant_object( A ); 00046 FLA_Check_error_code( e_val ); 00047 00048 e_val = FLA_Check_identical_object_datatype( A, x ); 00049 FLA_Check_error_code( e_val ); 00050 00051 e_val = FLA_Check_consistent_object_datatype( A, alpha ); 00052 FLA_Check_error_code( e_val ); 00053 00054 e_val = FLA_Check_if_vector( x ); 00055 FLA_Check_error_code( e_val ); 00056 00057 e_val = FLA_Check_if_scalar( alpha ); 00058 FLA_Check_error_code( e_val ); 00059 00060 e_val = FLA_Check_square( A ); 00061 FLA_Check_error_code( e_val ); 00062 00063 e_val = FLA_Check_matrix_vector_dims( FLA_TRANSPOSE, A, x, x ); 00064 FLA_Check_error_code( e_val ); 00065 00066 return FLA_SUCCESS; 00067 }
References cblas_dsyr(), cblas_ssyr(), CblasColMajor, dsyr(), FLA_Check_error_level(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Obj_width(), FLA_Param_map_to_blas_uplo(), FLA_Syr_check(), and ssyr().
Referenced by FLA_Chol_l_unb_var3(), FLA_Chol_u_unb_var3(), FLA_Syr(), fla_syr_external_f(), FLA_Syrk_ln_unb_var5(), FLA_Syrk_ln_unb_var6(), FLA_Syrk_lt_unb_var5(), FLA_Syrk_lt_unb_var6(), FLA_Syrk_un_unb_var5(), FLA_Syrk_un_unb_var6(), FLA_Syrk_ut_unb_var5(), FLA_Syrk_ut_unb_var6(), FLA_Ttmm_l_unb_var1(), and FLA_Ttmm_u_unb_var1().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, ldim_A; 00039 int m_x, ldim_x, inc_x; 00040 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00041 CBLAS_ORDER cblas_order = CblasColMajor; 00042 CBLAS_UPLO blas_uplo; 00043 #else 00044 char blas_uplo; 00045 #endif 00046 00047 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00048 FLA_Syr_check( uplo, alpha, x, A ); 00049 00050 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00051 00052 datatype = FLA_Obj_datatype( A ); 00053 00054 m_A = FLA_Obj_width( A ); 00055 ldim_A = FLA_Obj_ldim( A ); 00056 00057 m_x = FLA_Obj_length( x ); 00058 ldim_x = FLA_Obj_ldim( x ); 00059 00060 inc_x = ( m_x == 1 ? ldim_x : 1 ); 00061 00062 FLA_Param_map_to_blas_uplo( uplo, &blas_uplo ); 00063 00064 00065 switch( datatype ){ 00066 00067 case FLA_FLOAT: 00068 { 00069 float *buff_A = ( float * ) FLA_FLOAT_PTR( A ); 00070 float *buff_x = ( float * ) FLA_FLOAT_PTR( x ); 00071 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha ); 00072 00073 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00074 cblas_ssyr( cblas_order, 00075 blas_uplo, 00076 m_A, 00077 *buff_alpha, 00078 buff_x, inc_x, 00079 buff_A, ldim_A ); 00080 #else 00081 FLA_C2F( ssyr )( &blas_uplo, 00082 &m_A, 00083 buff_alpha, 00084 buff_x, &inc_x, 00085 buff_A, &ldim_A ); 00086 #endif 00087 break; 00088 } 00089 00090 case FLA_DOUBLE: 00091 { 00092 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A ); 00093 double *buff_x = ( double * ) FLA_DOUBLE_PTR( x ); 00094 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha ); 00095 00096 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00097 cblas_dsyr( cblas_order, 00098 blas_uplo, 00099 m_A, 00100 *buff_alpha, 00101 buff_x, inc_x, 00102 buff_A, ldim_A ); 00103 #else 00104 FLA_C2F( dsyr )( &blas_uplo, 00105 &m_A, 00106 buff_alpha, 00107 buff_x, &inc_x, 00108 buff_A, &ldim_A ); 00109 #endif 00110 break; 00111 } 00112 00113 } 00114 00115 return FLA_SUCCESS; 00116 }
void FLA_F2C() fla_syr_external_f | ( | F_INT * | uplo, | |
F_INT * | alpha, | |||
F_INT * | x, | |||
F_INT * | A, | |||
F_INT * | IERROR | |||
) |
References FLA_Syr_external().
00120 { 00121 *IERROR = FLA_Syr_external( *( ( FLA_Uplo * ) uplo ), 00122 *( ( FLA_Obj * ) alpha ), 00123 *( ( FLA_Obj * ) x ), 00124 *( ( FLA_Obj * ) A ) ); 00125 }
References FLA_Trmv_external().
00036 { 00037 return FLA_Trmv_external( uplo, transa, diag, A, x ); 00038 }
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_vector(), FLA_Check_matrix_vector_dims(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_valid_diag(), FLA_Check_valid_trans(), and FLA_Check_valid_uplo().
Referenced by FLA_Trmv_external().
00036 { 00037 FLA_Error e_val; 00038 00039 e_val = FLA_Check_valid_uplo( uplo ); 00040 FLA_Check_error_code( e_val ); 00041 00042 e_val = FLA_Check_valid_trans( transa ); 00043 FLA_Check_error_code( e_val ); 00044 00045 e_val = FLA_Check_valid_diag( diag ); 00046 FLA_Check_error_code( e_val ); 00047 00048 e_val = FLA_Check_floating_object( A ); 00049 FLA_Check_error_code( e_val ); 00050 00051 e_val = FLA_Check_nonconstant_object( A ); 00052 FLA_Check_error_code( e_val ); 00053 00054 e_val = FLA_Check_identical_object_datatype( A, x ); 00055 FLA_Check_error_code( e_val ); 00056 00057 e_val = FLA_Check_square( A ); 00058 FLA_Check_error_code( e_val ); 00059 00060 e_val = FLA_Check_if_vector( x ); 00061 FLA_Check_error_code( e_val ); 00062 00063 e_val = FLA_Check_matrix_vector_dims( FLA_NO_TRANSPOSE, A, x, x ); 00064 FLA_Check_error_code( e_val ); 00065 00066 return FLA_SUCCESS; 00067 }
FLA_Error FLA_Trmv_external | ( | FLA_Uplo | uplo, | |
FLA_Trans | transa, | |||
FLA_Diag | diag, | |||
FLA_Obj | A, | |||
FLA_Obj | x | |||
) |
References cblas_ctrmv(), cblas_dtrmv(), cblas_strmv(), cblas_ztrmv(), CblasColMajor, ctrmv(), dtrmv(), FLA_Check_error_level(), FLA_Copyt_external(), FLA_Obj_create_conf_to(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Param_map_to_blas_diag(), FLA_Param_map_to_blas_trans(), FLA_Param_map_to_blas_uplo(), FLA_Trmv_check(), strmv(), and ztrmv().
Referenced by FLA_Trinv_l_unb_var1(), FLA_Trinv_l_unb_var4(), FLA_Trinv_u_unb_var1(), FLA_Trinv_u_unb_var4(), FLA_Trmm_llh_unb_var3(), FLA_Trmm_llh_unb_var4(), FLA_Trmm_lln_unb_var3(), FLA_Trmm_lln_unb_var4(), FLA_Trmm_llt_unb_var3(), FLA_Trmm_llt_unb_var4(), FLA_Trmm_luh_unb_var3(), FLA_Trmm_luh_unb_var4(), FLA_Trmm_lun_unb_var3(), FLA_Trmm_lun_unb_var4(), FLA_Trmm_lut_unb_var3(), FLA_Trmm_lut_unb_var4(), FLA_Trmm_rlh_unb_var3(), FLA_Trmm_rlh_unb_var4(), FLA_Trmm_rln_unb_var3(), FLA_Trmm_rln_unb_var4(), FLA_Trmm_rlt_unb_var3(), FLA_Trmm_rlt_unb_var4(), FLA_Trmm_ruh_unb_var3(), FLA_Trmm_ruh_unb_var4(), FLA_Trmm_run_unb_var3(), FLA_Trmm_run_unb_var4(), FLA_Trmm_rut_unb_var3(), FLA_Trmm_rut_unb_var4(), FLA_Trmv(), fla_trmv_external_f(), FLA_Trmvsx_external(), FLA_Ttmm_l_unb_var3(), and FLA_Ttmm_u_unb_var3().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, ldim_A; 00039 int m_x, ldim_x, inc_x; 00040 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00041 CBLAS_ORDER cblas_order = CblasColMajor; 00042 CBLAS_UPLO blas_uplo; 00043 CBLAS_TRANSPOSE blas_transa; 00044 CBLAS_DIAG blas_diag; 00045 #else 00046 char blas_uplo; 00047 char blas_transa; 00048 char blas_diag; 00049 #endif 00050 FLA_Obj x_copy; 00051 FLA_Trans transa_copy; 00052 00053 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00054 FLA_Trmv_check( uplo, transa, diag, A, x ); 00055 00056 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00057 00058 datatype = FLA_Obj_datatype( A ); 00059 00060 m_A = FLA_Obj_length( A ); 00061 ldim_A = FLA_Obj_ldim( A ); 00062 00063 m_x = FLA_Obj_length( x ); 00064 ldim_x = FLA_Obj_ldim( x ); 00065 00066 inc_x = ( m_x == 1 ? ldim_x : 1 ); 00067 00068 if ( transa == FLA_CONJ_NO_TRANSPOSE ) 00069 { 00070 FLA_Obj_create_conf_to( FLA_NO_TRANSPOSE, x, &x_copy ); 00071 FLA_Copyt_external( FLA_CONJ_NO_TRANSPOSE, x, x_copy ); 00072 transa_copy = FLA_NO_TRANSPOSE; 00073 00074 m_x = FLA_Obj_length( x_copy ); 00075 ldim_x = FLA_Obj_ldim( x_copy ); 00076 inc_x = ( m_x == 1 ? ldim_x : 1 ); 00077 } 00078 else 00079 { 00080 x_copy = x; 00081 transa_copy = transa; 00082 } 00083 00084 FLA_Param_map_to_blas_uplo( uplo, &blas_uplo ); 00085 FLA_Param_map_to_blas_trans( transa_copy, &blas_transa ); 00086 FLA_Param_map_to_blas_diag( diag, &blas_diag ); 00087 00088 00089 switch( datatype ){ 00090 00091 case FLA_FLOAT: 00092 { 00093 float *buff_A = ( float * ) FLA_FLOAT_PTR( A ); 00094 float *buff_x = ( float * ) FLA_FLOAT_PTR( x ); 00095 00096 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00097 cblas_strmv( cblas_order, 00098 blas_uplo, 00099 blas_transa, 00100 blas_diag, 00101 m_A, 00102 buff_A, ldim_A, 00103 buff_x, inc_x ); 00104 #else 00105 FLA_C2F( strmv )( &blas_uplo, 00106 &blas_transa, 00107 &blas_diag, 00108 &m_A, 00109 buff_A, &ldim_A, 00110 buff_x, &inc_x ); 00111 #endif 00112 break; 00113 } 00114 00115 case FLA_DOUBLE: 00116 { 00117 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A ); 00118 double *buff_x = ( double * ) FLA_DOUBLE_PTR( x ); 00119 00120 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00121 cblas_dtrmv( cblas_order, 00122 blas_uplo, 00123 blas_transa, 00124 blas_diag, 00125 m_A, 00126 buff_A, ldim_A, 00127 buff_x, inc_x ); 00128 #else 00129 FLA_C2F( dtrmv )( &blas_uplo, 00130 &blas_transa, 00131 &blas_diag, 00132 &m_A, 00133 buff_A, &ldim_A, 00134 buff_x, &inc_x ); 00135 #endif 00136 break; 00137 } 00138 00139 case FLA_COMPLEX: 00140 { 00141 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A ); 00142 scomplex *buff_x = ( scomplex * ) FLA_COMPLEX_PTR( x_copy ); 00143 00144 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00145 cblas_ctrmv( cblas_order, 00146 blas_uplo, 00147 blas_transa, 00148 blas_diag, 00149 m_A, 00150 buff_A, ldim_A, 00151 buff_x, inc_x ); 00152 #else 00153 FLA_C2F( ctrmv )( &blas_uplo, 00154 &blas_transa, 00155 &blas_diag, 00156 &m_A, 00157 buff_A, &ldim_A, 00158 buff_x, &inc_x ); 00159 #endif 00160 break; 00161 } 00162 00163 case FLA_DOUBLE_COMPLEX: 00164 { 00165 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A ); 00166 dcomplex *buff_x = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( x_copy ); 00167 00168 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00169 cblas_ztrmv( cblas_order, 00170 blas_uplo, 00171 blas_transa, 00172 blas_diag, 00173 m_A, 00174 buff_A, ldim_A, 00175 buff_x, inc_x ); 00176 #else 00177 FLA_C2F( ztrmv )( &blas_uplo, 00178 &blas_transa, 00179 &blas_diag, 00180 &m_A, 00181 buff_A, &ldim_A, 00182 buff_x, &inc_x ); 00183 #endif 00184 break; 00185 } 00186 00187 } 00188 00189 if ( transa == FLA_CONJ_NO_TRANSPOSE ) 00190 { 00191 FLA_Copyt_external( FLA_CONJ_NO_TRANSPOSE, x_copy, x ); 00192 FLA_Obj_free( &x_copy ); 00193 } 00194 00195 return FLA_SUCCESS; 00196 }
void FLA_F2C() fla_trmv_external_f | ( | F_INT * | uplo, | |
F_INT * | transa, | |||
F_INT * | diag, | |||
F_INT * | A, | |||
F_INT * | x, | |||
F_INT * | IERROR | |||
) |
References FLA_Trmv_external().
00200 { 00201 *IERROR = FLA_Trmv_external( *( ( FLA_Uplo * ) uplo ), 00202 *( ( FLA_Trans * ) transa ), 00203 *( ( FLA_Diag * ) diag ), 00204 *( ( FLA_Obj * ) A ), 00205 *( ( FLA_Obj * ) x ) ); 00206 }
FLA_Error FLA_Trmvsx | ( | FLA_Uplo | uplo, | |
FLA_Trans | transa, | |||
FLA_Diag | diag, | |||
FLA_Obj | alpha, | |||
FLA_Obj | A, | |||
FLA_Obj | x, | |||
FLA_Obj | beta, | |||
FLA_Obj | y | |||
) |
References FLA_Trmvsx_external().
00036 { 00037 return FLA_Trmvsx_external( uplo, transa, diag, alpha, A, x, beta, y ); 00038 }
FLA_Error FLA_Trmvsx_check | ( | FLA_Uplo | uplo, | |
FLA_Trans | transa, | |||
FLA_Diag | diag, | |||
FLA_Obj | alpha, | |||
FLA_Obj | A, | |||
FLA_Obj | x, | |||
FLA_Obj | beta, | |||
FLA_Obj | y | |||
) |
References FLA_Check_consistent_object_datatype(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_scalar(), FLA_Check_if_vector(), FLA_Check_matrix_vector_dims(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_valid_diag(), FLA_Check_valid_trans(), and FLA_Check_valid_uplo().
Referenced by FLA_Trmvsx_external().
00036 { 00037 FLA_Error e_val; 00038 00039 e_val = FLA_Check_valid_uplo( uplo ); 00040 FLA_Check_error_code( e_val ); 00041 00042 e_val = FLA_Check_valid_trans( transa ); 00043 FLA_Check_error_code( e_val ); 00044 00045 e_val = FLA_Check_valid_diag( diag ); 00046 FLA_Check_error_code( e_val ); 00047 00048 e_val = FLA_Check_floating_object( A ); 00049 FLA_Check_error_code( e_val ); 00050 00051 e_val = FLA_Check_nonconstant_object( A ); 00052 FLA_Check_error_code( e_val ); 00053 00054 e_val = FLA_Check_identical_object_datatype( A, x ); 00055 FLA_Check_error_code( e_val ); 00056 00057 e_val = FLA_Check_identical_object_datatype( A, y ); 00058 FLA_Check_error_code( e_val ); 00059 00060 e_val = FLA_Check_consistent_object_datatype( A, alpha ); 00061 FLA_Check_error_code( e_val ); 00062 00063 e_val = FLA_Check_consistent_object_datatype( A, beta ); 00064 FLA_Check_error_code( e_val ); 00065 00066 e_val = FLA_Check_if_scalar( alpha ); 00067 FLA_Check_error_code( e_val ); 00068 00069 e_val = FLA_Check_if_scalar( beta ); 00070 FLA_Check_error_code( e_val ); 00071 00072 e_val = FLA_Check_square( A ); 00073 FLA_Check_error_code( e_val ); 00074 00075 e_val = FLA_Check_if_vector( x ); 00076 FLA_Check_error_code( e_val ); 00077 00078 e_val = FLA_Check_if_vector( y ); 00079 FLA_Check_error_code( e_val ); 00080 00081 e_val = FLA_Check_matrix_vector_dims( FLA_NO_TRANSPOSE, A, x, y ); 00082 FLA_Check_error_code( e_val ); 00083 00084 return FLA_SUCCESS; 00085 }
FLA_Error FLA_Trmvsx_external | ( | FLA_Uplo | uplo, | |
FLA_Trans | transa, | |||
FLA_Diag | diag, | |||
FLA_Obj | alpha, | |||
FLA_Obj | A, | |||
FLA_Obj | x, | |||
FLA_Obj | beta, | |||
FLA_Obj | y | |||
) |
References FLA_Axpy_external(), FLA_Check_error_level(), FLA_Copy_external(), FLA_Obj_create_conf_to(), FLA_Obj_free(), FLA_Scal_external(), FLA_Trmv_external(), and FLA_Trmvsx_check().
Referenced by FLA_Trmvsx(), and fla_trmvsx_external_f().
00036 { 00037 FLA_Obj x_copy; 00038 00039 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00040 FLA_Trmvsx_check( uplo, transa, diag, alpha, A, x, beta, y ); 00041 00042 FLA_Obj_create_conf_to( FLA_NO_TRANSPOSE, x, &x_copy ); 00043 00044 FLA_Copy_external( x, x_copy ); 00045 00046 FLA_Trmv_external( uplo, transa, diag, A, x_copy ); 00047 00048 FLA_Scal_external( beta, y ); 00049 00050 FLA_Axpy_external( alpha, x_copy, y ); 00051 00052 FLA_Obj_free( &x_copy ); 00053 00054 return FLA_SUCCESS; 00055 }
void FLA_F2C() fla_trmvsx_external_f | ( | F_INT * | uplo, | |
F_INT * | transa, | |||
F_INT * | diag, | |||
F_INT * | alpha, | |||
F_INT * | A, | |||
F_INT * | x, | |||
F_INT * | beta, | |||
F_INT * | y, | |||
F_INT * | IERROR | |||
) |
References FLA_Trmvsx_external().
00059 { 00060 *IERROR = FLA_Trmvsx_external( *( ( FLA_Uplo * ) uplo ), 00061 *( ( FLA_Trans * ) transa ), 00062 *( ( FLA_Diag * ) diag ), 00063 *( ( FLA_Obj * ) alpha ), 00064 *( ( FLA_Obj * ) A ), 00065 *( ( FLA_Obj * ) x ), 00066 *( ( FLA_Obj * ) beta ), 00067 *( ( FLA_Obj * ) y ) ); 00068 }
References FLA_Check_error_level(), FLA_Trsv_check(), FLA_Trsv_external(), and FLA_Trsv_internal().
Referenced by fla_trsv_f().
00036 { 00037 return FLA_Trsv_external( uplo, transa, diag, A, x ); 00038 }
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_vector(), FLA_Check_matrix_vector_dims(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_valid_diag(), FLA_Check_valid_trans(), and FLA_Check_valid_uplo().
Referenced by FLA_Trsv(), FLA_Trsv_external(), and FLASH_Trsv().
00036 { 00037 FLA_Error e_val; 00038 00039 e_val = FLA_Check_valid_uplo( uplo ); 00040 FLA_Check_error_code( e_val ); 00041 00042 e_val = FLA_Check_valid_trans( transa ); 00043 FLA_Check_error_code( e_val ); 00044 00045 e_val = FLA_Check_valid_diag( diag ); 00046 FLA_Check_error_code( e_val ); 00047 00048 e_val = FLA_Check_floating_object( A ); 00049 FLA_Check_error_code( e_val ); 00050 00051 e_val = FLA_Check_nonconstant_object( A ); 00052 FLA_Check_error_code( e_val ); 00053 00054 e_val = FLA_Check_identical_object_datatype( A, x ); 00055 FLA_Check_error_code( e_val ); 00056 00057 e_val = FLA_Check_square( A ); 00058 FLA_Check_error_code( e_val ); 00059 00060 e_val = FLA_Check_if_vector( x ); 00061 FLA_Check_error_code( e_val ); 00062 00063 e_val = FLA_Check_matrix_vector_dims( FLA_NO_TRANSPOSE, A, x, x ); 00064 FLA_Check_error_code( e_val ); 00065 00066 return FLA_SUCCESS; 00067 }
FLA_Error FLA_Trsv_external | ( | FLA_Uplo | uplo, | |
FLA_Trans | transa, | |||
FLA_Diag | diag, | |||
FLA_Obj | A, | |||
FLA_Obj | x | |||
) |
References cblas_ctrsv(), cblas_dtrsv(), cblas_strsv(), cblas_ztrsv(), CblasColMajor, ctrsv(), dtrsv(), FLA_Check_error_level(), FLA_Copyt_external(), FLA_Obj_create_conf_to(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Param_map_to_blas_diag(), FLA_Param_map_to_blas_trans(), FLA_Param_map_to_blas_uplo(), FLA_Trsv_check(), strsv(), and ztrsv().
Referenced by FLA_Chol_l_unb_var1(), FLA_Chol_u_unb_var1(), FLA_LU_nopiv_unb_var1(), FLA_LU_nopiv_unb_var2(), FLA_LU_nopiv_unb_var3(), FLA_LU_piv_unb_var3(), FLA_LU_piv_unb_var3b(), FLA_Trinv_l_unb_var2(), FLA_Trinv_l_unb_var4(), FLA_Trinv_u_unb_var2(), FLA_Trinv_u_unb_var4(), FLA_Trsm_llh_unb_var3(), FLA_Trsm_llh_unb_var4(), FLA_Trsm_lln_unb_var3(), FLA_Trsm_lln_unb_var4(), FLA_Trsm_llt_unb_var3(), FLA_Trsm_llt_unb_var4(), FLA_Trsm_luh_unb_var3(), FLA_Trsm_luh_unb_var4(), FLA_Trsm_lun_unb_var3(), FLA_Trsm_lun_unb_var4(), FLA_Trsm_lut_unb_var3(), FLA_Trsm_lut_unb_var4(), FLA_Trsm_rlh_unb_var3(), FLA_Trsm_rlh_unb_var4(), FLA_Trsm_rln_unb_var3(), FLA_Trsm_rln_unb_var4(), FLA_Trsm_rlt_unb_var3(), FLA_Trsm_rlt_unb_var4(), FLA_Trsm_ruh_unb_var3(), FLA_Trsm_ruh_unb_var4(), FLA_Trsm_run_unb_var3(), FLA_Trsm_run_unb_var4(), FLA_Trsm_rut_unb_var3(), FLA_Trsm_rut_unb_var4(), FLA_Trsv(), fla_trsv_external_f(), FLA_Trsv_lc_external(), FLA_Trsv_lc_task(), FLA_Trsv_ln_external(), FLA_Trsv_ln_task(), FLA_Trsv_lt_external(), FLA_Trsv_lt_task(), FLA_Trsv_task(), FLA_Trsv_uc_external(), FLA_Trsv_uc_task(), FLA_Trsv_un_external(), FLA_Trsv_un_task(), FLA_Trsv_ut_external(), FLA_Trsv_ut_task(), FLA_Trsvsx_external(), and FLASH_FS_incpiv_aux1().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, ldim_A; 00039 int m_x, ldim_x, inc_x; 00040 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00041 CBLAS_ORDER cblas_order = CblasColMajor; 00042 CBLAS_UPLO blas_uplo; 00043 CBLAS_TRANSPOSE blas_transa; 00044 CBLAS_DIAG blas_diag; 00045 #else 00046 char blas_uplo; 00047 char blas_transa; 00048 char blas_diag; 00049 #endif 00050 FLA_Obj x_copy; 00051 FLA_Trans transa_copy; 00052 00053 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00054 FLA_Trsv_check( uplo, transa, diag, A, x ); 00055 00056 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00057 00058 datatype = FLA_Obj_datatype( A ); 00059 00060 m_A = FLA_Obj_length( A ); 00061 ldim_A = FLA_Obj_ldim( A ); 00062 00063 m_x = FLA_Obj_length( x ); 00064 ldim_x = FLA_Obj_ldim( x ); 00065 00066 inc_x = ( m_x == 1 ? ldim_x : 1 ); 00067 00068 if ( transa == FLA_CONJ_NO_TRANSPOSE ) 00069 { 00070 FLA_Obj_create_conf_to( FLA_NO_TRANSPOSE, x, &x_copy ); 00071 FLA_Copyt_external( FLA_CONJ_NO_TRANSPOSE, x, x_copy ); 00072 transa_copy = FLA_NO_TRANSPOSE; 00073 00074 m_x = FLA_Obj_length( x_copy ); 00075 ldim_x = FLA_Obj_ldim( x_copy ); 00076 inc_x = ( m_x == 1 ? ldim_x : 1 ); 00077 } 00078 else 00079 { 00080 x_copy = x; 00081 transa_copy = transa; 00082 } 00083 00084 FLA_Param_map_to_blas_uplo( uplo, &blas_uplo ); 00085 FLA_Param_map_to_blas_trans( transa_copy, &blas_transa ); 00086 FLA_Param_map_to_blas_diag( diag, &blas_diag ); 00087 00088 00089 switch( datatype ){ 00090 00091 case FLA_FLOAT: 00092 { 00093 float *buff_A = ( float * ) FLA_FLOAT_PTR( A ); 00094 float *buff_x = ( float * ) FLA_FLOAT_PTR( x ); 00095 00096 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00097 cblas_strsv( cblas_order, 00098 blas_uplo, 00099 blas_transa, 00100 blas_diag, 00101 m_A, 00102 buff_A, ldim_A, 00103 buff_x, inc_x ); 00104 #else 00105 FLA_C2F( strsv )( &blas_uplo, 00106 &blas_transa, 00107 &blas_diag, 00108 &m_A, 00109 buff_A, &ldim_A, 00110 buff_x, &inc_x ); 00111 #endif 00112 break; 00113 } 00114 00115 case FLA_DOUBLE: 00116 { 00117 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A ); 00118 double *buff_x = ( double * ) FLA_DOUBLE_PTR( x ); 00119 00120 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00121 cblas_dtrsv( cblas_order, 00122 blas_uplo, 00123 blas_transa, 00124 blas_diag, 00125 m_A, 00126 buff_A, ldim_A, 00127 buff_x, inc_x ); 00128 #else 00129 FLA_C2F( dtrsv )( &blas_uplo, 00130 &blas_transa, 00131 &blas_diag, 00132 &m_A, 00133 buff_A, &ldim_A, 00134 buff_x, &inc_x ); 00135 #endif 00136 break; 00137 } 00138 00139 case FLA_COMPLEX: 00140 { 00141 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A ); 00142 scomplex *buff_x = ( scomplex * ) FLA_COMPLEX_PTR( x_copy ); 00143 00144 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00145 cblas_ctrsv( cblas_order, 00146 blas_uplo, 00147 blas_transa, 00148 blas_diag, 00149 m_A, 00150 buff_A, ldim_A, 00151 buff_x, inc_x ); 00152 #else 00153 FLA_C2F( ctrsv )( &blas_uplo, 00154 &blas_transa, 00155 &blas_diag, 00156 &m_A, 00157 buff_A, &ldim_A, 00158 buff_x, &inc_x ); 00159 #endif 00160 break; 00161 } 00162 00163 case FLA_DOUBLE_COMPLEX: 00164 { 00165 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A ); 00166 dcomplex *buff_x = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( x_copy ); 00167 00168 #ifdef FLA_ENABLE_CBLAS_INTERFACE 00169 cblas_ztrsv( cblas_order, 00170 blas_uplo, 00171 blas_transa, 00172 blas_diag, 00173 m_A, 00174 buff_A, ldim_A, 00175 buff_x, inc_x ); 00176 #else 00177 FLA_C2F( ztrsv )( &blas_uplo, 00178 &blas_transa, 00179 &blas_diag, 00180 &m_A, 00181 buff_A, &ldim_A, 00182 buff_x, &inc_x ); 00183 #endif 00184 break; 00185 } 00186 00187 } 00188 00189 if ( transa == FLA_CONJ_NO_TRANSPOSE ) 00190 { 00191 FLA_Copyt_external( FLA_CONJ_NO_TRANSPOSE, x_copy, x ); 00192 FLA_Obj_free( &x_copy ); 00193 } 00194 00195 return FLA_SUCCESS; 00196 }
void FLA_F2C() fla_trsv_external_f | ( | F_INT * | uplo, | |
F_INT * | transa, | |||
F_INT * | diag, | |||
F_INT * | A, | |||
F_INT * | x, | |||
F_INT * | IERROR | |||
) |
References FLA_Trsv_external().
00200 { 00201 *IERROR = FLA_Trsv_external( *( ( FLA_Uplo * ) uplo ), 00202 *( ( FLA_Trans * ) transa ), 00203 *( ( FLA_Diag * ) diag ), 00204 *( ( FLA_Obj * ) A ), 00205 *( ( FLA_Obj * ) x ) ); 00206 }
void FLA_F2C() fla_trsv_f | ( | F_INT * | uplo, | |
F_INT * | transa, | |||
F_INT * | diag, | |||
F_INT * | A, | |||
F_INT * | x, | |||
F_INT * | IERROR | |||
) |
FLA_Error FLA_Trsv_internal | ( | FLA_Uplo | uplo, | |
FLA_Trans | transa, | |||
FLA_Diag | diag, | |||
FLA_Obj | A, | |||
FLA_Obj | x, | |||
fla_trsv_t * | cntl | |||
) |
Referenced by FLA_Trsv(), FLA_Trsv_internal(), FLA_Trsv_lc_blk_var1(), FLA_Trsv_lc_blk_var2(), FLA_Trsv_ln_blk_var1(), FLA_Trsv_ln_blk_var2(), FLA_Trsv_lt_blk_var1(), FLA_Trsv_lt_blk_var2(), FLA_Trsv_uc_blk_var1(), FLA_Trsv_uc_blk_var2(), FLA_Trsv_un_blk_var1(), FLA_Trsv_un_blk_var2(), FLA_Trsv_ut_blk_var1(), FLA_Trsv_ut_blk_var2(), and FLASH_Trsv().
00039 { 00040 FLA_Error r_val = FLA_SUCCESS; 00041 00042 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00043 FLA_Trsv_internal_check( uplo, transa, diag, A, x, cntl ); 00044 00045 if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER && 00046 FLA_Obj_elemtype( A ) == FLA_MATRIX && 00047 FLA_Cntl_variant( cntl ) == FLA_SUBPROBLEM ) 00048 { 00049 // Recurse 00050 r_val = FLA_Trsv_internal( uplo, 00051 transa, 00052 diag, 00053 *FLASH_OBJ_PTR_AT( A ), 00054 *FLASH_OBJ_PTR_AT( x ), 00055 flash_trsv_cntl ); 00056 } 00057 else if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER && 00058 FLA_Obj_elemtype( A ) == FLA_SCALAR && 00059 FLASH_Queue_get_enabled( ) ) 00060 { 00061 // Enqueue 00062 ENQUEUE_FLASH_Trsv( uplo, transa, diag, A, x, cntl ); 00063 } 00064 else 00065 { 00066 if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER && 00067 FLA_Obj_elemtype( A ) == FLA_SCALAR && 00068 !FLASH_Queue_get_enabled( ) ) 00069 { 00070 // Execute leaf 00071 cntl = flash_trsv_cntl_blas; 00072 } 00073 00074 // Parameter combinations 00075 if ( uplo == FLA_LOWER_TRIANGULAR ) 00076 { 00077 if ( transa == FLA_NO_TRANSPOSE ) 00078 r_val = FLA_Trsv_ln( diag, A, x, cntl ); 00079 else if ( transa == FLA_TRANSPOSE ) 00080 r_val = FLA_Trsv_lt( diag, A, x, cntl ); 00081 else if ( transa == FLA_CONJ_TRANSPOSE ) 00082 r_val = FLA_Trsv_lc( diag, A, x, cntl ); 00083 } 00084 else if ( uplo == FLA_UPPER_TRIANGULAR ) 00085 { 00086 if ( transa == FLA_NO_TRANSPOSE ) 00087 r_val = FLA_Trsv_un( diag, A, x, cntl ); 00088 else if ( transa == FLA_TRANSPOSE ) 00089 r_val = FLA_Trsv_ut( diag, A, x, cntl ); 00090 else if ( transa == FLA_CONJ_TRANSPOSE ) 00091 r_val = FLA_Trsv_uc( diag, A, x, cntl ); 00092 } 00093 } 00094 00095 return r_val; 00096 }
FLA_Error FLA_Trsv_internal_check | ( | FLA_Uplo | uplo, | |
FLA_Trans | transa, | |||
FLA_Diag | diag, | |||
FLA_Obj | A, | |||
FLA_Obj | x, | |||
fla_trsv_t * | cntl | |||
) |
References FLA_Check_identical_object_elemtype(), FLA_Check_matrix_vector_dims(), and FLA_Check_null_pointer().
Referenced by FLA_Trsv_internal().
00036 { 00037 FLA_Error e_val; 00038 00039 // Abort if the control structure is NULL. 00040 e_val = FLA_Check_null_pointer( ( void* ) cntl ); 00041 FLA_Check_error_code( e_val ); 00042 00043 // Verify that the object element types are identical. 00044 e_val = FLA_Check_identical_object_elemtype( A, x ); 00045 FLA_Check_error_code( e_val ); 00046 00047 // Verify conformality between all the objects. This check works regardless 00048 // of whether the element type is FLA_MATRIX or FLA_SCALAR because the 00049 // element length and width are used instead of scalar length and width. 00050 e_val = FLA_Check_matrix_vector_dims( FLA_NO_TRANSPOSE, A, x, x ); 00051 FLA_Check_error_code( e_val ); 00052 00053 return FLA_SUCCESS; 00054 }
FLA_Error FLA_Trsv_lc_task | ( | FLA_Diag | diag, | |
FLA_Obj | A, | |||
FLA_Obj | x, | |||
fla_trsv_t * | cntl | |||
) |
References FLA_Trsv_external().
Referenced by FLA_Trsv_lc().
00041 { 00042 return FLA_Trsv_external( FLA_LOWER_TRIANGULAR, FLA_CONJ_TRANSPOSE, diag, A, x ); 00043 }
FLA_Error FLA_Trsv_ln_task | ( | FLA_Diag | diag, | |
FLA_Obj | A, | |||
FLA_Obj | x, | |||
fla_trsv_t * | cntl | |||
) |
References FLA_Trsv_external().
Referenced by FLA_Trsv_ln().
00046 { 00047 return FLA_Trsv_external( FLA_LOWER_TRIANGULAR, FLA_NO_TRANSPOSE, diag, A, x ); 00048 }
FLA_Error FLA_Trsv_lt_task | ( | FLA_Diag | diag, | |
FLA_Obj | A, | |||
FLA_Obj | x, | |||
fla_trsv_t * | cntl | |||
) |
References FLA_Trsv_external().
Referenced by FLA_Trsv_lt().
00051 { 00052 return FLA_Trsv_external( FLA_LOWER_TRIANGULAR, FLA_TRANSPOSE, diag, A, x ); 00053 }
FLA_Error FLA_Trsv_task | ( | FLA_Uplo | uplo, | |
FLA_Trans | transa, | |||
FLA_Diag | diag, | |||
FLA_Obj | A, | |||
FLA_Obj | x, | |||
fla_trsv_t * | cntl | |||
) |
References FLA_Trsv_external().
Referenced by FLASH_Queue_exec_task().
00036 { 00037 return FLA_Trsv_external( uplo, trans, diag, A, x ); 00038 }
FLA_Error FLA_Trsv_uc_task | ( | FLA_Diag | diag, | |
FLA_Obj | A, | |||
FLA_Obj | x, | |||
fla_trsv_t * | cntl | |||
) |
References FLA_Trsv_external().
Referenced by FLA_Trsv_uc().
00056 { 00057 return FLA_Trsv_external( FLA_UPPER_TRIANGULAR, FLA_CONJ_TRANSPOSE, diag, A, x ); 00058 }
FLA_Error FLA_Trsv_un_task | ( | FLA_Diag | diag, | |
FLA_Obj | A, | |||
FLA_Obj | x, | |||
fla_trsv_t * | cntl | |||
) |
References FLA_Trsv_external().
Referenced by FLA_Trsv_un().
00061 { 00062 return FLA_Trsv_external( FLA_UPPER_TRIANGULAR, FLA_NO_TRANSPOSE, diag, A, x ); 00063 }
FLA_Error FLA_Trsv_ut_task | ( | FLA_Diag | diag, | |
FLA_Obj | A, | |||
FLA_Obj | x, | |||
fla_trsv_t * | cntl | |||
) |
References FLA_Trsv_external().
Referenced by FLA_Trsv_ut().
00066 { 00067 return FLA_Trsv_external( FLA_UPPER_TRIANGULAR, FLA_TRANSPOSE, diag, A, x ); 00068 }
FLA_Error FLA_Trsvsx | ( | FLA_Uplo | uplo, | |
FLA_Trans | transa, | |||
FLA_Diag | diag, | |||
FLA_Obj | alpha, | |||
FLA_Obj | A, | |||
FLA_Obj | x, | |||
FLA_Obj | beta, | |||
FLA_Obj | y | |||
) |
References FLA_Trsvsx_external().
00036 { 00037 return FLA_Trsvsx_external( uplo, transa, diag, alpha, A, x, beta, y ); 00038 }
FLA_Error FLA_Trsvsx_check | ( | FLA_Uplo | uplo, | |
FLA_Trans | transa, | |||
FLA_Diag | diag, | |||
FLA_Obj | alpha, | |||
FLA_Obj | A, | |||
FLA_Obj | x, | |||
FLA_Obj | beta, | |||
FLA_Obj | y | |||
) |
References FLA_Check_consistent_object_datatype(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_scalar(), FLA_Check_if_vector(), FLA_Check_matrix_vector_dims(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_valid_diag(), FLA_Check_valid_trans(), and FLA_Check_valid_uplo().
Referenced by FLA_Trsvsx_external().
00036 { 00037 FLA_Error e_val; 00038 00039 e_val = FLA_Check_valid_uplo( uplo ); 00040 FLA_Check_error_code( e_val ); 00041 00042 e_val = FLA_Check_valid_trans( transa ); 00043 FLA_Check_error_code( e_val ); 00044 00045 e_val = FLA_Check_valid_diag( diag ); 00046 FLA_Check_error_code( e_val ); 00047 00048 e_val = FLA_Check_floating_object( A ); 00049 FLA_Check_error_code( e_val ); 00050 00051 e_val = FLA_Check_nonconstant_object( A ); 00052 FLA_Check_error_code( e_val ); 00053 00054 e_val = FLA_Check_identical_object_datatype( A, x ); 00055 FLA_Check_error_code( e_val ); 00056 00057 e_val = FLA_Check_identical_object_datatype( A, y ); 00058 FLA_Check_error_code( e_val ); 00059 00060 e_val = FLA_Check_consistent_object_datatype( A, alpha ); 00061 FLA_Check_error_code( e_val ); 00062 00063 e_val = FLA_Check_consistent_object_datatype( A, beta ); 00064 FLA_Check_error_code( e_val ); 00065 00066 e_val = FLA_Check_if_scalar( alpha ); 00067 FLA_Check_error_code( e_val ); 00068 00069 e_val = FLA_Check_if_scalar( beta ); 00070 FLA_Check_error_code( e_val ); 00071 00072 e_val = FLA_Check_square( A ); 00073 FLA_Check_error_code( e_val ); 00074 00075 e_val = FLA_Check_if_vector( x ); 00076 FLA_Check_error_code( e_val ); 00077 00078 e_val = FLA_Check_if_vector( y ); 00079 FLA_Check_error_code( e_val ); 00080 00081 e_val = FLA_Check_matrix_vector_dims( FLA_NO_TRANSPOSE, A, x, y ); 00082 FLA_Check_error_code( e_val ); 00083 00084 return FLA_SUCCESS; 00085 }
FLA_Error FLA_Trsvsx_external | ( | FLA_Uplo | uplo, | |
FLA_Trans | transa, | |||
FLA_Diag | diag, | |||
FLA_Obj | alpha, | |||
FLA_Obj | A, | |||
FLA_Obj | x, | |||
FLA_Obj | beta, | |||
FLA_Obj | y | |||
) |
References FLA_Axpy_external(), FLA_Check_error_level(), FLA_Copy_external(), FLA_Obj_create_conf_to(), FLA_Obj_free(), FLA_Scal_external(), FLA_Trsv_external(), and FLA_Trsvsx_check().
Referenced by FLA_Trsvsx(), and fla_trsvsx_external_f().
00036 { 00037 FLA_Obj x_copy; 00038 00039 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00040 FLA_Trsvsx_check( uplo, transa, diag, alpha, A, x, beta, y ); 00041 00042 FLA_Obj_create_conf_to( FLA_NO_TRANSPOSE, x, &x_copy ); 00043 00044 FLA_Copy_external( x, x_copy ); 00045 00046 FLA_Trsv_external( uplo, transa, diag, A, x_copy ); 00047 00048 FLA_Scal_external( beta, y ); 00049 00050 FLA_Axpy_external( alpha, x_copy, y ); 00051 00052 FLA_Obj_free( &x_copy ); 00053 00054 return FLA_SUCCESS; 00055 }
void FLA_F2C() fla_trsvsx_external_f | ( | F_INT * | uplo, | |
F_INT * | transa, | |||
F_INT * | diag, | |||
F_INT * | alpha, | |||
F_INT * | A, | |||
F_INT * | x, | |||
F_INT * | beta, | |||
F_INT * | y, | |||
F_INT * | IERROR | |||
) |
References FLA_Trsvsx_external().
00059 { 00060 *IERROR = FLA_Trsvsx_external( *( ( FLA_Uplo * ) uplo ), 00061 *( ( FLA_Trans * ) transa ), 00062 *( ( FLA_Diag * ) diag ), 00063 *( ( FLA_Obj * ) alpha ), 00064 *( ( FLA_Obj * ) A ), 00065 *( ( FLA_Obj * ) x ), 00066 *( ( FLA_Obj * ) beta ), 00067 *( ( FLA_Obj * ) y ) ); 00068 }