Go to the source code of this file.
References FLA_Accum_T_UT_check(), FLA_Accum_T_UT_internal(), and FLA_Check_error_level().
Referenced by fla_accum_t_ut_f().
00036 { 00037 FLA_Error r_val; 00038 00039 // Check parameters. 00040 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING ) 00041 FLA_Accum_T_UT_check( direct, storev, A, tau, T ); 00042 00043 // Invoke FLA_Accum_T_UT_internal(). 00044 r_val = FLA_Accum_T_UT_internal( direct, storev, A, tau, T ); 00045 00046 return r_val; 00047 }
FLA_Error FLA_Accum_T_UT_check | ( | FLA_Direct | direct, | |
FLA_Store | storev, | |||
FLA_Obj | A, | |||
FLA_Obj | tau, | |||
FLA_Obj | T | |||
) |
References FLA_Check_consistent_object_datatype(), FLA_Check_floating_object(), FLA_Check_if_vector(), FLA_Check_object_width_equals(), FLA_Check_valid_direct(), FLA_Check_valid_storev(), FLA_Check_vector_length(), and FLA_Obj_min_dim().
Referenced by FLA_Accum_T_UT(), and FLA_Accum_T_UT_unb_external().
00036 { 00037 FLA_Error e_val; 00038 00039 e_val = FLA_Check_valid_direct( direct ); 00040 FLA_Check_error_code( e_val ); 00041 00042 e_val = FLA_Check_valid_storev( storev ); 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_consistent_object_datatype( A, tau ); 00049 FLA_Check_error_code( e_val ); 00050 00051 e_val = FLA_Check_consistent_object_datatype( A, T ); 00052 FLA_Check_error_code( e_val ); 00053 00054 e_val = FLA_Check_if_vector( tau ); 00055 FLA_Check_error_code( e_val ); 00056 00057 e_val = FLA_Check_vector_length( tau, FLA_Obj_min_dim( A ) ); 00058 FLA_Check_error_code( e_val ); 00059 00060 e_val = FLA_Check_object_width_equals( T, FLA_Obj_min_dim( A ) ); 00061 FLA_Check_error_code( e_val ); 00062 00063 return FLA_SUCCESS; 00064 }
void FLA_F2C() fla_accum_t_ut_f | ( | F_INT * | direct, | |
F_INT * | storev, | |||
F_INT * | A, | |||
F_INT * | tau, | |||
F_INT * | T, | |||
F_INT * | IERROR | |||
) |
References FLA_Accum_T_UT().
00051 { 00052 *IERROR = FLA_Accum_T_UT( *( ( FLA_Direct * ) direct ), 00053 *( ( FLA_Store * ) storev ), 00054 *( ( FLA_Obj * ) A ), 00055 *( ( FLA_Obj * ) tau ), 00056 *( ( FLA_Obj * ) T ) ) ; 00057 }
FLA_Error FLA_Accum_T_UT_internal | ( | FLA_Direct | direct, | |
FLA_Store | storev, | |||
FLA_Obj | A, | |||
FLA_Obj | tau, | |||
FLA_Obj | T | |||
) |
References FLA_Accum_T_UT_fc_opt_var1().
Referenced by FLA_Accum_T_UT().
00036 { 00037 FLA_Error r_val = FLA_SUCCESS; 00038 00039 if ( direct == FLA_FORWARD ) 00040 { 00041 if ( storev == FLA_COLUMNWISE ) 00042 //r_val = FLA_Accum_T_UT_fc_unb_var1( A, tau, T ); 00043 r_val = FLA_Accum_T_UT_fc_opt_var1( A, tau, T ); 00044 else if ( storev == FLA_ROWWISE ) 00045 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00046 } 00047 else if ( direct == FLA_BACKWARD ) 00048 { 00049 if ( storev == FLA_COLUMNWISE ) 00050 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00051 else if ( storev == FLA_ROWWISE ) 00052 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00053 } 00054 00055 return r_val; 00056 }
FLA_Error FLA_Accum_T_UT_unb_external | ( | FLA_Direct | direct, | |
FLA_Store | storev, | |||
FLA_Obj | A, | |||
FLA_Obj | tau, | |||
FLA_Obj | T | |||
) |
References clarftut(), dlarftut(), FLA_Accum_T_UT_check(), FLA_Check_error_level(), FLA_Obj_datatype(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Obj_width(), FLA_Param_map_to_lapack_direct(), FLA_Param_map_to_lapack_storev(), slarftut(), and zlarftut().
Referenced by fla_accum_t_ut_unb_external_f(), FLA_LQ_UT_Accum_T_unb_external(), and FLA_QR_UT_Accum_T_unb_external().
00036 { 00037 FLA_Datatype datatype; 00038 int m_H, ldim_A; 00039 int k_T, ldim_T; 00040 char lapack_direct; 00041 char lapack_storev; 00042 00043 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00044 FLA_Accum_T_UT_check( direct, storev, A, t, T ); 00045 00046 datatype = FLA_Obj_datatype( A ); 00047 00048 if ( storev == FLA_COLUMNWISE ) 00049 m_H = FLA_Obj_length( A ); 00050 else 00051 m_H = FLA_Obj_width( A ); 00052 00053 k_T = FLA_Obj_width( T ); 00054 ldim_A = FLA_Obj_ldim( A ); 00055 ldim_T = FLA_Obj_ldim( T ); 00056 00057 FLA_Param_map_to_lapack_direct( direct, &lapack_direct ); 00058 FLA_Param_map_to_lapack_storev( storev, &lapack_storev ); 00059 00060 00061 switch( datatype ){ 00062 00063 case FLA_FLOAT: 00064 { 00065 float *buff_A = ( float * ) FLA_FLOAT_PTR( A ); 00066 float *buff_t = ( float * ) FLA_FLOAT_PTR( t ); 00067 float *buff_T = ( float * ) FLA_FLOAT_PTR( T ); 00068 00069 FLA_C2F( slarftut )( &lapack_direct, 00070 &lapack_storev, 00071 &m_H, 00072 &k_T, 00073 buff_A, &ldim_A, 00074 buff_t, 00075 buff_T, &ldim_T ); 00076 00077 break; 00078 } 00079 00080 case FLA_DOUBLE: 00081 { 00082 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A ); 00083 double *buff_t = ( double * ) FLA_DOUBLE_PTR( t ); 00084 double *buff_T = ( double * ) FLA_DOUBLE_PTR( T ); 00085 00086 FLA_C2F( dlarftut )( &lapack_direct, 00087 &lapack_storev, 00088 &m_H, 00089 &k_T, 00090 buff_A, &ldim_A, 00091 buff_t, 00092 buff_T, &ldim_T ); 00093 00094 break; 00095 } 00096 00097 case FLA_COMPLEX: 00098 { 00099 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A ); 00100 scomplex *buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t ); 00101 scomplex *buff_T = ( scomplex * ) FLA_COMPLEX_PTR( T ); 00102 00103 FLA_C2F( clarftut )( &lapack_direct, 00104 &lapack_storev, 00105 &m_H, 00106 &k_T, 00107 buff_A, &ldim_A, 00108 buff_t, 00109 buff_T, &ldim_T ); 00110 00111 break; 00112 } 00113 00114 case FLA_DOUBLE_COMPLEX: 00115 { 00116 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A ); 00117 dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t ); 00118 dcomplex *buff_T = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( T ); 00119 00120 FLA_C2F( zlarftut )( &lapack_direct, 00121 &lapack_storev, 00122 &m_H, 00123 &k_T, 00124 buff_A, &ldim_A, 00125 buff_t, 00126 buff_T, &ldim_T ); 00127 00128 break; 00129 } 00130 00131 } 00132 00133 return FLA_SUCCESS; 00134 }
FLA_Error FLA_Apply_Q_blk_external | ( | FLA_Side | side, | |
FLA_Trans | trans, | |||
FLA_Store | storev, | |||
FLA_Obj | A, | |||
FLA_Obj | t, | |||
FLA_Obj | B | |||
) |
References cunmlq(), cunmqr(), dormlq(), dormqr(), FLA_Apply_Q_check(), FLA_Check_error_level(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Obj_vector_dim(), FLA_Obj_width(), FLA_Param_map_to_blas_side(), FLA_Param_map_to_blas_trans(), FLA_Query_blocksize(), sormlq(), sormqr(), zunmlq(), and zunmqr().
Referenced by fla_apply_q_blk_external_f().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, n_A, ldim_A; 00039 int m_B, n_B, ldim_B; 00040 int k_t; 00041 int lwork, info; 00042 char blas_side; 00043 char blas_trans; 00044 FLA_Obj work_obj; 00045 00046 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00047 FLA_Apply_Q_check( side, trans, storev, A, t, B ); 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_B = FLA_Obj_length( B ); 00058 n_B = FLA_Obj_width( B ); 00059 ldim_B = FLA_Obj_ldim( B ); 00060 00061 k_t = FLA_Obj_vector_dim( t ); 00062 00063 FLA_Param_map_to_blas_side( side, &blas_side ); 00064 FLA_Param_map_to_blas_trans( trans, &blas_trans ); 00065 00066 if ( side == FLA_LEFT ) 00067 lwork = n_A * FLA_Query_blocksize( datatype, FLA_DIMENSION_MIN ); 00068 else 00069 lwork = m_A * FLA_Query_blocksize( datatype, FLA_DIMENSION_MIN ); 00070 00071 FLA_Obj_create( datatype, lwork, 1, &work_obj ); 00072 00073 00074 switch( datatype ){ 00075 00076 case FLA_FLOAT: 00077 { 00078 float *buff_A = ( float * ) FLA_FLOAT_PTR( A ); 00079 float *buff_t = ( float * ) FLA_FLOAT_PTR( t ); 00080 float *buff_B = ( float * ) FLA_FLOAT_PTR( B ); 00081 float *buff_work = ( float * ) FLA_FLOAT_PTR( work_obj ); 00082 00083 if ( storev == FLA_COLUMNWISE ) 00084 FLA_C2F( sormqr )( &blas_side, 00085 &blas_trans, 00086 &m_B, 00087 &n_B, 00088 &k_t, 00089 buff_A, &ldim_A, 00090 buff_t, 00091 buff_B, &ldim_B, 00092 buff_work, &lwork, 00093 &info ); 00094 else // storev == FLA_ROWWISE 00095 FLA_C2F( sormlq )( &blas_side, 00096 &blas_trans, 00097 &m_B, 00098 &n_B, 00099 &k_t, 00100 buff_A, &ldim_A, 00101 buff_t, 00102 buff_B, &ldim_B, 00103 buff_work, &lwork, 00104 &info ); 00105 00106 break; 00107 } 00108 00109 case FLA_DOUBLE: 00110 { 00111 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A ); 00112 double *buff_t = ( double * ) FLA_DOUBLE_PTR( t ); 00113 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B ); 00114 double *buff_work = ( double * ) FLA_DOUBLE_PTR( work_obj ); 00115 00116 if ( storev == FLA_COLUMNWISE ) 00117 FLA_C2F( dormqr )( &blas_side, 00118 &blas_trans, 00119 &m_B, 00120 &n_B, 00121 &k_t, 00122 buff_A, &ldim_A, 00123 buff_t, 00124 buff_B, &ldim_B, 00125 buff_work, &lwork, 00126 &info ); 00127 else // storev == FLA_ROWWISE 00128 FLA_C2F( dormlq )( &blas_side, 00129 &blas_trans, 00130 &m_B, 00131 &n_B, 00132 &k_t, 00133 buff_A, &ldim_A, 00134 buff_t, 00135 buff_B, &ldim_B, 00136 buff_work, &lwork, 00137 &info ); 00138 00139 break; 00140 } 00141 00142 case FLA_COMPLEX: 00143 { 00144 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A ); 00145 scomplex *buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t ); 00146 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B ); 00147 scomplex *buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work_obj ); 00148 00149 if ( storev == FLA_COLUMNWISE ) 00150 FLA_C2F( cunmqr )( &blas_side, 00151 &blas_trans, 00152 &m_B, 00153 &n_B, 00154 &k_t, 00155 buff_A, &ldim_A, 00156 buff_t, 00157 buff_B, &ldim_B, 00158 buff_work, &lwork, 00159 &info ); 00160 else // storev == FLA_ROWWISE 00161 FLA_C2F( cunmlq )( &blas_side, 00162 &blas_trans, 00163 &m_B, 00164 &n_B, 00165 &k_t, 00166 buff_A, &ldim_A, 00167 buff_t, 00168 buff_B, &ldim_B, 00169 buff_work, &lwork, 00170 &info ); 00171 00172 break; 00173 } 00174 00175 case FLA_DOUBLE_COMPLEX: 00176 { 00177 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A ); 00178 dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t ); 00179 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B ); 00180 dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work_obj ); 00181 00182 if ( storev == FLA_COLUMNWISE ) 00183 FLA_C2F( zunmqr )( &blas_side, 00184 &blas_trans, 00185 &m_B, 00186 &n_B, 00187 &k_t, 00188 buff_A, &ldim_A, 00189 buff_t, 00190 buff_B, &ldim_B, 00191 buff_work, &lwork, 00192 &info ); 00193 else // storev == FLA_ROWWISE 00194 FLA_C2F( zunmlq )( &blas_side, 00195 &blas_trans, 00196 &m_B, 00197 &n_B, 00198 &k_t, 00199 buff_A, &ldim_A, 00200 buff_t, 00201 buff_B, &ldim_B, 00202 buff_work, &lwork, 00203 &info ); 00204 00205 break; 00206 } 00207 00208 } 00209 00210 FLA_Obj_free( &work_obj ); 00211 00212 return info; 00213 }
void FLA_F2C() fla_apply_q_blk_external_f | ( | F_INT * | side, | |
F_INT * | trans, | |||
F_INT * | storev, | |||
F_INT * | A, | |||
F_INT * | t, | |||
F_INT * | B, | |||
F_INT * | IERROR | |||
) |
References FLA_Apply_Q_blk_external().
00217 { 00218 *IERROR = FLA_Apply_Q_blk_external( *( ( FLA_Side * ) side ), 00219 *( ( FLA_Trans * ) trans ), 00220 *( ( FLA_Store * ) storev ), 00221 *( ( FLA_Obj * ) A ), 00222 *( ( FLA_Obj * ) t ), 00223 *( ( FLA_Obj * ) B ) ); 00224 }
FLA_Error FLA_Apply_Q_check | ( | FLA_Side | side, | |
FLA_Trans | trans, | |||
FLA_Store | storev, | |||
FLA_Obj | A, | |||
FLA_Obj | t, | |||
FLA_Obj | B | |||
) |
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_valid_complex_trans(), FLA_Check_valid_real_trans(), FLA_Check_valid_side(), FLA_Check_valid_storev(), FLA_Check_valid_trans(), and FLA_Obj_is_real().
Referenced by FLA_Apply_Q_blk_external(), and FLA_Apply_Q_unb_external().
00036 { 00037 FLA_Error e_val; 00038 00039 e_val = FLA_Check_valid_side( side ); 00040 FLA_Check_error_code( e_val ); 00041 00042 e_val = FLA_Check_valid_trans( trans ); 00043 FLA_Check_error_code( e_val ); 00044 00045 if ( FLA_Obj_is_real( A ) ) 00046 { 00047 e_val = FLA_Check_valid_real_trans( trans ); 00048 FLA_Check_error_code( e_val ); 00049 } 00050 else 00051 { 00052 e_val = FLA_Check_valid_complex_trans( trans ); 00053 FLA_Check_error_code( e_val ); 00054 } 00055 00056 e_val = FLA_Check_valid_storev( storev ); 00057 FLA_Check_error_code( e_val ); 00058 00059 e_val = FLA_Check_floating_object( A ); 00060 FLA_Check_error_code( e_val ); 00061 00062 e_val = FLA_Check_nonconstant_object( A ); 00063 FLA_Check_error_code( e_val ); 00064 00065 e_val = FLA_Check_identical_object_datatype( A, B ); 00066 FLA_Check_error_code( e_val ); 00067 00068 e_val = FLA_Check_identical_object_datatype( A, t ); 00069 FLA_Check_error_code( e_val ); 00070 00071 e_val = FLA_Check_square( A ); 00072 FLA_Check_error_code( e_val ); 00073 00074 if ( side == FLA_LEFT ) 00075 { 00076 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, B, B ); 00077 FLA_Check_error_code( e_val ); 00078 } 00079 else 00080 { 00081 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, B, A, B ); 00082 FLA_Check_error_code( e_val ); 00083 } 00084 00085 return FLA_SUCCESS; 00086 }
FLA_Error FLA_Apply_Q_unb_external | ( | FLA_Side | side, | |
FLA_Trans | trans, | |||
FLA_Store | storev, | |||
FLA_Obj | A, | |||
FLA_Obj | t, | |||
FLA_Obj | B | |||
) |
References cunm2r(), cunml2(), dorm2r(), dorml2(), FLA_Apply_Q_check(), FLA_Check_error_level(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Obj_vector_dim(), FLA_Obj_width(), FLA_Param_map_to_blas_side(), FLA_Param_map_to_blas_trans(), sorm2r(), sorml2(), zunm2r(), and zunml2().
Referenced by fla_apply_q_unb_external_f().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, n_A, ldim_A; 00039 int m_B, n_B, ldim_B; 00040 int k_t; 00041 int lwork, info; 00042 char blas_side; 00043 char blas_trans; 00044 FLA_Obj work_obj; 00045 00046 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00047 FLA_Apply_Q_check( side, trans, storev, A, t, B ); 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_B = FLA_Obj_length( B ); 00058 n_B = FLA_Obj_width( B ); 00059 ldim_B = FLA_Obj_ldim( B ); 00060 00061 k_t = FLA_Obj_vector_dim( t ); 00062 00063 FLA_Param_map_to_blas_side( side, &blas_side ); 00064 FLA_Param_map_to_blas_trans( trans, &blas_trans ); 00065 00066 if ( side == FLA_LEFT ) 00067 lwork = n_A; 00068 else 00069 lwork = m_A; 00070 00071 FLA_Obj_create( datatype, lwork, 1, &work_obj ); 00072 00073 00074 switch( datatype ){ 00075 00076 case FLA_FLOAT: 00077 { 00078 float *buff_A = ( float * ) FLA_FLOAT_PTR( A ); 00079 float *buff_t = ( float * ) FLA_FLOAT_PTR( t ); 00080 float *buff_B = ( float * ) FLA_FLOAT_PTR( B ); 00081 float *buff_work = ( float * ) FLA_FLOAT_PTR( work_obj ); 00082 00083 if ( storev == FLA_COLUMNWISE ) 00084 FLA_C2F( sorm2r )( &blas_side, 00085 &blas_trans, 00086 &m_B, 00087 &n_B, 00088 &k_t, 00089 buff_A, &ldim_A, 00090 buff_t, 00091 buff_B, &ldim_B, 00092 buff_work, 00093 &info ); 00094 else // storev == FLA_ROWWISE 00095 FLA_C2F( sorml2 )( &blas_side, 00096 &blas_trans, 00097 &m_B, 00098 &n_B, 00099 &k_t, 00100 buff_A, &ldim_A, 00101 buff_t, 00102 buff_B, &ldim_B, 00103 buff_work, 00104 &info ); 00105 00106 break; 00107 } 00108 00109 case FLA_DOUBLE: 00110 { 00111 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A ); 00112 double *buff_t = ( double * ) FLA_DOUBLE_PTR( t ); 00113 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B ); 00114 double *buff_work = ( double * ) FLA_DOUBLE_PTR( work_obj ); 00115 00116 if ( storev == FLA_COLUMNWISE ) 00117 FLA_C2F( dorm2r )( &blas_side, 00118 &blas_trans, 00119 &m_B, 00120 &n_B, 00121 &k_t, 00122 buff_A, &ldim_A, 00123 buff_t, 00124 buff_B, &ldim_B, 00125 buff_work, 00126 &info ); 00127 else // storev == FLA_ROWWISE 00128 FLA_C2F( dorml2 )( &blas_side, 00129 &blas_trans, 00130 &m_B, 00131 &n_B, 00132 &k_t, 00133 buff_A, &ldim_A, 00134 buff_t, 00135 buff_B, &ldim_B, 00136 buff_work, 00137 &info ); 00138 00139 break; 00140 } 00141 00142 case FLA_COMPLEX: 00143 { 00144 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A ); 00145 scomplex *buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t ); 00146 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B ); 00147 scomplex *buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work_obj ); 00148 00149 if ( storev == FLA_COLUMNWISE ) 00150 FLA_C2F( cunm2r )( &blas_side, 00151 &blas_trans, 00152 &m_B, 00153 &n_B, 00154 &k_t, 00155 buff_A, &ldim_A, 00156 buff_t, 00157 buff_B, &ldim_B, 00158 buff_work, 00159 &info ); 00160 else // storev == FLA_ROWWISE 00161 FLA_C2F( cunml2 )( &blas_side, 00162 &blas_trans, 00163 &m_B, 00164 &n_B, 00165 &k_t, 00166 buff_A, &ldim_A, 00167 buff_t, 00168 buff_B, &ldim_B, 00169 buff_work, 00170 &info ); 00171 00172 break; 00173 } 00174 00175 case FLA_DOUBLE_COMPLEX: 00176 { 00177 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A ); 00178 dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t ); 00179 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B ); 00180 dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work_obj ); 00181 00182 if ( storev == FLA_COLUMNWISE ) 00183 FLA_C2F( zunm2r )( &blas_side, 00184 &blas_trans, 00185 &m_B, 00186 &n_B, 00187 &k_t, 00188 buff_A, &ldim_A, 00189 buff_t, 00190 buff_B, &ldim_B, 00191 buff_work, 00192 &info ); 00193 else // storev == FLA_ROWWISE 00194 FLA_C2F( zunml2 )( &blas_side, 00195 &blas_trans, 00196 &m_B, 00197 &n_B, 00198 &k_t, 00199 buff_A, &ldim_A, 00200 buff_t, 00201 buff_B, &ldim_B, 00202 buff_work, 00203 &info ); 00204 00205 break; 00206 } 00207 00208 } 00209 00210 FLA_Obj_free( &work_obj ); 00211 00212 return info; 00213 }
void FLA_F2C() fla_apply_q_unb_external_f | ( | F_INT * | side, | |
F_INT * | trans, | |||
F_INT * | storev, | |||
F_INT * | A, | |||
F_INT * | t, | |||
F_INT * | B, | |||
F_INT * | IERROR | |||
) |
References FLA_Apply_Q_unb_external().
00217 { 00218 *IERROR = FLA_Apply_Q_unb_external( *( ( FLA_Side * ) side ), 00219 *( ( FLA_Trans * ) trans ), 00220 *( ( FLA_Store * ) storev ), 00221 *( ( FLA_Obj * ) A ), 00222 *( ( FLA_Obj * ) t ), 00223 *( ( FLA_Obj * ) B ) ); 00224 }
FLA_Error FLA_Apply_Q_UT | ( | FLA_Side | side, | |
FLA_Trans | trans, | |||
FLA_Store | storev, | |||
FLA_Obj | A, | |||
FLA_Obj | T, | |||
FLA_Obj | W, | |||
FLA_Obj | B | |||
) |
References FLA_Apply_Q_UT_check(), FLA_Apply_Q_UT_internal(), FLA_Blocksize_set(), FLA_Check_error_level(), and FLA_Obj_length().
Referenced by fla_apply_q_ut_f().
00039 { 00040 FLA_Error r_val; 00041 int nb_alg_in; 00042 00043 // Check parameters. 00044 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING ) 00045 FLA_Apply_Q_UT_check( side, trans, storev, A, T, W, B ); 00046 00047 // Compute the algorithmic blocksize. 00048 //nb_alg_in = max( FLA_Obj_width( T ) * FLA_QR_INNER_TO_OUTER_B_RATIO, 1 ); 00049 nb_alg_in = FLA_Obj_length( T ); 00050 00051 // Adjust the blocksize of the leaf control tree node. 00052 FLA_Blocksize_set( FLA_Cntl_blocksize( fla_apqut_cntl_leaf ), 00053 nb_alg_in, nb_alg_in, nb_alg_in, nb_alg_in ); 00054 00055 // Invoke FLA_Apply_Q_UT_internal() with the standard control tree. 00056 r_val = FLA_Apply_Q_UT_internal( side, trans, storev, A, T, W, B, fla_apqut_cntl_leaf ); 00057 00058 return r_val; 00059 }
FLA_Error FLA_Apply_Q_UT_check | ( | FLA_Side | side, | |
FLA_Trans | trans, | |||
FLA_Store | storev, | |||
FLA_Obj | A, | |||
FLA_Obj | T, | |||
FLA_Obj | W, | |||
FLA_Obj | B | |||
) |
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_valid_side(), FLA_Check_valid_storev(), and FLA_Check_valid_trans().
Referenced by FLA_Apply_Q_UT(), and FLASH_Apply_Q_UT().
00036 { 00037 FLA_Error e_val; 00038 00039 e_val = FLA_Check_valid_side( side ); 00040 FLA_Check_error_code( e_val ); 00041 00042 e_val = FLA_Check_valid_trans( trans ); 00043 FLA_Check_error_code( e_val ); 00044 00045 e_val = FLA_Check_valid_storev( storev ); 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, T ); 00055 FLA_Check_error_code( e_val ); 00056 00057 e_val = FLA_Check_identical_object_datatype( A, W ); 00058 FLA_Check_error_code( e_val ); 00059 00060 e_val = FLA_Check_identical_object_datatype( A, B ); 00061 FLA_Check_error_code( e_val ); 00062 00063 e_val = FLA_Check_square( A ); 00064 FLA_Check_error_code( e_val ); 00065 00066 if ( side == FLA_LEFT ) 00067 { 00068 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, T, A, T ); 00069 FLA_Check_error_code( e_val ); 00070 00071 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, B, B ); 00072 FLA_Check_error_code( e_val ); 00073 } 00074 else 00075 { 00076 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, T, T ); 00077 FLA_Check_error_code( e_val ); 00078 00079 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, B, A, B ); 00080 FLA_Check_error_code( e_val ); 00081 } 00082 00083 return FLA_SUCCESS; 00084 }
FLA_Error FLA_Apply_Q_UT_inc_check | ( | FLA_Side | side, | |
FLA_Trans | trans, | |||
FLA_Store | storev, | |||
FLA_Obj | A, | |||
FLA_Obj | TW, | |||
FLA_Obj | W1, | |||
FLA_Obj | B | |||
) |
References FLA_Check_conformal_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_valid_side(), FLA_Check_valid_storev(), and FLA_Check_valid_trans().
Referenced by FLASH_Apply_Q_UT_inc().
00036 { 00037 FLA_Error e_val; 00038 00039 e_val = FLA_Check_valid_side( side ); 00040 FLA_Check_error_code( e_val ); 00041 00042 e_val = FLA_Check_valid_trans( trans ); 00043 FLA_Check_error_code( e_val ); 00044 00045 e_val = FLA_Check_valid_storev( storev ); 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, TW ); 00055 FLA_Check_error_code( e_val ); 00056 00057 e_val = FLA_Check_identical_object_datatype( A, W1 ); 00058 FLA_Check_error_code( e_val ); 00059 00060 e_val = FLA_Check_identical_object_datatype( A, B ); 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_conformal_dims( FLA_NO_TRANSPOSE, A, TW ); 00067 FLA_Check_error_code( e_val ); 00068 00069 if ( side == FLA_LEFT ) 00070 { 00071 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, B, B ); 00072 FLA_Check_error_code( e_val ); 00073 } 00074 else 00075 { 00076 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, B, A, B ); 00077 FLA_Check_error_code( e_val ); 00078 } 00079 00080 return FLA_SUCCESS; 00081 }
FLA_Error FLA_Apply_Q_UT_inc_internal | ( | FLA_Side | side, | |
FLA_Trans | trans, | |||
FLA_Store | storev, | |||
FLA_Obj | A, | |||
FLA_Obj | TW, | |||
FLA_Obj | W1, | |||
FLA_Obj | B, | |||
fla_apqutinc_t * | cntl | |||
) |
Referenced by FLASH_Apply_Q_UT_inc().
00038 { 00039 FLA_Error r_val = FLA_SUCCESS; 00040 00041 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00042 FLA_Apply_Q_UT_inc_internal_check( side, trans, storev, A, TW, W1, B, cntl ); 00043 00044 if ( side == FLA_LEFT ) 00045 { 00046 if ( trans == FLA_NO_TRANSPOSE ) 00047 { 00048 if ( storev == FLA_COLUMNWISE ) 00049 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00050 else if ( storev == FLA_ROWWISE ) 00051 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00052 } 00053 else if ( trans == FLA_TRANSPOSE || trans == FLA_CONJ_TRANSPOSE ) 00054 { 00055 if ( storev == FLA_COLUMNWISE ) 00056 r_val = FLA_Apply_Q_UT_inc_lhc( A, TW, W1, B, cntl ); 00057 else if ( storev == FLA_ROWWISE ) 00058 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00059 } 00060 } 00061 else if ( side == FLA_RIGHT ) 00062 { 00063 if ( trans == FLA_NO_TRANSPOSE ) 00064 { 00065 if ( storev == FLA_COLUMNWISE ) 00066 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00067 else if ( storev == FLA_ROWWISE ) 00068 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00069 } 00070 else if ( trans == FLA_TRANSPOSE || trans == FLA_CONJ_TRANSPOSE ) 00071 { 00072 if ( storev == FLA_COLUMNWISE ) 00073 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00074 else if ( storev == FLA_ROWWISE ) 00075 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00076 } 00077 } 00078 00079 return r_val; 00080 }
FLA_Error FLA_Apply_Q_UT_inc_internal_check | ( | FLA_Side | side, | |
FLA_Trans | trans, | |||
FLA_Store | storev, | |||
FLA_Obj | A, | |||
FLA_Obj | TW, | |||
FLA_Obj | W1, | |||
FLA_Obj | B, | |||
fla_apqutinc_t * | cntl | |||
) |
References FLA_Check_conformal_dims(), FLA_Check_identical_object_elemtype(), FLA_Check_matrix_matrix_dims(), FLA_Check_null_pointer(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Obj_length(), and FLA_Obj_width().
Referenced by FLA_Apply_Q_UT_inc_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, TW ); 00045 FLA_Check_error_code( e_val ); 00046 00047 e_val = FLA_Check_identical_object_elemtype( A, W1 ); 00048 FLA_Check_error_code( e_val ); 00049 00050 e_val = FLA_Check_identical_object_elemtype( A, B ); 00051 FLA_Check_error_code( e_val ); 00052 00053 // Verify conformality between all the objects. This check works regardless 00054 // of whether the element type is FLA_MATRIX or FLA_SCALAR because the 00055 // element length and width are used instead of scalar length and width. 00056 if ( side == FLA_LEFT ) 00057 { 00058 e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, TW ); 00059 FLA_Check_error_code( e_val ); 00060 00061 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, B, B ); 00062 FLA_Check_error_code( e_val ); 00063 00064 e_val = FLA_Check_object_width_equals( W1, FLA_Obj_width( B ) ); 00065 FLA_Check_error_code( e_val ); 00066 } 00067 else 00068 { 00069 e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, TW ); 00070 FLA_Check_error_code( e_val ); 00071 00072 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, B, A, B ); 00073 FLA_Check_error_code( e_val ); 00074 00075 e_val = FLA_Check_object_length_equals( W1, FLA_Obj_length( B ) ); 00076 FLA_Check_error_code( e_val ); 00077 } 00078 00079 return FLA_SUCCESS; 00080 }
FLA_Error FLA_Apply_Q_UT_internal | ( | FLA_Side | side, | |
FLA_Trans | trans, | |||
FLA_Store | storev, | |||
FLA_Obj | A, | |||
FLA_Obj | T, | |||
FLA_Obj | W, | |||
FLA_Obj | B, | |||
fla_apqut_t * | cntl | |||
) |
References FLA_Apply_Q_UT_internal(), FLA_Apply_Q_UT_internal_check(), FLA_Apply_Q_UT_lhc(), FLA_Check_error_level(), FLA_Obj_elemtype(), and FLASH_Queue_get_enabled().
Referenced by FLA_Apply_Q_UT(), FLA_Apply_Q_UT_inc_lhc_blk_var1(), FLA_Apply_Q_UT_internal(), FLA_Apply_Q_UT_lhc_blk_var2(), FLA_Apply_Q_UT_lhc_task(), FLA_Apply_Q_UT_task(), FLA_QR_UT_inc_blk_var1(), FLA_QR_UT_inc_blk_var2(), and FLASH_Apply_Q_UT().
00040 { 00041 FLA_Error r_val = FLA_SUCCESS; 00042 00043 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00044 FLA_Apply_Q_UT_internal_check( side, trans, storev, A, T, W, B, cntl ); 00045 00046 if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER && 00047 FLA_Obj_elemtype( A ) == FLA_MATRIX && 00048 FLA_Cntl_variant( cntl ) == FLA_SUBPROBLEM ) 00049 { 00050 // Recurse 00051 r_val = FLA_Apply_Q_UT_internal( side, 00052 trans, 00053 storev, 00054 *FLASH_OBJ_PTR_AT( A ), 00055 *FLASH_OBJ_PTR_AT( T ), 00056 *FLASH_OBJ_PTR_AT( W ), 00057 *FLASH_OBJ_PTR_AT( B ), 00058 flash_apqut_cntl_leaf ); 00059 } 00060 else if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER && 00061 FLA_Obj_elemtype( A ) == FLA_SCALAR && 00062 FLASH_Queue_get_enabled( ) ) 00063 { 00064 // Enqueue 00065 ENQUEUE_FLASH_Apply_Q_UT( side, trans, storev, A, T, W, B, cntl ); 00066 } 00067 else 00068 { 00069 if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER && 00070 FLA_Obj_elemtype( A ) == FLA_SCALAR && 00071 !FLASH_Queue_get_enabled( ) ) 00072 { 00073 // Execute leaf. 00074 // NOTE: This may be redundant since we execute _internal() with 00075 // fla_apqut_cntl_leaf (in lieu of an _external() function) in 00076 // the helper function below. 00077 cntl = fla_apqut_cntl_leaf; 00078 } 00079 00080 if ( side == FLA_LEFT ) 00081 { 00082 if ( trans == FLA_NO_TRANSPOSE ) 00083 { 00084 if ( storev == FLA_COLUMNWISE ) 00085 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00086 else if ( storev == FLA_ROWWISE ) 00087 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00088 } 00089 else if ( trans == FLA_TRANSPOSE || trans == FLA_CONJ_TRANSPOSE ) 00090 { 00091 if ( storev == FLA_COLUMNWISE ) 00092 r_val = FLA_Apply_Q_UT_lhc( A, T, W, B, cntl ); 00093 else if ( storev == FLA_ROWWISE ) 00094 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00095 } 00096 } 00097 else if ( side == FLA_RIGHT ) 00098 { 00099 if ( trans == FLA_NO_TRANSPOSE ) 00100 { 00101 if ( storev == FLA_COLUMNWISE ) 00102 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00103 else if ( storev == FLA_ROWWISE ) 00104 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00105 } 00106 else if ( trans == FLA_TRANSPOSE || trans == FLA_CONJ_TRANSPOSE ) 00107 { 00108 if ( storev == FLA_COLUMNWISE ) 00109 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00110 else if ( storev == FLA_ROWWISE ) 00111 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00112 } 00113 } 00114 } 00115 00116 return r_val; 00117 }
FLA_Error FLA_Apply_Q_UT_internal_check | ( | FLA_Side | side, | |
FLA_Trans | trans, | |||
FLA_Store | storev, | |||
FLA_Obj | A, | |||
FLA_Obj | T, | |||
FLA_Obj | W, | |||
FLA_Obj | B, | |||
fla_apqut_t * | cntl | |||
) |
References FLA_Check_identical_object_elemtype(), FLA_Check_matrix_matrix_dims(), and FLA_Check_null_pointer().
Referenced by FLA_Apply_Q_UT_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, T ); 00045 FLA_Check_error_code( e_val ); 00046 00047 e_val = FLA_Check_identical_object_elemtype( A, W ); 00048 FLA_Check_error_code( e_val ); 00049 00050 e_val = FLA_Check_identical_object_elemtype( A, B ); 00051 FLA_Check_error_code( e_val ); 00052 00053 // Verify conformality between all the objects. This check works regardless 00054 // of whether the element type is FLA_MATRIX or FLA_SCALAR because the 00055 // element length and width are used instead of scalar length and width. 00056 if ( side == FLA_LEFT ) 00057 { 00058 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, B, B ); 00059 FLA_Check_error_code( e_val ); 00060 } 00061 else 00062 { 00063 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, B, A, B ); 00064 FLA_Check_error_code( e_val ); 00065 } 00066 00067 return FLA_SUCCESS; 00068 }
FLA_Error FLA_Apply_Q_UT_lhc_task | ( | FLA_Obj | A, | |
FLA_Obj | T, | |||
FLA_Obj | W, | |||
FLA_Obj | B, | |||
fla_apqut_t * | cntl | |||
) |
References FLA_Apply_Q_UT_internal().
Referenced by FLA_Apply_Q_UT_lhc().
00049 { 00050 return FLA_Apply_Q_UT_internal( FLA_LEFT, FLA_CONJ_TRANSPOSE, FLA_COLUMNWISE, 00051 A, T, W, B, 00052 fla_apqut_cntl_leaf ); 00053 }
FLA_Error FLA_Apply_Q_UT_task | ( | FLA_Side | side, | |
FLA_Trans | trans, | |||
FLA_Store | storev, | |||
FLA_Obj | A, | |||
FLA_Obj | T, | |||
FLA_Obj | W, | |||
FLA_Obj | B, | |||
fla_apqut_t * | cntl | |||
) |
References FLA_Apply_Q_UT_internal().
Referenced by FLASH_Queue_exec_task().
00038 { 00039 // This is normally where we would invoke the unblocked external 00040 // implementation. However, since we don't have one of those, per se, 00041 // we invoke the internal back-end with the leaf control tree for 00042 // flat matrices. 00043 return FLA_Apply_Q_UT_internal( side, trans, storev, 00044 A, T, W, B, 00045 fla_apqut_cntl_leaf ); 00046 }
FLA_Error FLA_Apply_Q_UT_UD_check | ( | FLA_Side | side, | |
FLA_Trans | trans, | |||
FLA_Store | storev, | |||
FLA_Obj | D, | |||
FLA_Obj | T, | |||
FLA_Obj | W, | |||
FLA_Obj | C, | |||
FLA_Obj | E | |||
) |
References FLA_Check_conformal_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_valid_side(), FLA_Check_valid_storev(), and FLA_Check_valid_trans().
Referenced by FLASH_Apply_Q_UT_UD().
00036 { 00037 FLA_Error e_val; 00038 00039 e_val = FLA_Check_valid_side( side ); 00040 FLA_Check_error_code( e_val ); 00041 00042 e_val = FLA_Check_valid_trans( trans ); 00043 FLA_Check_error_code( e_val ); 00044 00045 e_val = FLA_Check_valid_storev( storev ); 00046 FLA_Check_error_code( e_val ); 00047 00048 e_val = FLA_Check_floating_object( D ); 00049 FLA_Check_error_code( e_val ); 00050 00051 e_val = FLA_Check_nonconstant_object( D ); 00052 FLA_Check_error_code( e_val ); 00053 00054 e_val = FLA_Check_identical_object_datatype( D, T ); 00055 FLA_Check_error_code( e_val ); 00056 00057 e_val = FLA_Check_identical_object_datatype( D, W ); 00058 FLA_Check_error_code( e_val ); 00059 00060 e_val = FLA_Check_identical_object_datatype( D, C ); 00061 FLA_Check_error_code( e_val ); 00062 00063 e_val = FLA_Check_identical_object_datatype( D, E ); 00064 FLA_Check_error_code( e_val ); 00065 00066 e_val = FLA_Check_square( E ); 00067 FLA_Check_error_code( e_val ); 00068 00069 if ( side == FLA_LEFT ) 00070 { 00071 e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, D, T ); 00072 FLA_Check_error_code( e_val ); 00073 00074 e_val = FLA_Check_conformal_dims( FLA_TRANSPOSE, T, W ); 00075 FLA_Check_error_code( e_val ); 00076 00077 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, D, C, E ); 00078 FLA_Check_error_code( e_val ); 00079 } 00080 else 00081 { 00082 e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, C, T ); 00083 FLA_Check_error_code( e_val ); 00084 00085 e_val = FLA_Check_conformal_dims( FLA_TRANSPOSE, T, W ); 00086 FLA_Check_error_code( e_val ); 00087 00088 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, D, C, E ); 00089 FLA_Check_error_code( e_val ); 00090 } 00091 00092 return FLA_SUCCESS; 00093 }
FLA_Error FLA_Apply_Q_UT_UD_internal | ( | FLA_Side | side, | |
FLA_Trans | trans, | |||
FLA_Store | storev, | |||
FLA_Obj | D, | |||
FLA_Obj | T, | |||
FLA_Obj | W, | |||
FLA_Obj | C, | |||
FLA_Obj | E, | |||
fla_apqutud_t * | cntl | |||
) |
Referenced by FLA_Apply_Q_UT_inc_lhc_blk_var1(), FLA_Apply_Q_UT_UD_internal(), FLA_Apply_Q_UT_UD_lhc_blk_var2(), FLA_Apply_Q_UT_UD_lhc_blk_var3(), FLA_Apply_Q_UT_UD_lhc_task(), FLA_Apply_Q_UT_UD_task(), FLA_QR_UT_inc_blk_var1(), FLA_QR_UT_inc_blk_var2(), and FLASH_Apply_Q_UT_UD().
00042 { 00043 FLA_Error r_val = FLA_SUCCESS; 00044 00045 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00046 FLA_Apply_Q_UT_UD_internal_check( side, trans, storev, D, T, W, C, E, cntl ); 00047 00048 if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER && 00049 FLA_Obj_elemtype( D ) == FLA_MATRIX && 00050 FLA_Cntl_variant( cntl ) == FLA_SUBPROBLEM ) 00051 { 00052 // Recurse 00053 r_val = FLA_Apply_Q_UT_UD_internal( side, 00054 trans, 00055 storev, 00056 *FLASH_OBJ_PTR_AT( D ), 00057 *FLASH_OBJ_PTR_AT( T ), 00058 *FLASH_OBJ_PTR_AT( W ), 00059 *FLASH_OBJ_PTR_AT( C ), 00060 *FLASH_OBJ_PTR_AT( E ), 00061 flash_apqutud_cntl_leaf ); 00062 } 00063 else if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER && 00064 FLA_Obj_elemtype( D ) == FLA_SCALAR && 00065 FLASH_Queue_get_enabled( ) ) 00066 { 00067 // Enqueue 00068 ENQUEUE_FLASH_Apply_Q_UT_UD( side, trans, storev, D, T, W, C, E, cntl ); 00069 } 00070 else 00071 { 00072 if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER && 00073 FLA_Obj_elemtype( D ) == FLA_SCALAR && 00074 !FLASH_Queue_get_enabled( ) ) 00075 { 00076 // Execute leaf. 00077 // NOTE: This may be redundant since we execute _internal() with 00078 // fla_apqutud_cntl_leaf (in lieu of an _external() function) in 00079 // the helper function below. 00080 cntl = fla_apqutud_cntl_leaf; 00081 } 00082 00083 if ( side == FLA_LEFT ) 00084 { 00085 if ( trans == FLA_NO_TRANSPOSE ) 00086 { 00087 if ( storev == FLA_COLUMNWISE ) 00088 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00089 else if ( storev == FLA_ROWWISE ) 00090 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00091 } 00092 else if ( trans == FLA_TRANSPOSE || trans == FLA_CONJ_TRANSPOSE ) 00093 { 00094 if ( storev == FLA_COLUMNWISE ) 00095 r_val = FLA_Apply_Q_UT_UD_lhc( D, T, W, C, E, cntl ); 00096 else if ( storev == FLA_ROWWISE ) 00097 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00098 } 00099 } 00100 else if ( side == FLA_RIGHT ) 00101 { 00102 if ( trans == FLA_NO_TRANSPOSE ) 00103 { 00104 if ( storev == FLA_COLUMNWISE ) 00105 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00106 else if ( storev == FLA_ROWWISE ) 00107 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00108 } 00109 else if ( trans == FLA_TRANSPOSE || trans == FLA_CONJ_TRANSPOSE ) 00110 { 00111 if ( storev == FLA_COLUMNWISE ) 00112 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00113 else if ( storev == FLA_ROWWISE ) 00114 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00115 } 00116 } 00117 } 00118 00119 return r_val; 00120 }
FLA_Error FLA_Apply_Q_UT_UD_internal_check | ( | FLA_Side | side, | |
FLA_Trans | trans, | |||
FLA_Store | storev, | |||
FLA_Obj | D, | |||
FLA_Obj | T, | |||
FLA_Obj | W, | |||
FLA_Obj | C, | |||
FLA_Obj | E, | |||
fla_apqutud_t * | cntl | |||
) |
References FLA_Check_conformal_dims(), FLA_Check_identical_object_elemtype(), FLA_Check_matrix_matrix_dims(), FLA_Check_null_pointer(), and FLA_Obj_elemtype().
Referenced by FLA_Apply_Q_UT_UD_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( D, T ); 00045 FLA_Check_error_code( e_val ); 00046 00047 e_val = FLA_Check_identical_object_elemtype( D, W ); 00048 FLA_Check_error_code( e_val ); 00049 00050 e_val = FLA_Check_identical_object_elemtype( D, C ); 00051 FLA_Check_error_code( e_val ); 00052 00053 e_val = FLA_Check_identical_object_elemtype( D, E ); 00054 FLA_Check_error_code( e_val ); 00055 00056 // Verify conformality between all the objects. 00057 if ( side == FLA_LEFT ) 00058 { 00059 if ( FLA_Obj_elemtype( D ) == FLA_MATRIX ) 00060 { 00061 e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, D, T ); 00062 FLA_Check_error_code( e_val ); 00063 00064 e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, C, W ); 00065 FLA_Check_error_code( e_val ); 00066 } 00067 else //FLA_Obj_elemtype( D ) == FLA_SCALAR 00068 { 00069 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_TRANSPOSE, E, C, D ); 00070 FLA_Check_error_code( e_val ); 00071 } 00072 00073 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, D, C, E ); 00074 FLA_Check_error_code( e_val ); 00075 00076 } 00077 else 00078 { 00079 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00080 } 00081 00082 return FLA_SUCCESS; 00083 }
FLA_Error FLA_Apply_Q_UT_UD_lhc_task | ( | FLA_Obj | D, | |
FLA_Obj | T, | |||
FLA_Obj | W, | |||
FLA_Obj | C, | |||
FLA_Obj | E, | |||
fla_apqutud_t * | cntl | |||
) |
References FLA_Apply_Q_UT_UD_internal().
Referenced by FLA_Apply_Q_UT_UD_lhc().
00052 { 00053 return FLA_Apply_Q_UT_UD_internal( FLA_LEFT, FLA_CONJ_TRANSPOSE, FLA_COLUMNWISE, 00054 D, T, W, C, E, 00055 fla_apqutud_cntl_leaf ); 00056 }
FLA_Error FLA_Apply_Q_UT_UD_task | ( | FLA_Side | side, | |
FLA_Trans | trans, | |||
FLA_Store | storev, | |||
FLA_Obj | D, | |||
FLA_Obj | T, | |||
FLA_Obj | W, | |||
FLA_Obj | C, | |||
FLA_Obj | E, | |||
fla_apqutud_t * | cntl | |||
) |
References FLA_Apply_Q_UT_UD_internal().
Referenced by FLASH_Queue_exec_task().
00040 { 00041 // This is normally where we would invoke the unblocked external 00042 // implementation. However, since we don't have one of those, per se, 00043 // we invoke the internal back-end with the leaf control tree for 00044 // flat matrices. 00045 return FLA_Apply_Q_UT_UD_internal( side, trans, storev, 00046 D, T, W, C, E, 00047 fla_apqutud_cntl_leaf ); 00048 }
References FLA_Check_error_level(), FLA_Chol_check(), and FLA_Chol_internal().
Referenced by fla_chol_f().
00039 { 00040 FLA_Error r_val; 00041 00042 // Check parameters. 00043 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING ) 00044 FLA_Chol_check( uplo, A ); 00045 00046 // Invoke FLA_Chol_internal() with the appropriate control tree. 00047 r_val = FLA_Chol_internal( uplo, A, fla_chol_cntl2 ); 00048 00049 return r_val; 00050 }
References cpotrf(), dpotrf(), FLA_Check_error_level(), FLA_Chol_check(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Param_map_to_blas_uplo(), spotrf(), and zpotrf().
Referenced by fla_chol_blk_external_f(), and FLA_SPDinv_blk_external().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, ldim_A; 00039 int info; 00040 char blas_uplo; 00041 00042 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00043 FLA_Chol_check( uplo, A ); 00044 00045 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00046 00047 datatype = FLA_Obj_datatype( A ); 00048 00049 m_A = FLA_Obj_length( A ); 00050 ldim_A = FLA_Obj_ldim( A ); 00051 00052 FLA_Param_map_to_blas_uplo( uplo, &blas_uplo ); 00053 00054 00055 switch( datatype ){ 00056 00057 case FLA_FLOAT: 00058 { 00059 float *buff_A = ( float * ) FLA_FLOAT_PTR( A ); 00060 00061 FLA_C2F( spotrf )( &blas_uplo, 00062 &m_A, 00063 buff_A, &ldim_A, 00064 &info ); 00065 00066 break; 00067 } 00068 00069 case FLA_DOUBLE: 00070 { 00071 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A ); 00072 00073 FLA_C2F( dpotrf )( &blas_uplo, 00074 &m_A, 00075 buff_A, &ldim_A, 00076 &info ); 00077 00078 break; 00079 } 00080 00081 case FLA_COMPLEX: 00082 { 00083 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A ); 00084 00085 FLA_C2F( cpotrf )( &blas_uplo, 00086 &m_A, 00087 buff_A, &ldim_A, 00088 &info ); 00089 00090 break; 00091 } 00092 00093 case FLA_DOUBLE_COMPLEX: 00094 { 00095 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A ); 00096 00097 FLA_C2F( zpotrf )( &blas_uplo, 00098 &m_A, 00099 buff_A, &ldim_A, 00100 &info ); 00101 00102 break; 00103 } 00104 00105 } 00106 00107 return info; 00108 }
void FLA_F2C() fla_chol_blk_external_f | ( | F_INT * | uplo, | |
F_INT * | A, | |||
F_INT * | IERROR | |||
) |
References FLA_Chol_blk_external().
00112 { 00113 *IERROR = FLA_Chol_blk_external( *( ( FLA_Uplo * ) uplo ), 00114 *( ( FLA_Obj * ) A ) ); 00115 }
References FLA_Check_floating_object(), FLA_Check_nonconstant_object(), FLA_Check_square(), and FLA_Check_valid_uplo().
Referenced by FLA_Chol(), FLA_Chol_blk_external(), FLA_Chol_unb_external(), and FLASH_Chol().
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_square( A ); 00049 FLA_Check_error_code( e_val ); 00050 00051 return FLA_SUCCESS; 00052 }
void FLA_F2C() fla_chol_f | ( | F_INT * | uplo, | |
F_INT * | A, | |||
F_INT * | IERROR | |||
) |
FLA_Error FLA_Chol_internal | ( | FLA_Uplo | uplo, | |
FLA_Obj | A, | |||
fla_chol_t * | cntl | |||
) |
References FLA_Check_error_level(), FLA_Chol_internal(), FLA_Chol_internal_check(), FLA_Chol_l(), FLA_Chol_u(), FLA_Obj_elemtype(), and FLASH_Queue_get_enabled().
Referenced by FLA_Chol(), FLA_Chol_internal(), FLA_Chol_l_blk_var1(), FLA_Chol_l_blk_var2(), FLA_Chol_l_blk_var3(), FLA_Chol_u_blk_var1(), FLA_Chol_u_blk_var2(), FLA_Chol_u_blk_var3(), FLA_SPDinv_internal(), and FLASH_Chol().
00039 { 00040 FLA_Error r_val = FLA_SUCCESS; 00041 00042 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00043 FLA_Chol_internal_check( uplo, A, 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_Chol_internal( uplo, 00051 *FLASH_OBJ_PTR_AT( A ), 00052 flash_chol_cntl ); 00053 } 00054 else if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER && 00055 FLA_Obj_elemtype( A ) == FLA_SCALAR && 00056 FLASH_Queue_get_enabled( ) ) 00057 { 00058 // Enqueue 00059 ENQUEUE_FLASH_Chol( uplo, A, cntl ); 00060 } 00061 else 00062 { 00063 if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER && 00064 FLA_Obj_elemtype( A ) == FLA_SCALAR && 00065 !FLASH_Queue_get_enabled( ) ) 00066 { 00067 // Execute leaf 00068 cntl = flash_chol_cntl_lapack; 00069 } 00070 00071 // Parameter combinations 00072 if ( uplo == FLA_LOWER_TRIANGULAR ) 00073 { 00074 r_val = FLA_Chol_l( A, cntl ); 00075 } 00076 else if ( uplo == FLA_UPPER_TRIANGULAR ) 00077 { 00078 r_val = FLA_Chol_u( A, cntl ); 00079 } 00080 } 00081 00082 return r_val; 00083 }
FLA_Error FLA_Chol_internal_check | ( | FLA_Uplo | uplo, | |
FLA_Obj | A, | |||
fla_chol_t * | cntl | |||
) |
References FLA_Check_null_pointer().
Referenced by FLA_Chol_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 return FLA_SUCCESS; 00044 }
FLA_Error FLA_Chol_l_task | ( | FLA_Obj | A, | |
fla_chol_t * | cntl | |||
) |
References FLA_Chol_unb_external().
Referenced by FLA_Chol_l().
00041 { 00042 return FLA_Chol_unb_external( FLA_LOWER_TRIANGULAR, A ); 00043 }
FLA_Error FLA_Chol_task | ( | FLA_Uplo | uplo, | |
FLA_Obj | A, | |||
fla_chol_t * | cntl | |||
) |
References FLA_Chol_unb_external().
Referenced by FLASH_Queue_exec_task().
00036 { 00037 return FLA_Chol_unb_external( uplo, A ); 00038 }
FLA_Error FLA_Chol_u_task | ( | FLA_Obj | A, | |
fla_chol_t * | cntl | |||
) |
References FLA_Chol_unb_external().
Referenced by FLA_Chol_u().
00046 { 00047 return FLA_Chol_unb_external( FLA_UPPER_TRIANGULAR, A ); 00048 }
References cpotf2(), dpotf2(), FLA_Check_error_level(), FLA_Chol_check(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Param_map_to_blas_uplo(), spotf2(), and zpotf2().
Referenced by FLA_Chol_l_task(), FLA_Chol_task(), FLA_Chol_u_task(), and fla_chol_unb_external_f().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, ldim_A; 00039 int info; 00040 char blas_uplo; 00041 00042 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00043 FLA_Chol_check( uplo, A ); 00044 00045 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00046 00047 datatype = FLA_Obj_datatype( A ); 00048 00049 m_A = FLA_Obj_length( A ); 00050 ldim_A = FLA_Obj_ldim( A ); 00051 00052 FLA_Param_map_to_blas_uplo( uplo, &blas_uplo ); 00053 00054 00055 switch( datatype ){ 00056 00057 case FLA_FLOAT: 00058 { 00059 float *buff_A = ( float * ) FLA_FLOAT_PTR( A ); 00060 00061 FLA_C2F( spotf2 )( &blas_uplo, 00062 &m_A, 00063 buff_A, &ldim_A, 00064 &info ); 00065 00066 break; 00067 } 00068 00069 case FLA_DOUBLE: 00070 { 00071 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A ); 00072 00073 FLA_C2F( dpotf2 )( &blas_uplo, 00074 &m_A, 00075 buff_A, &ldim_A, 00076 &info ); 00077 00078 break; 00079 } 00080 00081 case FLA_COMPLEX: 00082 { 00083 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A ); 00084 00085 FLA_C2F( cpotf2 )( &blas_uplo, 00086 &m_A, 00087 buff_A, &ldim_A, 00088 &info ); 00089 00090 break; 00091 } 00092 00093 case FLA_DOUBLE_COMPLEX: 00094 { 00095 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A ); 00096 00097 FLA_C2F( zpotf2 )( &blas_uplo, 00098 &m_A, 00099 buff_A, &ldim_A, 00100 &info ); 00101 00102 break; 00103 } 00104 00105 } 00106 00107 return info; 00108 }
void FLA_F2C() fla_chol_unb_external_f | ( | F_INT * | uplo, | |
F_INT * | A, | |||
F_INT * | IERROR | |||
) |
References FLA_Chol_unb_external().
00112 { 00113 *IERROR = FLA_Chol_unb_external( *( ( int * ) uplo ), 00114 *( ( FLA_Obj * ) A ) ); 00115 }
References FLA_Check_floating_object(), FLA_Check_int_object(), FLA_Check_nonconstant_object(), and FLA_Check_square().
Referenced by FLASH_FS_incpiv().
00036 { 00037 FLA_Error e_val; 00038 00039 e_val = FLA_Check_square( A ); 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_floating_object( L ); 00049 FLA_Check_error_code( e_val ); 00050 00051 e_val = FLA_Check_nonconstant_object( L ); 00052 FLA_Check_error_code( e_val ); 00053 00054 e_val = FLA_Check_int_object( p ); 00055 FLA_Check_error_code( e_val ); 00056 00057 e_val = FLA_Check_nonconstant_object( p ); 00058 FLA_Check_error_code( e_val ); 00059 00060 e_val = FLA_Check_floating_object( b ); 00061 FLA_Check_error_code( e_val ); 00062 00063 e_val = FLA_Check_nonconstant_object( b ); 00064 FLA_Check_error_code( e_val ); 00065 00066 return FLA_SUCCESS; 00067 }
Referenced by fla_hess_f().
00039 { 00040 FLA_Error r_val; 00041 00042 // Note the following constraints: 0 <= ilo <= n-1, 0 <= ihi <= n-1. 00043 r_val = FLA_Hess_internal( A, t, ilo, ihi, fla_hess_cntl ); 00044 00045 return r_val; 00046 }
References cgehrd(), dgehrd(), FLA_Check_error_level(), FLA_Hess_check(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_width(), FLA_Query_blocksize(), sgehrd(), and zgehrd().
Referenced by fla_hess_blk_external_f().
00036 { 00037 FLA_Datatype datatype; 00038 int n_A, ldim_A; 00039 int lwork, info; 00040 FLA_Obj work_obj; 00041 int ilo_1, ihi_1; 00042 00043 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00044 FLA_Hess_check( A, t, ilo, ihi ); 00045 00046 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00047 00048 datatype = FLA_Obj_datatype( A ); 00049 00050 n_A = FLA_Obj_width( A ); 00051 ldim_A = FLA_Obj_ldim( A ); 00052 lwork = n_A * FLA_Query_blocksize( datatype, FLA_DIMENSION_MIN ); 00053 ilo_1 = ilo + 1; 00054 ihi_1 = ihi + 1; 00055 00056 FLA_Obj_create( datatype, lwork, 1, &work_obj ); 00057 00058 switch( datatype ){ 00059 00060 case FLA_FLOAT: 00061 { 00062 float *buff_A = ( float * ) FLA_FLOAT_PTR( A ); 00063 float *buff_t = ( float * ) FLA_FLOAT_PTR( t ); 00064 float *buff_work = ( float * ) FLA_FLOAT_PTR( work_obj ); 00065 00066 FLA_C2F( sgehrd )( &n_A, 00067 &ilo_1, 00068 &ihi_1, 00069 buff_A, &ldim_A, 00070 buff_t, 00071 buff_work, &lwork, 00072 &info ); 00073 00074 break; 00075 } 00076 00077 case FLA_DOUBLE: 00078 { 00079 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A ); 00080 double *buff_t = ( double * ) FLA_DOUBLE_PTR( t ); 00081 double *buff_work = ( double * ) FLA_DOUBLE_PTR( work_obj ); 00082 00083 FLA_C2F( dgehrd )( &n_A, 00084 &ilo_1, 00085 &ihi_1, 00086 buff_A, &ldim_A, 00087 buff_t, 00088 buff_work, &lwork, 00089 &info ); 00090 00091 break; 00092 } 00093 00094 case FLA_COMPLEX: 00095 { 00096 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A ); 00097 scomplex *buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t ); 00098 scomplex *buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work_obj ); 00099 00100 FLA_C2F( cgehrd )( &n_A, 00101 &ilo_1, 00102 &ihi_1, 00103 buff_A, &ldim_A, 00104 buff_t, 00105 buff_work, &lwork, 00106 &info ); 00107 00108 break; 00109 } 00110 00111 case FLA_DOUBLE_COMPLEX: 00112 { 00113 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A ); 00114 dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t ); 00115 dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work_obj ); 00116 00117 FLA_C2F( zgehrd )( &n_A, 00118 &ilo_1, 00119 &ihi_1, 00120 buff_A, &ldim_A, 00121 buff_t, 00122 buff_work, &lwork, 00123 &info ); 00124 00125 break; 00126 } 00127 00128 } 00129 00130 FLA_Obj_free( &work_obj ); 00131 00132 return info; 00133 }
void FLA_F2C() fla_hess_blk_external_f | ( | F_INT * | A, | |
F_INT * | T, | |||
F_INT * | ILO, | |||
F_INT * | IHI, | |||
F_INT * | IERROR | |||
) |
References FLA_Hess_blk_external().
00137 { 00138 *IERROR = FLA_Hess_blk_external( *( ( FLA_Obj * ) A ), 00139 *( ( FLA_Obj * ) t ), 00140 *( ( int * ) ilo ), 00141 *( ( int * ) ihi ) ); 00142 }
References FLA_Check_floating_object(), FLA_Check_hess_indices(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_vector_length_min(), and FLA_Obj_width().
Referenced by FLA_Hess_blk_external(), and FLA_Hess_unb_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, t ); 00046 FLA_Check_error_code( e_val ); 00047 00048 e_val = FLA_Check_vector_length_min( t, FLA_Obj_width( A ) - 1 ); 00049 FLA_Check_error_code( e_val ); 00050 00051 e_val = FLA_Check_hess_indices( A, ilo, ihi ); 00052 FLA_Check_error_code( e_val ); 00053 00054 return FLA_SUCCESS; 00055 }
void FLA_F2C() fla_hess_f | ( | F_INT * | A, | |
F_INT * | T, | |||
F_INT * | ILO, | |||
F_INT * | IHI, | |||
F_INT * | IERROR | |||
) |
References FLA_Hess().
00050 { 00051 *IERROR = FLA_Hess( *( ( FLA_Obj * ) A ), 00052 *( ( FLA_Obj * ) t ), 00053 *( ( int * ) ilo ), 00054 *( ( int * ) ihi ) ); 00055 }
FLA_Error FLA_Hess_internal | ( | FLA_Obj | A, | |
FLA_Obj | t, | |||
int | ilo, | |||
int | ihi, | |||
fla_hess_t * | cntl | |||
) |
References FLA_Check_error_level(), FLA_Check_null_pointer(), and FLA_Hess_unb_external().
Referenced by FLA_Hess().
00036 { 00037 FLA_Error r_val = FLA_SUCCESS; 00038 00039 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING ) 00040 { 00041 FLA_Error e_val = FLA_Check_null_pointer( ( void* ) cntl ); 00042 FLA_Check_error_code( e_val ); 00043 } 00044 00045 if ( FLA_Cntl_variant( cntl ) == FLA_SUBPROBLEM ) 00046 { 00047 r_val = FLA_Hess_unb_external( A, t, ilo, ihi ); 00048 } 00049 #ifdef FLA_ENABLE_NON_CRITICAL_CODE 00050 else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT1 ) 00051 { 00052 // libflame currently lacks implementations for reduction to upper 00053 // Hessenberg form, so for now we just call the external implementation. 00054 r_val = FLA_Hess_unb_external( A, t, ilo, ihi ); 00055 } 00056 #endif 00057 else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT2 ) 00058 { 00059 // libflame currently lacks implementations for reduction to upper 00060 // Hessenberg form, so for now we just call the external implementation. 00061 r_val = FLA_Hess_unb_external( A, t, ilo, ihi ); 00062 } 00063 00064 return r_val; 00065 }
References cgehd2(), dgehd2(), FLA_Check_error_level(), FLA_Hess_check(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_width(), sgehd2(), and zgehd2().
Referenced by FLA_Hess_internal(), and fla_hess_unb_external_f().
00036 { 00037 FLA_Datatype datatype; 00038 int n_A, ldim_A; 00039 int info; 00040 FLA_Obj work_obj; 00041 int ilo_1, ihi_1; 00042 00043 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00044 FLA_Hess_check( A, t, ilo, ihi ); 00045 00046 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00047 00048 datatype = FLA_Obj_datatype( A ); 00049 00050 n_A = FLA_Obj_width( A ); 00051 ldim_A = FLA_Obj_ldim( A ); 00052 ilo_1 = ilo + 1; 00053 ihi_1 = ihi + 1; 00054 00055 FLA_Obj_create( datatype, n_A, 1, &work_obj ); 00056 00057 switch( datatype ){ 00058 00059 case FLA_FLOAT: 00060 { 00061 float *buff_A = ( float * ) FLA_FLOAT_PTR( A ); 00062 float *buff_t = ( float * ) FLA_FLOAT_PTR( t ); 00063 float *buff_work = ( float * ) FLA_FLOAT_PTR( work_obj ); 00064 00065 FLA_C2F( sgehd2 )( &n_A, 00066 &ilo_1, 00067 &ihi_1, 00068 buff_A, &ldim_A, 00069 buff_t, 00070 buff_work, 00071 &info ); 00072 00073 break; 00074 } 00075 00076 case FLA_DOUBLE: 00077 { 00078 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A ); 00079 double *buff_t = ( double * ) FLA_DOUBLE_PTR( t ); 00080 double *buff_work = ( double * ) FLA_DOUBLE_PTR( work_obj ); 00081 00082 FLA_C2F( dgehd2 )( &n_A, 00083 &ilo_1, 00084 &ihi_1, 00085 buff_A, &ldim_A, 00086 buff_t, 00087 buff_work, 00088 &info ); 00089 00090 break; 00091 } 00092 00093 case FLA_COMPLEX: 00094 { 00095 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A ); 00096 scomplex *buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t ); 00097 scomplex *buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work_obj ); 00098 00099 FLA_C2F( cgehd2 )( &n_A, 00100 &ilo_1, 00101 &ihi_1, 00102 buff_A, &ldim_A, 00103 buff_t, 00104 buff_work, 00105 &info ); 00106 00107 break; 00108 } 00109 00110 case FLA_DOUBLE_COMPLEX: 00111 { 00112 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A ); 00113 dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t ); 00114 dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work_obj ); 00115 00116 FLA_C2F( zgehd2 )( &n_A, 00117 &ilo_1, 00118 &ihi_1, 00119 buff_A, &ldim_A, 00120 buff_t, 00121 buff_work, 00122 &info ); 00123 00124 break; 00125 } 00126 00127 } 00128 00129 FLA_Obj_free( &work_obj ); 00130 00131 return info; 00132 }
void FLA_F2C() fla_hess_unb_external_f | ( | F_INT * | A, | |
F_INT * | T, | |||
F_INT * | ILO, | |||
F_INT * | IHI, | |||
F_INT * | IERROR | |||
) |
References FLA_Hess_unb_external().
00136 { 00137 *IERROR = FLA_Hess_unb_external( *( ( FLA_Obj * ) A ), 00138 *( ( FLA_Obj * ) t ), 00139 *( ( int * ) ilo ), 00140 *( ( int * ) ihi ) ); 00141 }
References cgelqf(), dgelqf(), FLA_Check_error_level(), FLA_LQ_check(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Obj_width(), FLA_Query_blocksize(), sgelqf(), and zgelqf().
Referenced by fla_lq_blk_external_f().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, n_A, ldim_A; 00039 int lwork, info; 00040 FLA_Obj work_obj; 00041 00042 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00043 FLA_LQ_check( A, t ); 00044 00045 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00046 00047 datatype = FLA_Obj_datatype( A ); 00048 00049 m_A = FLA_Obj_length( A ); 00050 n_A = FLA_Obj_width( A ); 00051 ldim_A = FLA_Obj_ldim( A ); 00052 lwork = m_A * FLA_Query_blocksize( datatype, FLA_DIMENSION_MIN ); 00053 00054 FLA_Obj_create( datatype, lwork, 1, &work_obj ); 00055 00056 switch( datatype ){ 00057 00058 case FLA_FLOAT: 00059 { 00060 float *buff_A = ( float * ) FLA_FLOAT_PTR( A ); 00061 float *buff_t = ( float * ) FLA_FLOAT_PTR( t ); 00062 float *buff_work = ( float * ) FLA_FLOAT_PTR( work_obj ); 00063 00064 FLA_C2F( sgelqf )( &m_A, 00065 &n_A, 00066 buff_A, &ldim_A, 00067 buff_t, 00068 buff_work, &lwork, 00069 &info ); 00070 00071 break; 00072 } 00073 00074 case FLA_DOUBLE: 00075 { 00076 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A ); 00077 double *buff_t = ( double * ) FLA_DOUBLE_PTR( t ); 00078 double *buff_work = ( double * ) FLA_DOUBLE_PTR( work_obj ); 00079 00080 FLA_C2F( dgelqf )( &m_A, 00081 &n_A, 00082 buff_A, &ldim_A, 00083 buff_t, 00084 buff_work, &lwork, 00085 &info ); 00086 00087 break; 00088 } 00089 00090 case FLA_COMPLEX: 00091 { 00092 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A ); 00093 scomplex *buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t ); 00094 scomplex *buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work_obj ); 00095 00096 FLA_C2F( cgelqf )( &m_A, 00097 &n_A, 00098 buff_A, &ldim_A, 00099 buff_t, 00100 buff_work, &lwork, 00101 &info ); 00102 00103 break; 00104 } 00105 00106 case FLA_DOUBLE_COMPLEX: 00107 { 00108 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A ); 00109 dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t ); 00110 dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work_obj ); 00111 00112 FLA_C2F( zgelqf )( &m_A, 00113 &n_A, 00114 buff_A, &ldim_A, 00115 buff_t, 00116 buff_work, &lwork, 00117 &info ); 00118 00119 break; 00120 } 00121 00122 } 00123 00124 FLA_Obj_free( &work_obj ); 00125 00126 return info; 00127 }
void FLA_F2C() fla_lq_blk_external_f | ( | F_INT * | A, | |
F_INT * | t, | |||
F_INT * | IERROR | |||
) |
References FLA_LQ_blk_external().
00131 { 00132 *IERROR = FLA_LQ_blk_external( *( ( FLA_Obj * ) A ), 00133 *( ( FLA_Obj * ) t ) ); 00134 }
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_vector_length(), and FLA_Obj_min_dim().
Referenced by FLA_LQ_blk_external(), FLA_LQ_unb_external(), FLA_LQ_UT_blk_external(), and FLA_LQ_UT_unb_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, t ); 00046 FLA_Check_error_code( e_val ); 00047 00048 e_val = FLA_Check_vector_length( t, FLA_Obj_min_dim( A ) ); 00049 FLA_Check_error_code( e_val ); 00050 00051 return FLA_SUCCESS; 00052 }
References cgelq2(), dgelq2(), FLA_Check_error_level(), FLA_LQ_check(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Obj_width(), sgelq2(), and zgelq2().
Referenced by fla_lq_unb_external_f().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, n_A, ldim_A; 00039 int info; 00040 FLA_Obj work_obj; 00041 00042 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00043 FLA_LQ_check( A, t ); 00044 00045 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00046 00047 datatype = FLA_Obj_datatype( A ); 00048 00049 m_A = FLA_Obj_length( A ); 00050 n_A = FLA_Obj_width( A ); 00051 ldim_A = FLA_Obj_ldim( A ); 00052 00053 FLA_Obj_create( datatype, m_A, 1, &work_obj ); 00054 00055 switch( datatype ){ 00056 00057 case FLA_FLOAT: 00058 { 00059 float *buff_A = ( float * ) FLA_FLOAT_PTR( A ); 00060 float *buff_t = ( float * ) FLA_FLOAT_PTR( t ); 00061 float *buff_work = ( float * ) FLA_FLOAT_PTR( work_obj ); 00062 00063 FLA_C2F( sgelq2 )( &m_A, 00064 &n_A, 00065 buff_A, &ldim_A, 00066 buff_t, 00067 buff_work, 00068 &info ); 00069 00070 break; 00071 } 00072 00073 case FLA_DOUBLE: 00074 { 00075 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A ); 00076 double *buff_t = ( double * ) FLA_DOUBLE_PTR( t ); 00077 double *buff_work = ( double * ) FLA_DOUBLE_PTR( work_obj ); 00078 00079 FLA_C2F( dgelq2 )( &m_A, 00080 &n_A, 00081 buff_A, &ldim_A, 00082 buff_t, 00083 buff_work, 00084 &info ); 00085 00086 break; 00087 } 00088 00089 case FLA_COMPLEX: 00090 { 00091 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A ); 00092 scomplex *buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t ); 00093 scomplex *buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work_obj ); 00094 00095 FLA_C2F( cgelq2 )( &m_A, 00096 &n_A, 00097 buff_A, &ldim_A, 00098 buff_t, 00099 buff_work, 00100 &info ); 00101 00102 break; 00103 } 00104 00105 case FLA_DOUBLE_COMPLEX: 00106 { 00107 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A ); 00108 dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t ); 00109 dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work_obj ); 00110 00111 FLA_C2F( zgelq2 )( &m_A, 00112 &n_A, 00113 buff_A, &ldim_A, 00114 buff_t, 00115 buff_work, 00116 &info ); 00117 00118 break; 00119 } 00120 00121 } 00122 00123 FLA_Obj_free( &work_obj ); 00124 00125 return info; 00126 }
void FLA_F2C() fla_lq_unb_external_f | ( | F_INT * | A, | |
F_INT * | t, | |||
F_INT * | IERROR | |||
) |
References FLA_LQ_unb_external().
00130 { 00131 *IERROR = FLA_LQ_unb_external( *( ( FLA_Obj * ) A ), 00132 *( ( FLA_Obj * ) t ) ); 00133 }
Referenced by fla_lq_ut_f().
00038 { 00039 FLA_Error r_val; 00040 dim_t nb_alg; 00041 00042 // Check parameters. 00043 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING ) 00044 FLA_LQ_UT_check( A, T ); 00045 00046 // Inspect the width of T to get the implied blocksize. 00047 nb_alg = FLA_Obj_width( T ); 00048 00049 // Adjust the top parent control tree node based on the implied blocksize. 00050 FLA_Blocksize_set( FLA_Cntl_blocksize( fla_lqut_cntl_leaf ), 00051 nb_alg, nb_alg, nb_alg, nb_alg ); 00052 00053 // Invoke FLA_LQ_UT_internal() with the standard control tree. 00054 //r_val = FLA_LQ_UT_blk_var1( A, T, fla_lqut_cntl_leaf ); 00055 r_val = FLA_LQ_UT_internal( A, T, fla_lqut_cntl_leaf ); 00056 00057 return r_val; 00058 }
References FLA_Accum_T_UT_unb_external(), FLA_Check_error_level(), FLA_LQ_UT_check(), FLA_LQ_UT_unb_external(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), and FLA_Obj_min_dim().
Referenced by FLA_LQ_UT_internal().
00036 { 00037 FLA_Obj t; 00038 00039 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00040 FLA_LQ_UT_check( A, T ); 00041 00042 FLA_Obj_create( FLA_Obj_datatype( A ), FLA_Obj_min_dim( A ), 1, &t ); 00043 00044 FLA_LQ_UT_unb_external( A, t ); 00045 00046 FLA_Accum_T_UT_unb_external( FLA_FORWARD, FLA_ROWWISE, A, t, T ); 00047 00048 FLA_Obj_free( &t ); 00049 00050 return FLA_SUCCESS; 00051 }
References cgelqfut(), dgelqfut(), FLA_Check_error_level(), FLA_LQ_check(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Obj_width(), FLA_Query_blocksize(), sgelqfut(), and zgelqfut().
Referenced by fla_lq_ut_blk_external_f().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, n_A, ldim_A; 00039 int lwork, info; 00040 FLA_Obj work_obj; 00041 00042 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00043 FLA_LQ_check( A, t ); 00044 00045 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00046 00047 datatype = FLA_Obj_datatype( A ); 00048 00049 m_A = FLA_Obj_length( A ); 00050 n_A = FLA_Obj_width( A ); 00051 ldim_A = FLA_Obj_ldim( A ); 00052 lwork = m_A * FLA_Query_blocksize( datatype, FLA_DIMENSION_MIN ); 00053 00054 FLA_Obj_create( datatype, lwork, 1, &work_obj ); 00055 00056 switch( datatype ){ 00057 00058 case FLA_FLOAT: 00059 { 00060 float *buff_A = ( float * ) FLA_FLOAT_PTR( A ); 00061 float *buff_t = ( float * ) FLA_FLOAT_PTR( t ); 00062 float *buff_work = ( float * ) FLA_FLOAT_PTR( work_obj ); 00063 00064 FLA_C2F( sgelqfut )( &m_A, 00065 &n_A, 00066 buff_A, &ldim_A, 00067 buff_t, 00068 buff_work, &lwork, 00069 &info ); 00070 00071 break; 00072 } 00073 00074 case FLA_DOUBLE: 00075 { 00076 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A ); 00077 double *buff_t = ( double * ) FLA_DOUBLE_PTR( t ); 00078 double *buff_work = ( double * ) FLA_DOUBLE_PTR( work_obj ); 00079 00080 FLA_C2F( dgelqfut )( &m_A, 00081 &n_A, 00082 buff_A, &ldim_A, 00083 buff_t, 00084 buff_work, &lwork, 00085 &info ); 00086 00087 break; 00088 } 00089 00090 case FLA_COMPLEX: 00091 { 00092 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A ); 00093 scomplex *buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t ); 00094 scomplex *buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work_obj ); 00095 00096 FLA_C2F( cgelqfut )( &m_A, 00097 &n_A, 00098 buff_A, &ldim_A, 00099 buff_t, 00100 buff_work, &lwork, 00101 &info ); 00102 00103 break; 00104 } 00105 00106 case FLA_DOUBLE_COMPLEX: 00107 { 00108 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A ); 00109 dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t ); 00110 dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work_obj ); 00111 00112 FLA_C2F( zgelqfut )( &m_A, 00113 &n_A, 00114 buff_A, &ldim_A, 00115 buff_t, 00116 buff_work, &lwork, 00117 &info ); 00118 00119 break; 00120 } 00121 00122 } 00123 00124 FLA_Obj_free( &work_obj ); 00125 00126 return info; 00127 }
void FLA_F2C() fla_lq_ut_blk_external_f | ( | F_INT * | A, | |
F_INT * | t, | |||
F_INT * | IERROR | |||
) |
References FLA_LQ_UT_blk_external().
00131 { 00132 *IERROR = FLA_LQ_UT_blk_external( *( ( FLA_Obj * ) A ), 00133 *( ( FLA_Obj * ) t ) ); 00134 }
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), and FLA_Check_nonconstant_object().
Referenced by FLA_LQ_UT(), and FLA_LQ_UT_Accum_T_unb_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, T ); 00046 FLA_Check_error_code( e_val ); 00047 00048 return FLA_SUCCESS; 00049 }
void FLA_F2C() fla_lq_ut_create_t_f | ( | F_INT * | A, | |
F_INT * | T, | |||
F_INT * | IERROR | |||
) |
References FLA_LQ_UT_create_T().
00058 { 00059 *IERROR = FLA_LQ_UT_create_T( *( ( FLA_Obj * ) A ), 00060 ( ( FLA_Obj * ) T ) ); 00061 }
void FLA_F2C() fla_lq_ut_f | ( | F_INT * | A, | |
F_INT * | S, | |||
F_INT * | IERROR | |||
) |
FLA_Error FLA_LQ_UT_internal | ( | FLA_Obj | A, | |
FLA_Obj | S, | |||
fla_lqut_t * | cntl | |||
) |
Referenced by FLA_LQ_UT(), FLA_LQ_UT_Accum_T_blk_var1(), FLA_LQ_UT_blk_var2(), and FLA_LQ_UT_task().
00036 { 00037 FLA_Error r_val = FLA_SUCCESS; 00038 00039 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00040 FLA_LQ_UT_internal_check( A, T, cntl ); 00041 00042 if ( FLA_Cntl_variant( cntl ) == FLA_SUBPROBLEM ) 00043 { 00044 //r_val = FLA_LQ_UT_task( A, T, cntl ); 00045 r_val = FLA_LQ_UT_Accum_T_unb_external( A, T ); 00046 } 00047 else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT1 ) 00048 { 00049 r_val = FLA_LQ_UT_Accum_T_blk_var1( A, T, cntl ); 00050 } 00051 else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT2 ) 00052 { 00053 r_val = FLA_LQ_UT_blk_var2( A, T, cntl ); 00054 } 00055 00056 return r_val; 00057 }
FLA_Error FLA_LQ_UT_internal_check | ( | FLA_Obj | A, | |
FLA_Obj | T, | |||
fla_lqut_t * | cntl | |||
) |
References FLA_Check_identical_object_elemtype(), FLA_Check_null_pointer(), FLA_Check_object_length_equals(), and FLA_Obj_length().
Referenced by FLA_LQ_UT_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, T ); 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_object_length_equals( T, FLA_Obj_length( A ) ); 00051 FLA_Check_error_code( e_val ); 00052 00053 return FLA_SUCCESS; 00054 }
References FLA_Check_consistent_object_datatype(), FLA_Check_floating_object(), FLA_Check_if_vector(), FLA_Check_object_length_equals(), and FLA_Obj_vector_dim().
Referenced by FLA_LQ_UT_recover_tau().
00036 { 00037 FLA_Error e_val; 00038 00039 e_val = FLA_Check_floating_object( T ); 00040 FLA_Check_error_code( e_val ); 00041 00042 e_val = FLA_Check_consistent_object_datatype( T, tau ); 00043 FLA_Check_error_code( e_val ); 00044 00045 e_val = FLA_Check_if_vector( tau ); 00046 FLA_Check_error_code( e_val ); 00047 00048 e_val = FLA_Check_object_length_equals( T, FLA_Obj_vector_dim( tau ) ); 00049 FLA_Check_error_code( e_val ); 00050 00051 return FLA_SUCCESS; 00052 }
void FLA_F2C() fla_lq_ut_recover_tau_f | ( | F_INT * | T, | |
F_INT * | tau, | |||
F_INT * | IERROR | |||
) |
References FLA_LQ_UT_recover_tau().
00151 { 00152 *IERROR = FLA_LQ_UT_recover_tau( *( ( FLA_Obj * ) T ), 00153 *( ( FLA_Obj * ) tau ) ); 00154 }
FLA_Error FLA_LQ_UT_task | ( | FLA_Obj | A, | |
FLA_Obj | T, | |||
fla_lqut_t * | cntl | |||
) |
References FLA_LQ_UT_internal().
00038 { 00039 // This is normally where we would invoke the unblocked external 00040 // implementation. However, since we don't have one of those, per se, 00041 // we invoke the internal back-end with the leaf control tree for 00042 // flat matrices. 00043 return FLA_LQ_UT_internal( A, T, 00044 fla_lqut_cntl_leaf ); 00045 }
References cgelq2ut(), dgelq2ut(), FLA_Check_error_level(), FLA_LQ_check(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Obj_width(), sgelq2ut(), and zgelq2ut().
Referenced by FLA_LQ_UT_Accum_T_unb_external(), and fla_lq_ut_unb_external_f().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, n_A, ldim_A; 00039 int info; 00040 FLA_Obj work_obj; 00041 00042 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00043 FLA_LQ_check( A, t ); 00044 00045 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00046 00047 datatype = FLA_Obj_datatype( A ); 00048 00049 m_A = FLA_Obj_length( A ); 00050 n_A = FLA_Obj_width( A ); 00051 ldim_A = FLA_Obj_ldim( A ); 00052 00053 FLA_Obj_create( datatype, m_A, 1, &work_obj ); 00054 00055 switch( datatype ){ 00056 00057 case FLA_FLOAT: 00058 { 00059 float *buff_A = ( float * ) FLA_FLOAT_PTR( A ); 00060 float *buff_t = ( float * ) FLA_FLOAT_PTR( t ); 00061 float *buff_work = ( float * ) FLA_FLOAT_PTR( work_obj ); 00062 00063 FLA_C2F( sgelq2ut )( &m_A, 00064 &n_A, 00065 buff_A, &ldim_A, 00066 buff_t, 00067 buff_work, 00068 &info ); 00069 00070 break; 00071 } 00072 00073 case FLA_DOUBLE: 00074 { 00075 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A ); 00076 double *buff_t = ( double * ) FLA_DOUBLE_PTR( t ); 00077 double *buff_work = ( double * ) FLA_DOUBLE_PTR( work_obj ); 00078 00079 FLA_C2F( dgelq2ut )( &m_A, 00080 &n_A, 00081 buff_A, &ldim_A, 00082 buff_t, 00083 buff_work, 00084 &info ); 00085 00086 break; 00087 } 00088 00089 case FLA_COMPLEX: 00090 { 00091 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A ); 00092 scomplex *buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t ); 00093 scomplex *buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work_obj ); 00094 00095 FLA_C2F( cgelq2ut )( &m_A, 00096 &n_A, 00097 buff_A, &ldim_A, 00098 buff_t, 00099 buff_work, 00100 &info ); 00101 00102 break; 00103 } 00104 00105 case FLA_DOUBLE_COMPLEX: 00106 { 00107 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A ); 00108 dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t ); 00109 dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work_obj ); 00110 00111 FLA_C2F( zgelq2ut )( &m_A, 00112 &n_A, 00113 buff_A, &ldim_A, 00114 buff_t, 00115 buff_work, 00116 &info ); 00117 00118 break; 00119 } 00120 00121 } 00122 00123 FLA_Obj_free( &work_obj ); 00124 00125 return info; 00126 }
void FLA_F2C() fla_lq_ut_unb_external_f | ( | F_INT * | A, | |
F_INT * | t, | |||
F_INT * | IERROR | |||
) |
References FLA_LQ_UT_unb_external().
00130 { 00131 *IERROR = FLA_LQ_UT_unb_external( *( ( FLA_Obj * ) A ), 00132 *( ( FLA_Obj * ) t ) ); 00133 }
References FLA_Check_floating_object(), FLA_Check_int_object(), FLA_Check_nonconstant_object(), and FLA_Check_square().
Referenced by FLASH_LU_incpiv().
00036 { 00037 FLA_Error e_val; 00038 00039 e_val = FLA_Check_square( A ); 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_floating_object( L ); 00049 FLA_Check_error_code( e_val ); 00050 00051 e_val = FLA_Check_nonconstant_object( L ); 00052 FLA_Check_error_code( e_val ); 00053 00054 e_val = FLA_Check_int_object( p ); 00055 FLA_Check_error_code( e_val ); 00056 00057 e_val = FLA_Check_nonconstant_object( p ); 00058 FLA_Check_error_code( e_val ); 00059 00060 return FLA_SUCCESS; 00061 }
References FLA_Check_error_level(), FLA_LU_nopiv_check(), and FLA_LU_nopiv_internal().
Referenced by fla_lu_nopiv_f().
00039 { 00040 FLA_Error r_val; 00041 00042 // Check parameters. 00043 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING ) 00044 FLA_LU_nopiv_check( A ); 00045 00046 // Invoke FLA_LU_nopiv_internal() with large control tree. 00047 r_val = FLA_LU_nopiv_internal( A, fla_lu_nopiv_cntl2 ); 00048 00049 return r_val; 00050 }
References cgetnf(), dgetnf(), FLA_Check_error_level(), FLA_LU_nopiv_check(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Obj_width(), sgetnf(), and zgetnf().
Referenced by fla_lu_nopiv_blk_external_f().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, n_A, ldim_A; 00039 int info; 00040 00041 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00042 FLA_LU_nopiv_check( A ); 00043 00044 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00045 00046 datatype = FLA_Obj_datatype( A ); 00047 00048 m_A = FLA_Obj_length( A ); 00049 n_A = FLA_Obj_width( A ); 00050 ldim_A = FLA_Obj_ldim( A ); 00051 00052 00053 switch( datatype ){ 00054 00055 case FLA_FLOAT: 00056 { 00057 float *buff_A = ( float * ) FLA_FLOAT_PTR( A ); 00058 00059 FLA_C2F( sgetnf )( &m_A, 00060 &n_A, 00061 buff_A, &ldim_A, 00062 &info ); 00063 00064 break; 00065 } 00066 00067 case FLA_DOUBLE: 00068 { 00069 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A ); 00070 00071 FLA_C2F( dgetnf )( &m_A, 00072 &n_A, 00073 buff_A, &ldim_A, 00074 &info ); 00075 00076 break; 00077 } 00078 00079 case FLA_COMPLEX: 00080 { 00081 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A ); 00082 00083 FLA_C2F( cgetnf )( &m_A, 00084 &n_A, 00085 buff_A, &ldim_A, 00086 &info ); 00087 00088 break; 00089 } 00090 00091 case FLA_DOUBLE_COMPLEX: 00092 { 00093 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A ); 00094 00095 FLA_C2F( zgetnf )( &m_A, 00096 &n_A, 00097 buff_A, &ldim_A, 00098 &info ); 00099 00100 break; 00101 } 00102 00103 } 00104 00105 return info; 00106 }
void FLA_F2C() fla_lu_nopiv_blk_external_f | ( | F_INT * | A, | |
F_INT * | IERROR | |||
) |
References FLA_LU_nopiv_blk_external().
00110 { 00111 *IERROR = FLA_LU_nopiv_blk_external( *( ( FLA_Obj * ) A ) ); 00112 }
References FLA_Check_floating_object(), and FLA_Check_nonconstant_object().
Referenced by FLA_LU_nopiv(), FLA_LU_nopiv_blk_external(), FLA_LU_nopiv_unb_external(), and FLASH_LU_nopiv().
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 return FLA_SUCCESS; 00046 }
void FLA_F2C() fla_lu_nopiv_f | ( | F_INT * | A, | |
F_INT * | IERROR | |||
) |
Referenced by FLA_LU_nopiv(), FLA_LU_nopiv_blk_var1(), FLA_LU_nopiv_blk_var2(), FLA_LU_nopiv_blk_var3(), FLA_LU_nopiv_blk_var4(), FLA_LU_nopiv_blk_var5(), FLA_LU_nopiv_internal(), and FLASH_LU_nopiv().
00039 { 00040 FLA_Error r_val = FLA_SUCCESS; 00041 00042 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00043 FLA_LU_nopiv_internal_check( A, 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_LU_nopiv_internal( *FLASH_OBJ_PTR_AT( A ), 00051 flash_lu_nopiv_cntl ); 00052 } 00053 else if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER && 00054 FLA_Obj_elemtype( A ) == FLA_SCALAR && 00055 FLASH_Queue_get_enabled( ) ) 00056 { 00057 // Enqueue 00058 ENQUEUE_FLASH_LU_nopiv( A, cntl ); 00059 } 00060 else 00061 { 00062 if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER && 00063 FLA_Obj_elemtype( A ) == FLA_SCALAR && 00064 !FLASH_Queue_get_enabled( ) ) 00065 { 00066 // Execute leaf 00067 cntl = flash_lu_nopiv_cntl_lapack; 00068 } 00069 00070 // Parameter combinations 00071 if ( FLA_Cntl_variant( cntl ) == FLA_SUBPROBLEM ) 00072 { 00073 r_val = FLA_LU_nopiv_task( A, cntl ); 00074 } 00075 #ifdef FLA_ENABLE_NON_CRITICAL_CODE 00076 else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT1 ) 00077 { 00078 r_val = FLA_LU_nopiv_blk_var1( A, cntl ); 00079 } 00080 else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT2 ) 00081 { 00082 r_val = FLA_LU_nopiv_blk_var2( A, cntl ); 00083 } 00084 else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT3 ) 00085 { 00086 r_val = FLA_LU_nopiv_blk_var3( A, cntl ); 00087 } 00088 else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT4 ) 00089 { 00090 r_val = FLA_LU_nopiv_blk_var4( A, cntl ); 00091 } 00092 #endif 00093 else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT5 ) 00094 { 00095 r_val = FLA_LU_nopiv_blk_var5( A, cntl ); 00096 } 00097 } 00098 00099 return r_val; 00100 }
References FLA_Check_null_pointer().
Referenced by FLA_LU_nopiv_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 return FLA_SUCCESS; 00044 }
References FLA_LU_nopiv_unb_external().
Referenced by FLA_LU_nopiv_internal(), and FLASH_Queue_exec_task().
00036 { 00037 return FLA_LU_nopiv_unb_external( A ); 00038 }
References cgetn2(), dgetn2(), FLA_Check_error_level(), FLA_LU_nopiv_check(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Obj_width(), sgetn2(), and zgetn2().
Referenced by FLA_LU_nopiv_task(), and fla_lu_nopiv_unb_external_f().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, n_A, ldim_A; 00039 int info; 00040 00041 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00042 FLA_LU_nopiv_check( A ); 00043 00044 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00045 00046 datatype = FLA_Obj_datatype( A ); 00047 00048 m_A = FLA_Obj_length( A ); 00049 n_A = FLA_Obj_width( A ); 00050 ldim_A = FLA_Obj_ldim( A ); 00051 00052 00053 switch( datatype ){ 00054 00055 case FLA_FLOAT: 00056 { 00057 float *buff_A = ( float * ) FLA_FLOAT_PTR( A ); 00058 00059 FLA_C2F( sgetn2 )( &m_A, 00060 &n_A, 00061 buff_A, &ldim_A, 00062 &info ); 00063 00064 break; 00065 } 00066 00067 case FLA_DOUBLE: 00068 { 00069 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A ); 00070 00071 FLA_C2F( dgetn2 )( &m_A, 00072 &n_A, 00073 buff_A, &ldim_A, 00074 &info ); 00075 00076 break; 00077 } 00078 00079 case FLA_COMPLEX: 00080 { 00081 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A ); 00082 00083 FLA_C2F( cgetn2 )( &m_A, 00084 &n_A, 00085 buff_A, &ldim_A, 00086 &info ); 00087 00088 break; 00089 } 00090 00091 case FLA_DOUBLE_COMPLEX: 00092 { 00093 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A ); 00094 00095 FLA_C2F( zgetn2 )( &m_A, 00096 &n_A, 00097 buff_A, &ldim_A, 00098 &info ); 00099 00100 break; 00101 } 00102 00103 } 00104 00105 return info; 00106 }
void FLA_F2C() fla_lu_nopiv_unb_external_f | ( | F_INT * | A, | |
F_INT * | IERROR | |||
) |
References FLA_LU_nopiv_unb_external().
00110 { 00111 *IERROR = FLA_LU_nopiv_unb_external( *( ( FLA_Obj * ) A ) ); 00112 }
References FLA_Check_error_level(), FLA_LU_piv_check(), and FLA_LU_piv_internal().
Referenced by fla_lu_piv_f().
00039 { 00040 FLA_Error r_val; 00041 00042 // Check parameters. 00043 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING ) 00044 FLA_LU_piv_check( A, p ); 00045 00046 // Invoke FLA_LU_piv_internal() with large control tree. 00047 r_val = FLA_LU_piv_internal( A, p, fla_lu_piv_cntl2 ); 00048 00049 return r_val; 00050 }
References cgetrf(), dgetrf(), FLA_Check_error_level(), FLA_LU_piv_check(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Obj_width(), FLA_Shift_pivots_to(), sgetrf(), and zgetrf().
Referenced by fla_lu_piv_blk_external_f().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, n_A, ldim_A; 00039 int info; 00040 00041 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00042 FLA_LU_piv_check( A, p ); 00043 00044 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00045 00046 datatype = FLA_Obj_datatype( A ); 00047 00048 m_A = FLA_Obj_length( A ); 00049 n_A = FLA_Obj_width( A ); 00050 ldim_A = FLA_Obj_ldim( A ); 00051 00052 00053 switch( datatype ){ 00054 00055 case FLA_FLOAT: 00056 { 00057 float *buff_A = ( float * ) FLA_FLOAT_PTR( A ); 00058 int *buff_p = ( int * ) FLA_INT_PTR( p ); 00059 00060 FLA_C2F( sgetrf )( &m_A, 00061 &n_A, 00062 buff_A, &ldim_A, 00063 buff_p, 00064 &info ); 00065 00066 break; 00067 } 00068 00069 case FLA_DOUBLE: 00070 { 00071 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A ); 00072 int *buff_p = ( int * ) FLA_INT_PTR( p ); 00073 00074 FLA_C2F( dgetrf )( &m_A, 00075 &n_A, 00076 buff_A, &ldim_A, 00077 buff_p, 00078 &info ); 00079 00080 break; 00081 } 00082 00083 case FLA_COMPLEX: 00084 { 00085 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A ); 00086 int *buff_p = ( int * ) FLA_INT_PTR( p ); 00087 00088 FLA_C2F( cgetrf )( &m_A, 00089 &n_A, 00090 buff_A, &ldim_A, 00091 buff_p, 00092 &info ); 00093 00094 break; 00095 } 00096 00097 case FLA_DOUBLE_COMPLEX: 00098 { 00099 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A ); 00100 int *buff_p = ( int * ) FLA_INT_PTR( p ); 00101 00102 FLA_C2F( zgetrf )( &m_A, 00103 &n_A, 00104 buff_A, &ldim_A, 00105 buff_p, 00106 &info ); 00107 00108 break; 00109 } 00110 00111 } 00112 00113 FLA_Shift_pivots_to( FLA_NATIVE_PIVOTS, p ); 00114 00115 return info; 00116 }
void FLA_F2C() fla_lu_piv_blk_external_f | ( | F_INT * | A, | |
F_INT * | p, | |||
F_INT * | IERROR | |||
) |
References FLA_LU_piv_blk_external().
00120 { 00121 *IERROR = FLA_LU_piv_blk_external( *( ( FLA_Obj * ) A ), 00122 *( ( FLA_Obj * ) p ) ); 00123 }
References FLA_Check_floating_object(), FLA_Check_int_object(), FLA_Check_nonconstant_object(), FLA_Check_vector_length(), and FLA_Obj_min_dim().
Referenced by FLA_LU_piv(), FLA_LU_piv_blk_external(), and FLA_LU_piv_unb_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_int_object( p ); 00046 FLA_Check_error_code( e_val ); 00047 00048 e_val = FLA_Check_vector_length( p, FLA_Obj_min_dim( A ) ); 00049 FLA_Check_error_code( e_val ); 00050 00051 return FLA_SUCCESS; 00052 }
References FLA_Copy_external(), and FLA_LU_piv_unb_external().
Referenced by FLASH_LU_incpiv_var2(), and FLASH_Queue_exec_task().
00036 { 00037 FLA_Error r_val; 00038 00039 r_val = FLA_LU_piv_unb_external( A, p ); 00040 00041 FLA_Copy_external( A, U ); 00042 00043 return r_val; 00044 }
void FLA_F2C() fla_lu_piv_f | ( | F_INT * | A, | |
F_INT * | p, | |||
F_INT * | IERROR | |||
) |
References FLA_LU_piv().
00054 { 00055 *IERROR = FLA_LU_piv( *( ( FLA_Obj * ) A ), 00056 *( ( FLA_Obj * ) p ) ); 00057 }
Referenced by FLA_LU_piv(), FLA_LU_piv_blk_var3(), FLA_LU_piv_blk_var4(), and FLA_LU_piv_blk_var5().
00036 { 00037 FLA_Error r_val = FLA_SUCCESS; 00038 00039 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING ) 00040 { 00041 FLA_Error e_val = FLA_Check_null_pointer( ( void* ) cntl ); 00042 FLA_Check_error_code( e_val ); 00043 } 00044 00045 if ( FLA_Cntl_variant( cntl ) == FLA_SUBPROBLEM ) 00046 { 00047 r_val = FLA_LU_piv_task( A, p, cntl ); 00048 } 00049 #ifdef FLA_ENABLE_NON_CRITICAL_CODE 00050 else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT3 ) 00051 { 00052 r_val = FLA_LU_piv_blk_var3( A, p, cntl ); 00053 } 00054 else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT4 ) 00055 { 00056 r_val = FLA_LU_piv_blk_var4( A, p, cntl ); 00057 } 00058 #endif 00059 else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT5 ) 00060 { 00061 r_val = FLA_LU_piv_blk_var5( A, p, cntl ); 00062 } 00063 00064 return r_val; 00065 }
References FLA_LU_piv_unb_external().
Referenced by FLA_LU_piv_internal(), FLASH_LU_incpiv_var1(), and FLASH_Queue_exec_task().
00036 { 00037 return FLA_LU_piv_unb_external( A, p ); 00038 }
References cgetf2(), dgetf2(), FLA_Check_error_level(), FLA_LU_piv_check(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Obj_width(), FLA_Shift_pivots_to(), sgetf2(), and zgetf2().
Referenced by FLA_LU_piv_copy_task(), FLA_LU_piv_task(), and fla_lu_piv_unb_external_f().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, n_A, ldim_A; 00039 int info; 00040 00041 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00042 FLA_LU_piv_check( A, p ); 00043 00044 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00045 00046 datatype = FLA_Obj_datatype( A ); 00047 00048 m_A = FLA_Obj_length( A ); 00049 n_A = FLA_Obj_width( A ); 00050 ldim_A = FLA_Obj_ldim( A ); 00051 00052 00053 switch( datatype ){ 00054 00055 case FLA_FLOAT: 00056 { 00057 float *buff_A = ( float * ) FLA_FLOAT_PTR( A ); 00058 int *buff_p = ( int * ) FLA_INT_PTR( p ); 00059 00060 FLA_C2F( sgetf2 )( &m_A, 00061 &n_A, 00062 buff_A, &ldim_A, 00063 buff_p, 00064 &info ); 00065 00066 break; 00067 } 00068 00069 case FLA_DOUBLE: 00070 { 00071 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A ); 00072 int *buff_p = ( int * ) FLA_INT_PTR( p ); 00073 00074 FLA_C2F( dgetf2 )( &m_A, 00075 &n_A, 00076 buff_A, &ldim_A, 00077 buff_p, 00078 &info ); 00079 00080 break; 00081 } 00082 00083 case FLA_COMPLEX: 00084 { 00085 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A ); 00086 int *buff_p = ( int * ) FLA_INT_PTR( p ); 00087 00088 FLA_C2F( cgetf2 )( &m_A, 00089 &n_A, 00090 buff_A, &ldim_A, 00091 buff_p, 00092 &info ); 00093 00094 break; 00095 } 00096 00097 case FLA_DOUBLE_COMPLEX: 00098 { 00099 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A ); 00100 int *buff_p = ( int * ) FLA_INT_PTR( p ); 00101 00102 FLA_C2F( zgetf2 )( &m_A, 00103 &n_A, 00104 buff_A, &ldim_A, 00105 buff_p, 00106 &info ); 00107 00108 break; 00109 } 00110 00111 } 00112 00113 FLA_Shift_pivots_to( FLA_NATIVE_PIVOTS, p ); 00114 00115 return info; 00116 }
void FLA_F2C() fla_lu_piv_unb_external_f | ( | F_INT * | A, | |
F_INT * | p, | |||
F_INT * | IERROR | |||
) |
References FLA_LU_piv_unb_external().
00120 { 00121 *IERROR = FLA_LU_piv_unb_external( *( ( FLA_Obj * ) A ), 00122 *( ( FLA_Obj * ) p ) ); 00123 }
References cgeqrf(), dgeqrf(), FLA_Check_error_level(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Obj_width(), FLA_QR_check(), FLA_Query_blocksize(), sgeqrf(), and zgeqrf().
Referenced by fla_qr_blk_external_f().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, n_A, ldim_A; 00039 int lwork, info; 00040 FLA_Obj work_obj; 00041 00042 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00043 FLA_QR_check( A, t ); 00044 00045 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00046 00047 datatype = FLA_Obj_datatype( A ); 00048 00049 m_A = FLA_Obj_length( A ); 00050 n_A = FLA_Obj_width( A ); 00051 ldim_A = FLA_Obj_ldim( A ); 00052 00053 lwork = n_A * FLA_Query_blocksize( datatype, FLA_DIMENSION_MIN ); 00054 FLA_Obj_create( datatype, lwork, 1, &work_obj ); 00055 00056 switch( datatype ){ 00057 00058 case FLA_FLOAT: 00059 { 00060 float *buff_A = ( float * ) FLA_FLOAT_PTR( A ); 00061 float *buff_t = ( float * ) FLA_FLOAT_PTR( t ); 00062 float *buff_work = ( float * ) FLA_FLOAT_PTR( work_obj ); 00063 00064 FLA_C2F( sgeqrf )( &m_A, 00065 &n_A, 00066 buff_A, &ldim_A, 00067 buff_t, 00068 buff_work, &lwork, 00069 &info ); 00070 00071 break; 00072 } 00073 00074 case FLA_DOUBLE: 00075 { 00076 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A ); 00077 double *buff_t = ( double * ) FLA_DOUBLE_PTR( t ); 00078 double *buff_work = ( double * ) FLA_DOUBLE_PTR( work_obj ); 00079 00080 FLA_C2F( dgeqrf )( &m_A, 00081 &n_A, 00082 buff_A, &ldim_A, 00083 buff_t, 00084 buff_work, &lwork, 00085 &info ); 00086 00087 break; 00088 } 00089 00090 case FLA_COMPLEX: 00091 { 00092 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A ); 00093 scomplex *buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t ); 00094 scomplex *buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work_obj ); 00095 00096 FLA_C2F( cgeqrf )( &m_A, 00097 &n_A, 00098 buff_A, &ldim_A, 00099 buff_t, 00100 buff_work, &lwork, 00101 &info ); 00102 00103 break; 00104 } 00105 00106 case FLA_DOUBLE_COMPLEX: 00107 { 00108 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A ); 00109 dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t ); 00110 dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work_obj ); 00111 00112 FLA_C2F( zgeqrf )( &m_A, 00113 &n_A, 00114 buff_A, &ldim_A, 00115 buff_t, 00116 buff_work, &lwork, 00117 &info ); 00118 00119 break; 00120 } 00121 00122 } 00123 00124 FLA_Obj_free( &work_obj ); 00125 00126 return info; 00127 }
void FLA_F2C() fla_qr_blk_external_f | ( | F_INT * | A, | |
F_INT * | t, | |||
F_INT * | IERROR | |||
) |
References FLA_QR_blk_external().
00131 { 00132 *IERROR = FLA_QR_blk_external( *( ( FLA_Obj * ) A ), 00133 *( ( FLA_Obj * ) t ) ); 00134 }
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_vector_length(), and FLA_Obj_min_dim().
Referenced by FLA_QR_blk_external(), FLA_QR_unb_external(), FLA_QR_UT_blk_external(), and FLA_QR_UT_unb_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, t ); 00046 FLA_Check_error_code( e_val ); 00047 00048 e_val = FLA_Check_vector_length( t, FLA_Obj_min_dim( A ) ); 00049 FLA_Check_error_code( e_val ); 00050 00051 return FLA_SUCCESS; 00052 }
References cgeqr2(), dgeqr2(), FLA_Check_error_level(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Obj_width(), FLA_QR_check(), sgeqr2(), and zgeqr2().
Referenced by fla_qr_unb_external_f().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, n_A, ldim_A; 00039 int info; 00040 FLA_Obj work_obj; 00041 00042 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00043 FLA_QR_check( A, t ); 00044 00045 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00046 00047 datatype = FLA_Obj_datatype( A ); 00048 00049 m_A = FLA_Obj_length( A ); 00050 n_A = FLA_Obj_width( A ); 00051 ldim_A = FLA_Obj_ldim( A ); 00052 00053 FLA_Obj_create( datatype, n_A, 1, &work_obj ); 00054 00055 switch( datatype ){ 00056 00057 case FLA_FLOAT: 00058 { 00059 float *buff_A = ( float * ) FLA_FLOAT_PTR( A ); 00060 float *buff_t = ( float * ) FLA_FLOAT_PTR( t ); 00061 float *buff_work = ( float * ) FLA_FLOAT_PTR( work_obj ); 00062 00063 FLA_C2F( sgeqr2 )( &m_A, 00064 &n_A, 00065 buff_A, &ldim_A, 00066 buff_t, 00067 buff_work, 00068 &info ); 00069 00070 break; 00071 } 00072 00073 case FLA_DOUBLE: 00074 { 00075 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A ); 00076 double *buff_t = ( double * ) FLA_DOUBLE_PTR( t ); 00077 double *buff_work = ( double * ) FLA_DOUBLE_PTR( work_obj ); 00078 00079 FLA_C2F( dgeqr2 )( &m_A, 00080 &n_A, 00081 buff_A, &ldim_A, 00082 buff_t, 00083 buff_work, 00084 &info ); 00085 00086 break; 00087 } 00088 00089 case FLA_COMPLEX: 00090 { 00091 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A ); 00092 scomplex *buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t ); 00093 scomplex *buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work_obj ); 00094 00095 FLA_C2F( cgeqr2 )( &m_A, 00096 &n_A, 00097 buff_A, &ldim_A, 00098 buff_t, 00099 buff_work, 00100 &info ); 00101 00102 break; 00103 } 00104 00105 case FLA_DOUBLE_COMPLEX: 00106 { 00107 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A ); 00108 dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t ); 00109 dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work_obj ); 00110 00111 FLA_C2F( zgeqr2 )( &m_A, 00112 &n_A, 00113 buff_A, &ldim_A, 00114 buff_t, 00115 buff_work, 00116 &info ); 00117 00118 break; 00119 } 00120 00121 } 00122 00123 FLA_Obj_free( &work_obj ); 00124 00125 return info; 00126 }
void FLA_F2C() fla_qr_unb_external_f | ( | F_INT * | A, | |
F_INT * | t, | |||
F_INT * | IERROR | |||
) |
References FLA_QR_unb_external().
00130 { 00131 *IERROR = FLA_QR_unb_external( *( ( FLA_Obj * ) A ), 00132 *( ( FLA_Obj * ) t ) ); 00133 }
Referenced by fla_qr_ut_f().
00038 { 00039 FLA_Error r_val; 00040 dim_t nb_alg; 00041 //dim_t nb_alg_mid; 00042 00043 // Check parameters. 00044 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING ) 00045 FLA_QR_UT_check( A, T ); 00046 00047 // Inspect the length of T to get the implied outer blocksize. 00048 nb_alg = FLA_Obj_length( T ); 00049 00050 // Scale the outer blocksize to get the inner blocksize. 00051 //nb_alg_mid = max( nb_alg * FLA_QR_INNER_TO_OUTER_B_RATIO, 1 ); 00052 00053 // Adjust the blocksizes in the control trees. 00054 FLA_Blocksize_set( FLA_Cntl_blocksize( fla_qrut_cntl_leaf ), 00055 nb_alg, nb_alg, nb_alg, nb_alg ); 00056 //FLA_Blocksize_set( FLA_Cntl_blocksize( fla_qrut_cntl2 ), 00057 // nb_alg, nb_alg, nb_alg, nb_alg ); 00058 //FLA_Blocksize_set( FLA_Cntl_blocksize( fla_qrut_cntl2_mid ), 00059 // nb_alg_mid, nb_alg_mid, nb_alg_mid, nb_alg_mid ); 00060 00061 // Invoke FLA_QR_UT_internal() with the standard control tree. 00062 //r_val = FLA_QR_UT_internal( A, T, fla_qrut_cntl2 ); 00063 r_val = FLA_QR_UT_internal( A, T, fla_qrut_cntl_leaf ); 00064 00065 return r_val; 00066 }
References FLA_Accum_T_UT_unb_external(), FLA_Check_error_level(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_min_dim(), FLA_QR_UT_check(), and FLA_QR_UT_unb_external().
00036 { 00037 FLA_Obj t; 00038 00039 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00040 FLA_QR_UT_check( A, T ); 00041 00042 FLA_Obj_create( FLA_Obj_datatype( A ), FLA_Obj_min_dim( A ), 1, &t ); 00043 00044 FLA_QR_UT_unb_external( A, t ); 00045 00046 FLA_Accum_T_UT_unb_external( FLA_FORWARD, FLA_COLUMNWISE, A, t, T ); 00047 00048 FLA_Obj_free( &t ); 00049 00050 return FLA_SUCCESS; 00051 }
References cgeqrfut(), dgeqrfut(), FLA_Check_error_level(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Obj_width(), FLA_QR_check(), FLA_Query_blocksize(), sgeqrfut(), and zgeqrfut().
Referenced by fla_qr_ut_blk_external_f().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, n_A, ldim_A; 00039 int lwork, info; 00040 FLA_Obj work_obj; 00041 00042 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00043 FLA_QR_check( A, t ); 00044 00045 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00046 00047 datatype = FLA_Obj_datatype( A ); 00048 00049 m_A = FLA_Obj_length( A ); 00050 n_A = FLA_Obj_width( A ); 00051 ldim_A = FLA_Obj_ldim( A ); 00052 lwork = n_A * FLA_Query_blocksize( datatype, FLA_DIMENSION_MIN ); 00053 00054 FLA_Obj_create( datatype, lwork, 1, &work_obj ); 00055 00056 switch( datatype ){ 00057 00058 case FLA_FLOAT: 00059 { 00060 float *buff_A = ( float * ) FLA_FLOAT_PTR( A ); 00061 float *buff_t = ( float * ) FLA_FLOAT_PTR( t ); 00062 float *buff_work = ( float * ) FLA_FLOAT_PTR( work_obj ); 00063 00064 FLA_C2F( sgeqrfut )( &m_A, 00065 &n_A, 00066 buff_A, &ldim_A, 00067 buff_t, 00068 buff_work, &lwork, 00069 &info ); 00070 00071 break; 00072 } 00073 00074 case FLA_DOUBLE: 00075 { 00076 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A ); 00077 double *buff_t = ( double * ) FLA_DOUBLE_PTR( t ); 00078 double *buff_work = ( double * ) FLA_DOUBLE_PTR( work_obj ); 00079 00080 FLA_C2F( dgeqrfut )( &m_A, 00081 &n_A, 00082 buff_A, &ldim_A, 00083 buff_t, 00084 buff_work, &lwork, 00085 &info ); 00086 00087 break; 00088 } 00089 00090 case FLA_COMPLEX: 00091 { 00092 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A ); 00093 scomplex *buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t ); 00094 scomplex *buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work_obj ); 00095 00096 FLA_C2F( cgeqrfut )( &m_A, 00097 &n_A, 00098 buff_A, &ldim_A, 00099 buff_t, 00100 buff_work, &lwork, 00101 &info ); 00102 00103 break; 00104 } 00105 00106 case FLA_DOUBLE_COMPLEX: 00107 { 00108 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A ); 00109 dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t ); 00110 dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work_obj ); 00111 00112 FLA_C2F( zgeqrfut )( &m_A, 00113 &n_A, 00114 buff_A, &ldim_A, 00115 buff_t, 00116 buff_work, &lwork, 00117 &info ); 00118 00119 break; 00120 } 00121 00122 } 00123 00124 FLA_Obj_free( &work_obj ); 00125 00126 return info; 00127 }
void FLA_F2C() fla_qr_ut_blk_external_f | ( | F_INT * | A, | |
F_INT * | t, | |||
F_INT * | IERROR | |||
) |
References FLA_QR_UT_blk_external().
00131 { 00132 *IERROR = FLA_QR_UT_blk_external( *( ( FLA_Obj * ) A ), 00133 *( ( FLA_Obj * ) t ) ); 00134 }
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), and FLA_Check_nonconstant_object().
Referenced by FLA_QR_UT(), and FLA_QR_UT_Accum_T_unb_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, T ); 00046 FLA_Check_error_code( e_val ); 00047 00048 return FLA_SUCCESS; 00049 }
FLA_Error FLA_QR_UT_copy_internal_check | ( | FLA_Obj | A, | |
FLA_Obj | T, | |||
FLA_Obj | U, | |||
fla_qrut_t * | cntl | |||
) |
References FLA_Check_conformal_dims(), FLA_Check_identical_object_elemtype(), FLA_Check_null_pointer(), FLA_Check_object_width_equals(), and FLA_Obj_width().
Referenced by FLA_QR_UT_copy_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, T ); 00045 FLA_Check_error_code( e_val ); 00046 00047 e_val = FLA_Check_identical_object_elemtype( A, U ); 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_object_width_equals( A, FLA_Obj_width( T ) ); 00054 FLA_Check_error_code( e_val ); 00055 00056 e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, U ); 00057 FLA_Check_error_code( e_val ); 00058 00059 return FLA_SUCCESS; 00060 }
FLA_Error FLA_QR_UT_copy_task | ( | FLA_Obj | A, | |
FLA_Obj | T, | |||
FLA_Obj | U, | |||
fla_qrut_t * | cntl | |||
) |
References FLA_Copyr_external(), and FLA_QR_UT_internal().
Referenced by FLA_QR_UT_copy_internal(), and FLASH_Queue_exec_task().
00038 { 00039 FLA_Error r_val; 00040 00041 // This is normally where we would invoke the unblocked external 00042 // implementation. However, since we don't have one of those, per se, 00043 // we invoke the internal back-end with the leaf control tree for 00044 // flat matrices. 00045 r_val = FLA_QR_UT_internal( A, T, 00046 fla_qrut_cntl_leaf ); 00047 00048 //FLA_Copy_external( A, U ); 00049 FLA_Copyr_external( FLA_LOWER_TRIANGULAR, A, U ); 00050 00051 return r_val; 00052 }
void FLA_F2C() fla_qr_ut_create_t_f | ( | F_INT * | A, | |
F_INT * | T, | |||
F_INT * | IERROR | |||
) |
References FLA_QR_UT_create_T().
00058 { 00059 *IERROR = FLA_QR_UT_create_T( *( ( FLA_Obj * ) A ), 00060 ( ( FLA_Obj * ) T ) ); 00061 }
void FLA_F2C() fla_qr_ut_f | ( | F_INT * | A, | |
F_INT * | T, | |||
F_INT * | IERROR | |||
) |
References FLA_Check_conformal_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), and FLA_Check_nonconstant_object().
Referenced by FLASH_QR_UT_inc_noopt(), and FLASH_QR_UT_inc_opt1().
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, TW ); 00046 FLA_Check_error_code( e_val ); 00047 00048 e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, TW ); 00049 FLA_Check_error_code( e_val ); 00050 00051 return FLA_SUCCESS; 00052 }
FLA_Error FLA_QR_UT_internal | ( | FLA_Obj | A, | |
FLA_Obj | T, | |||
fla_qrut_t * | cntl | |||
) |
Referenced by FLA_QR_UT(), FLA_QR_UT_Accum_T_blk_var1(), FLA_QR_UT_blk_var2(), FLA_QR_UT_copy_task(), FLA_QR_UT_inc_blk_var1(), FLA_QR_UT_internal(), and FLA_QR_UT_task().
00040 { 00041 FLA_Error r_val = FLA_SUCCESS; 00042 00043 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00044 FLA_QR_UT_internal_check( A, T, cntl ); 00045 00046 if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER && 00047 FLA_Obj_elemtype( A ) == FLA_MATRIX && 00048 FLA_Cntl_variant( cntl ) == FLA_SUBPROBLEM ) 00049 { 00050 // Recurse 00051 r_val = FLA_QR_UT_internal( *FLASH_OBJ_PTR_AT( A ), 00052 *FLASH_OBJ_PTR_AT( T ), 00053 flash_qrut_cntl_leaf ); 00054 } 00055 else if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER && 00056 FLA_Obj_elemtype( A ) == FLA_SCALAR && 00057 FLASH_Queue_get_enabled( ) ) 00058 { 00059 // Enqueue 00060 ENQUEUE_FLASH_QR_UT( A, T, cntl ); 00061 } 00062 else 00063 { 00064 if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER && 00065 FLA_Obj_elemtype( A ) == FLA_SCALAR && 00066 !FLASH_Queue_get_enabled( ) ) 00067 { 00068 // Execute leaf. 00069 // NOTE: This may be redundant since we execute _internal() with 00070 // fla_qrut_cntl_leaf (in lieu of an _external() function). 00071 cntl = fla_qrut_cntl_leaf; 00072 } 00073 00074 if ( FLA_Cntl_variant( cntl ) == FLA_SUBPROBLEM ) 00075 { 00076 r_val = FLA_QR_UT_task( A, T, fla_qrut_cntl_leaf ); 00077 } 00078 else if ( FLA_Cntl_variant( cntl ) == FLA_UNBLOCKED_VARIANT1 ) 00079 { 00080 r_val = FLA_QR_UT_Accum_T_unb_var1( A, T ); 00081 } 00082 else if ( FLA_Cntl_variant( cntl ) == FLA_UNB_OPT_VARIANT1 ) 00083 { 00084 r_val = FLA_QR_UT_Accum_T_opt_var1( A, T ); 00085 } 00086 else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT1 ) 00087 { 00088 r_val = FLA_QR_UT_Accum_T_blk_var1( A, T, cntl ); 00089 } 00090 else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT2 ) 00091 { 00092 r_val = FLA_QR_UT_blk_var2( A, T, cntl ); 00093 } 00094 } 00095 00096 return r_val; 00097 }
FLA_Error FLA_QR_UT_internal_check | ( | FLA_Obj | A, | |
FLA_Obj | T, | |||
fla_qrut_t * | cntl | |||
) |
References FLA_Check_identical_object_elemtype(), FLA_Check_null_pointer(), FLA_Check_object_width_equals(), and FLA_Obj_width().
Referenced by FLA_QR_UT_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, T ); 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_object_width_equals( A, FLA_Obj_width( T ) ); 00051 FLA_Check_error_code( e_val ); 00052 00053 return FLA_SUCCESS; 00054 }
References FLA_Check_consistent_object_datatype(), FLA_Check_floating_object(), FLA_Check_if_vector(), FLA_Check_object_width_equals(), and FLA_Obj_vector_dim().
Referenced by FLA_QR_UT_recover_tau().
00036 { 00037 FLA_Error e_val; 00038 00039 e_val = FLA_Check_floating_object( T ); 00040 FLA_Check_error_code( e_val ); 00041 00042 e_val = FLA_Check_consistent_object_datatype( T, tau ); 00043 FLA_Check_error_code( e_val ); 00044 00045 e_val = FLA_Check_if_vector( tau ); 00046 FLA_Check_error_code( e_val ); 00047 00048 e_val = FLA_Check_object_width_equals( T, FLA_Obj_vector_dim( tau ) ); 00049 FLA_Check_error_code( e_val ); 00050 00051 return FLA_SUCCESS; 00052 }
void FLA_F2C() fla_qr_ut_recover_tau_f | ( | F_INT * | T, | |
F_INT * | tau, | |||
F_INT * | IERROR | |||
) |
References FLA_QR_UT_recover_tau().
00144 { 00145 *IERROR = FLA_QR_UT_recover_tau( *( ( FLA_Obj * ) T ), 00146 *( ( FLA_Obj * ) tau ) ); 00147 }
FLA_Error FLA_QR_UT_task | ( | FLA_Obj | A, | |
FLA_Obj | T, | |||
fla_qrut_t * | cntl | |||
) |
References FLA_QR_UT_internal().
Referenced by FLA_QR_UT_internal(), and FLASH_Queue_exec_task().
00038 { 00039 // This is normally where we would invoke the unblocked external 00040 // implementation. However, since we don't have one of those, per se, 00041 // we invoke the internal back-end with the leaf control tree for 00042 // flat matrices. 00043 return FLA_QR_UT_internal( A, T, 00044 fla_qrut_cntl_leaf ); 00045 }
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), and FLA_Check_square().
Referenced by FLASH_QR_UT_UD().
00036 { 00037 FLA_Error e_val; 00038 00039 e_val = FLA_Check_floating_object( B ); 00040 FLA_Check_error_code( e_val ); 00041 00042 e_val = FLA_Check_nonconstant_object( B ); 00043 FLA_Check_error_code( e_val ); 00044 00045 e_val = FLA_Check_identical_object_datatype( B, D ); 00046 FLA_Check_error_code( e_val ); 00047 00048 e_val = FLA_Check_identical_object_datatype( B, T ); 00049 FLA_Check_error_code( e_val ); 00050 00051 e_val = FLA_Check_square( B ); 00052 FLA_Check_error_code( e_val ); 00053 00054 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, D, B, D ); 00055 FLA_Check_error_code( e_val ); 00056 00057 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, T, B, T ); 00058 FLA_Check_error_code( e_val ); 00059 00060 return FLA_SUCCESS; 00061 }
FLA_Error FLA_QR_UT_UD_internal | ( | FLA_Obj | B, | |
FLA_Obj | D, | |||
FLA_Obj | T, | |||
fla_qrutud_t * | cntl | |||
) |
Referenced by FLA_QR_UT_inc_blk_var1(), FLA_QR_UT_inc_blk_var2(), FLA_QR_UT_UD_blk_var1(), FLA_QR_UT_UD_blk_var2(), FLA_QR_UT_UD_internal(), FLA_QR_UT_UD_task(), and FLASH_QR_UT_UD().
00041 { 00042 FLA_Error r_val = FLA_SUCCESS; 00043 00044 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00045 FLA_QR_UT_UD_internal_check( B, D, T, cntl ); 00046 00047 if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER && 00048 FLA_Obj_elemtype( B ) == FLA_MATRIX && 00049 FLA_Cntl_variant( cntl ) == FLA_SUBPROBLEM ) 00050 { 00051 // Recurse 00052 r_val = FLA_QR_UT_UD_internal( *FLASH_OBJ_PTR_AT( B ), 00053 *FLASH_OBJ_PTR_AT( D ), 00054 *FLASH_OBJ_PTR_AT( T ), 00055 flash_qrutud_cntl ); 00056 } 00057 else if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER && 00058 FLA_Obj_elemtype( B ) == FLA_SCALAR && 00059 FLASH_Queue_get_enabled( ) ) 00060 { 00061 // Enqueue 00062 ENQUEUE_FLASH_QR_UT_UD( B, D, T, cntl ); 00063 } 00064 else 00065 { 00066 if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER && 00067 FLA_Obj_elemtype( B ) == FLA_SCALAR && 00068 !FLASH_Queue_get_enabled( ) ) 00069 { 00070 // Execute leaf. 00071 // NOTE: This may be redundant since we execute _internal() with 00072 // fla_qrutud_cntl_leaf (in lieu of an _external() function). 00073 cntl = fla_qrutud_cntl_leaf; 00074 } 00075 00076 if ( FLA_Cntl_variant( cntl ) == FLA_SUBPROBLEM ) 00077 { 00078 r_val = FLA_QR_UT_UD_task( B, D, T, fla_qrutud_cntl_leaf ); 00079 } 00080 else if ( FLA_Cntl_variant( cntl ) == FLA_UNBLOCKED_VARIANT1 ) 00081 { 00082 r_val = FLA_QR_UT_UD_Accum_T_unb_var1( B, D, T ); 00083 } 00084 else if ( FLA_Cntl_variant( cntl ) == FLA_UNB_OPT_VARIANT1 ) 00085 { 00086 r_val = FLA_QR_UT_UD_Accum_T_opt_var1( B, D, T ); 00087 } 00088 else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT1 ) 00089 { 00090 r_val = FLA_QR_UT_UD_blk_var1( B, D, T, cntl ); 00091 } 00092 else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT2 ) 00093 { 00094 r_val = FLA_QR_UT_UD_blk_var2( B, D, T, cntl ); 00095 } 00096 } 00097 00098 return r_val; 00099 }
FLA_Error FLA_QR_UT_UD_internal_check | ( | FLA_Obj | B, | |
FLA_Obj | D, | |||
FLA_Obj | T, | |||
fla_qrutud_t * | cntl | |||
) |
References FLA_Check_identical_object_elemtype(), FLA_Check_matrix_matrix_dims(), and FLA_Check_null_pointer().
Referenced by FLA_QR_UT_UD_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( B, D ); 00045 FLA_Check_error_code( e_val ); 00046 00047 e_val = FLA_Check_identical_object_elemtype( B, T ); 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_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, D, B, D ); 00054 FLA_Check_error_code( e_val ); 00055 00056 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, T, B, T ); 00057 FLA_Check_error_code( e_val ); 00058 00059 return FLA_SUCCESS; 00060 }
FLA_Error FLA_QR_UT_UD_task | ( | FLA_Obj | B, | |
FLA_Obj | D, | |||
FLA_Obj | T, | |||
fla_qrutud_t * | cntl | |||
) |
References FLA_QR_UT_UD_internal().
Referenced by FLA_QR_UT_UD_internal(), and FLASH_Queue_exec_task().
00038 { 00039 // This is normally where we would invoke the unblocked external 00040 // implementation. However, since we don't have one of those, per se, 00041 // we invoke the internal back-end with the leaf control tree for 00042 // flat matrices. 00043 return FLA_QR_UT_UD_internal( B, D, T, 00044 fla_qrutud_cntl_leaf ); 00045 }
References cgeqr2ut(), dgeqr2ut(), FLA_Check_error_level(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Obj_width(), FLA_QR_check(), sgeqr2ut(), and zgeqr2ut().
Referenced by FLA_QR_UT_Accum_T_unb_external(), and fla_qr_ut_unb_external_f().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, n_A, ldim_A; 00039 int info; 00040 FLA_Obj work_obj; 00041 00042 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00043 FLA_QR_check( A, t ); 00044 00045 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00046 00047 datatype = FLA_Obj_datatype( A ); 00048 00049 m_A = FLA_Obj_length( A ); 00050 n_A = FLA_Obj_width( A ); 00051 ldim_A = FLA_Obj_ldim( A ); 00052 00053 FLA_Obj_create( datatype, n_A, 1, &work_obj ); 00054 00055 switch( datatype ){ 00056 00057 case FLA_FLOAT: 00058 { 00059 float *buff_A = ( float * ) FLA_FLOAT_PTR( A ); 00060 float *buff_t = ( float * ) FLA_FLOAT_PTR( t ); 00061 float *buff_work = ( float * ) FLA_FLOAT_PTR( work_obj ); 00062 00063 FLA_C2F( sgeqr2ut )( &m_A, 00064 &n_A, 00065 buff_A, &ldim_A, 00066 buff_t, 00067 buff_work, 00068 &info ); 00069 00070 break; 00071 } 00072 00073 case FLA_DOUBLE: 00074 { 00075 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A ); 00076 double *buff_t = ( double * ) FLA_DOUBLE_PTR( t ); 00077 double *buff_work = ( double * ) FLA_DOUBLE_PTR( work_obj ); 00078 00079 FLA_C2F( dgeqr2ut )( &m_A, 00080 &n_A, 00081 buff_A, &ldim_A, 00082 buff_t, 00083 buff_work, 00084 &info ); 00085 00086 break; 00087 } 00088 00089 case FLA_COMPLEX: 00090 { 00091 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A ); 00092 scomplex *buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t ); 00093 scomplex *buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work_obj ); 00094 00095 FLA_C2F( cgeqr2ut )( &m_A, 00096 &n_A, 00097 buff_A, &ldim_A, 00098 buff_t, 00099 buff_work, 00100 &info ); 00101 00102 break; 00103 } 00104 00105 case FLA_DOUBLE_COMPLEX: 00106 { 00107 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A ); 00108 dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t ); 00109 dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work_obj ); 00110 00111 FLA_C2F( zgeqr2ut )( &m_A, 00112 &n_A, 00113 buff_A, &ldim_A, 00114 buff_t, 00115 buff_work, 00116 &info ); 00117 00118 break; 00119 } 00120 00121 } 00122 00123 FLA_Obj_free( &work_obj ); 00124 00125 return info; 00126 }
void FLA_F2C() fla_qr_ut_unb_external_f | ( | F_INT * | A, | |
F_INT * | t, | |||
F_INT * | IERROR | |||
) |
References FLA_QR_UT_unb_external().
00130 { 00131 *IERROR = FLA_QR_UT_unb_external( *( ( FLA_Obj * ) A ), 00132 *( ( FLA_Obj * ) t ) ); 00133 }
FLA_Error FLA_SA_FS_task | ( | FLA_Obj | L, | |
FLA_Obj | D, | |||
FLA_Obj | p, | |||
FLA_Obj | C, | |||
FLA_Obj | E, | |||
dim_t | nb_alg, | |||
fla_lu_t * | cntl | |||
) |
References FLA_SA_FS_blk().
Referenced by FLASH_Queue_exec_task(), and FLASH_SA_FS().
00039 { 00040 FLA_Error info; 00041 00042 info = FLA_SA_FS_blk( L, 00043 D, p, C, 00044 E, nb_alg ); 00045 00046 return info; 00047 }
FLA_Error FLA_SA_LU_task | ( | FLA_Obj | U, | |
FLA_Obj | D, | |||
FLA_Obj | p, | |||
FLA_Obj | L, | |||
dim_t | nb_alg, | |||
fla_lu_t * | cntl | |||
) |
References FLA_SA_LU_blk().
Referenced by FLASH_Queue_exec_task(), and FLASH_SA_LU().
00038 { 00039 FLA_Error info; 00040 00041 info = FLA_SA_LU_blk( U, 00042 D, p, L, nb_alg ); 00043 00044 return info; 00045 }
References FLA_Blocksize_extract(), FLA_Check_error_level(), FLA_Obj_datatype(), FLA_Obj_length(), FLA_SPDinv_blk_external(), FLA_SPDinv_check(), and FLA_SPDinv_internal().
00039 { 00040 FLA_Datatype datatype; 00041 int m_A, r_val = 0; 00042 int FLA_SPDINV_CUTOFF; 00043 00044 00045 // Check parameters. 00046 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING ) 00047 FLA_SPDinv_check( uplo, A ); 00048 00049 // Determine the datatype of the operation. 00050 datatype = FLA_Obj_datatype( A ); 00051 00052 // Extract the appropriate blocksize for the given datatype. 00053 FLA_SPDINV_CUTOFF = FLA_Blocksize_extract( datatype, fla_spdinv_size_cutoff ); 00054 00055 // Determine the dimension of A. 00056 m_A = FLA_Obj_length( A ); 00057 00058 // Invoke FLA_SPDinv_internal() with an appropriate control tree. 00059 if ( m_A <= FLA_SPDINV_CUTOFF ) 00060 { 00061 r_val = FLA_SPDinv_blk_external( uplo, A ); 00062 } 00063 else if ( FLA_SPDINV_CUTOFF < m_A ) 00064 { 00065 r_val = FLA_SPDinv_internal( uplo, A, fla_spdinv_cntl ); 00066 } 00067 00068 return r_val; 00069 }
References FLA_Check_error_level(), FLA_Chol_blk_external(), FLA_SPDinv_check(), FLA_Trinv_blk_external(), and FLA_Ttmm_blk_external().
Referenced by FLA_SPDinv(), and fla_spdinv_blk_external_f().
00036 { 00037 FLA_Error e_val; 00038 00039 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00040 FLA_SPDinv_check( uplo, A ); 00041 00042 e_val = FLA_Chol_blk_external( uplo, A ); 00043 00044 if ( e_val != FLA_SUCCESS ) 00045 return e_val; 00046 00047 e_val = FLA_Trinv_blk_external( uplo, FLA_NONUNIT_DIAG, A ); 00048 00049 if ( e_val != FLA_SUCCESS ) 00050 return e_val; 00051 00052 FLA_Ttmm_blk_external( uplo, A ); 00053 00054 return FLA_SUCCESS; 00055 }
void FLA_F2C() fla_spdinv_blk_external_f | ( | F_INT * | uplo, | |
F_INT * | A, | |||
F_INT * | IERROR | |||
) |
References FLA_SPDinv_blk_external().
00059 { 00060 *IERROR = FLA_SPDinv_blk_external( *( ( FLA_Uplo * ) uplo ), 00061 *( ( FLA_Obj * ) A ) ); 00062 }
References FLA_Check_floating_object(), FLA_Check_nonconstant_object(), FLA_Check_square(), and FLA_Check_valid_uplo().
Referenced by FLA_SPDinv(), FLA_SPDinv_blk_external(), and FLASH_SPDinv().
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_square( A ); 00049 FLA_Check_error_code( e_val ); 00050 00051 return FLA_SUCCESS; 00052 }
void FLA_F2C() fla_spdinv_f | ( | F_INT * | uplo, | |
F_INT * | A, | |||
F_INT * | IERROR | |||
) |
FLA_Error FLA_SPDinv_internal | ( | FLA_Uplo | uplo, | |
FLA_Obj | A, | |||
fla_spdinv_t * | cntl | |||
) |
References FLA_Check_chol_failure(), FLA_Check_error_level(), FLA_Chol_internal(), FLA_SPDinv_internal_check(), FLA_Trinv_internal(), and FLA_Ttmm_internal().
Referenced by FLA_SPDinv(), and FLASH_SPDinv().
00036 { 00037 FLA_Error r_val; 00038 FLA_Error e_val; 00039 00040 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00041 FLA_SPDinv_internal_check( uplo, A, cntl ); 00042 00043 r_val = FLA_Chol_internal( uplo, A, 00044 FLA_Cntl_sub_chol( cntl ) ); 00045 00046 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING ) 00047 { 00048 e_val = FLA_Check_chol_failure( r_val ); 00049 FLA_Check_error_code( e_val ); 00050 } 00051 00052 FLA_Trinv_internal( uplo, FLA_NONUNIT_DIAG, A, 00053 FLA_Cntl_sub_trinv( cntl ) ); 00054 00055 FLA_Ttmm_internal( uplo, A, 00056 FLA_Cntl_sub_ttmm( cntl ) ); 00057 00058 return FLA_SUCCESS; 00059 }
FLA_Error FLA_SPDinv_internal_check | ( | FLA_Uplo | uplo, | |
FLA_Obj | A, | |||
fla_spdinv_t * | cntl | |||
) |
References FLA_Check_null_pointer().
Referenced by FLA_SPDinv_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 return FLA_SUCCESS; 00044 }
References claswp(), dlaswp(), FLA_Check_error_level(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Obj_width(), FLA_Swap_rows_check(), slaswp(), and zlaswp().
Referenced by FLA_Apply_pivots(), and fla_swap_rows_f().
00036 { 00037 FLA_Datatype datatype; 00038 int n_A, ldim_A; 00039 int m_ipiv, n_ipiv, ldim_ipiv; 00040 int inc_ipiv; 00041 int* buff_ipiv; 00042 int i; 00043 int k1_1, k2_1; 00044 int* pivots_lapack; 00045 00046 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00047 FLA_Swap_rows_check( A, k1, k2, ipiv ); 00048 00049 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00050 00051 datatype = FLA_Obj_datatype( A ); 00052 00053 n_A = FLA_Obj_width( A ); 00054 ldim_A = FLA_Obj_ldim( A ); 00055 00056 m_ipiv = FLA_Obj_length( ipiv ); 00057 n_ipiv = FLA_Obj_width( ipiv ); 00058 ldim_ipiv = FLA_Obj_ldim( ipiv ); 00059 00060 buff_ipiv = FLA_INT_PTR( ipiv ); 00061 00062 if ( m_ipiv == 1 ) inc_ipiv = ldim_ipiv; 00063 else if ( n_ipiv == 1 ) inc_ipiv = 1; 00064 00065 // Convert zero-based FLAME indices to one-based for LAPACK. 00066 k1_1 = k1 + 1; 00067 k2_1 = k2 + 1; 00068 00069 // Translate FLAME pivot indices to LAPACK-compatible indices. It is 00070 // important to note that this conversion, unlike the one done by 00071 // FLA_Shift_pivots_to(), is NOT in-place, but rather done separately 00072 // in a temporary buffer. 00073 #ifdef FLA_ENABLE_WINDOWS_BUILD 00074 pivots_lapack = ( int * ) _alloca( m_ipiv * sizeof( int ) ); 00075 #else 00076 pivots_lapack = ( int * ) alloca( m_ipiv * sizeof( int ) ); 00077 #endif 00078 00079 for ( i = 0; i < m_ipiv; i++ ) 00080 { 00081 pivots_lapack[ i ] = buff_ipiv[ i ] + i + 1; 00082 } 00083 00084 switch ( datatype ){ 00085 00086 case FLA_FLOAT: 00087 { 00088 float* buff_A = ( float * ) FLA_FLOAT_PTR( A ); 00089 00090 FLA_C2F( slaswp )( &n_A, 00091 buff_A, &ldim_A, 00092 &k1_1, 00093 &k2_1, 00094 pivots_lapack, 00095 &inc_ipiv ); 00096 break; 00097 } 00098 00099 case FLA_DOUBLE: 00100 { 00101 double* buff_A = ( double * ) FLA_DOUBLE_PTR( A ); 00102 00103 FLA_C2F( dlaswp )( &n_A, 00104 buff_A, &ldim_A, 00105 &k1_1, 00106 &k2_1, 00107 pivots_lapack, 00108 &inc_ipiv ); 00109 break; 00110 } 00111 00112 case FLA_COMPLEX: 00113 { 00114 scomplex* buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A ); 00115 00116 FLA_C2F( claswp )( &n_A, 00117 buff_A, &ldim_A, 00118 &k1_1, 00119 &k2_1, 00120 pivots_lapack, 00121 &inc_ipiv ); 00122 break; 00123 } 00124 00125 case FLA_DOUBLE_COMPLEX: 00126 { 00127 dcomplex* buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A ); 00128 00129 FLA_C2F( zlaswp )( &n_A, 00130 buff_A, &ldim_A, 00131 &k1_1, 00132 &k2_1, 00133 pivots_lapack, 00134 &inc_ipiv ); 00135 break; 00136 } 00137 00138 } 00139 00140 return FLA_SUCCESS; 00141 }
References FLA_Check_floating_object(), FLA_Check_if_vector(), FLA_Check_int_object(), FLA_Check_nonconstant_object(), and FLA_Check_pivot_index_range().
Referenced by FLA_Swap_rows().
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_int_object( ipiv ); 00046 FLA_Check_error_code( e_val ); 00047 00048 e_val = FLA_Check_nonconstant_object( ipiv ); 00049 FLA_Check_error_code( e_val ); 00050 00051 e_val = FLA_Check_if_vector( ipiv ); 00052 FLA_Check_error_code( e_val ); 00053 00054 e_val = FLA_Check_pivot_index_range( ipiv, k1, k2 ); 00055 FLA_Check_error_code( e_val ); 00056 00057 return FLA_SUCCESS; 00058 }
void FLA_F2C() fla_swap_rows_f | ( | F_INT * | A, | |
F_INT * | k1, | |||
F_INT * | k2, | |||
F_INT * | ipiv, | |||
F_INT * | IERROR | |||
) |
References FLA_Swap_rows().
00145 { 00146 *IERROR = FLA_Swap_rows( *( ( FLA_Obj * ) A ), 00147 *( ( int * ) k1 ), 00148 *( ( int * ) k2 ), 00149 *( ( FLA_Obj * ) ipiv) ); 00150 }
FLA_Error FLA_Sylv | ( | FLA_Trans | transa, | |
FLA_Trans | transb, | |||
FLA_Obj | isgn, | |||
FLA_Obj | A, | |||
FLA_Obj | B, | |||
FLA_Obj | C, | |||
FLA_Obj | scale | |||
) |
References FLA_Check_error_level(), FLA_Sylv_check(), and FLA_Sylv_internal().
Referenced by fla_sylv_f().
00038 { 00039 FLA_Error r_val; 00040 00041 // Check parameters. 00042 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING ) 00043 FLA_Sylv_check( transa, transb, isgn, A, B, C, scale ); 00044 00045 // Invoke FLA_Sylv_internal() with the appropriate control tree. 00046 r_val = FLA_Sylv_internal( transa, transb, isgn, A, B, C, scale, fla_sylv_cntl ); 00047 00048 return r_val; 00049 }
FLA_Error FLA_Sylv_blk_external | ( | FLA_Trans | transa, | |
FLA_Trans | transb, | |||
FLA_Obj | isgn, | |||
FLA_Obj | A, | |||
FLA_Obj | B, | |||
FLA_Obj | C, | |||
FLA_Obj | scale | |||
) |
References FLA_Sylv_unb_external().
Referenced by fla_sylv_blk_external_f().
00036 { 00037 return FLA_Sylv_unb_external( transa, transb, isgn, A, B, C, scale ); 00038 }
void FLA_F2C() fla_sylv_blk_external_f | ( | F_INT * | transa, | |
F_INT * | transb, | |||
F_INT * | isgn, | |||
F_INT * | A, | |||
F_INT * | B, | |||
F_INT * | C, | |||
F_INT * | scale, | |||
F_INT * | IERROR | |||
) |
References FLA_Sylv_blk_external().
00042 { 00043 *IERROR = FLA_Sylv_blk_external( *( ( FLA_Trans * ) transa ), 00044 *( ( FLA_Trans * ) transb ), 00045 *( ( FLA_Obj * ) isgn ), 00046 *( ( FLA_Obj * ) A ), 00047 *( ( FLA_Obj * ) B ), 00048 *( ( FLA_Obj * ) C ), 00049 *( ( FLA_Obj * ) scale ) ); 00050 }
FLA_Error FLA_Sylv_check | ( | FLA_Trans | transa, | |
FLA_Trans | transb, | |||
FLA_Obj | isgn, | |||
FLA_Obj | A, | |||
FLA_Obj | B, | |||
FLA_Obj | C, | |||
FLA_Obj | scale | |||
) |
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_identical_object_precision(), FLA_Check_if_scalar(), FLA_Check_int_object(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_sylv_matrix_dims(), FLA_Check_valid_blas_trans(), and FLA_Check_valid_isgn_value().
Referenced by FLA_Sylv(), FLA_Sylv_unb_external(), and FLASH_Sylv().
00036 { 00037 FLA_Error e_val; 00038 00039 e_val = FLA_Check_valid_blas_trans( transa ); 00040 FLA_Check_error_code( e_val ); 00041 00042 e_val = FLA_Check_valid_blas_trans( transb ); 00043 FLA_Check_error_code( e_val ); 00044 00045 e_val = FLA_Check_if_scalar( isgn ); 00046 FLA_Check_error_code( e_val ); 00047 00048 e_val = FLA_Check_int_object( isgn ); 00049 FLA_Check_error_code( e_val ); 00050 00051 e_val = FLA_Check_valid_isgn_value( isgn ); 00052 FLA_Check_error_code( e_val ); 00053 00054 e_val = FLA_Check_floating_object( A ); 00055 FLA_Check_error_code( e_val ); 00056 00057 e_val = FLA_Check_nonconstant_object( A ); 00058 FLA_Check_error_code( e_val ); 00059 00060 e_val = FLA_Check_identical_object_datatype( A, B ); 00061 FLA_Check_error_code( e_val ); 00062 00063 e_val = FLA_Check_identical_object_datatype( A, C ); 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_square( B ); 00070 FLA_Check_error_code( e_val ); 00071 00072 e_val = FLA_Check_sylv_matrix_dims( A, B, C ); 00073 FLA_Check_error_code( e_val ); 00074 00075 e_val = FLA_Check_if_scalar( scale ); 00076 FLA_Check_error_code( e_val ); 00077 00078 e_val = FLA_Check_identical_object_precision( C, scale ); 00079 FLA_Check_error_code( e_val ); 00080 00081 return FLA_SUCCESS; 00082 }
void FLA_F2C() fla_sylv_f | ( | F_INT * | transa, | |
F_INT * | transb, | |||
F_INT * | isgn, | |||
F_INT * | A, | |||
F_INT * | B, | |||
F_INT * | C, | |||
F_INT * | scale, | |||
F_INT * | IERROR | |||
) |
FLA_Error FLA_Sylv_internal | ( | FLA_Trans | transa, | |
FLA_Trans | transb, | |||
FLA_Obj | isgn, | |||
FLA_Obj | A, | |||
FLA_Obj | B, | |||
FLA_Obj | C, | |||
FLA_Obj | scale, | |||
fla_sylv_t * | cntl | |||
) |
References FLA_Check_error_level(), FLA_Obj_elemtype(), FLA_Sylv_internal(), FLA_Sylv_internal_check(), FLA_Sylv_nn(), FLA_Sylv_nt(), FLA_Sylv_tn(), FLA_Sylv_tt(), and FLASH_Queue_get_enabled().
Referenced by FLA_Sylv(), FLA_Sylv_internal(), FLA_Sylv_nn_blk_var1(), FLA_Sylv_nn_blk_var10(), FLA_Sylv_nn_blk_var11(), FLA_Sylv_nn_blk_var12(), FLA_Sylv_nn_blk_var13(), FLA_Sylv_nn_blk_var14(), FLA_Sylv_nn_blk_var15(), FLA_Sylv_nn_blk_var16(), FLA_Sylv_nn_blk_var17(), FLA_Sylv_nn_blk_var18(), FLA_Sylv_nn_blk_var2(), FLA_Sylv_nn_blk_var3(), FLA_Sylv_nn_blk_var4(), FLA_Sylv_nn_blk_var5(), FLA_Sylv_nn_blk_var6(), FLA_Sylv_nn_blk_var7(), FLA_Sylv_nn_blk_var8(), FLA_Sylv_nn_blk_var9(), FLA_Sylv_nt_blk_var1(), FLA_Sylv_nt_blk_var10(), FLA_Sylv_nt_blk_var11(), FLA_Sylv_nt_blk_var12(), FLA_Sylv_nt_blk_var13(), FLA_Sylv_nt_blk_var14(), FLA_Sylv_nt_blk_var15(), FLA_Sylv_nt_blk_var16(), FLA_Sylv_nt_blk_var17(), FLA_Sylv_nt_blk_var18(), FLA_Sylv_nt_blk_var2(), FLA_Sylv_nt_blk_var3(), FLA_Sylv_nt_blk_var4(), FLA_Sylv_nt_blk_var5(), FLA_Sylv_nt_blk_var6(), FLA_Sylv_nt_blk_var7(), FLA_Sylv_nt_blk_var8(), FLA_Sylv_nt_blk_var9(), FLA_Sylv_tn_blk_var1(), FLA_Sylv_tn_blk_var10(), FLA_Sylv_tn_blk_var11(), FLA_Sylv_tn_blk_var12(), FLA_Sylv_tn_blk_var13(), FLA_Sylv_tn_blk_var14(), FLA_Sylv_tn_blk_var15(), FLA_Sylv_tn_blk_var16(), FLA_Sylv_tn_blk_var17(), FLA_Sylv_tn_blk_var18(), FLA_Sylv_tn_blk_var2(), FLA_Sylv_tn_blk_var3(), FLA_Sylv_tn_blk_var4(), FLA_Sylv_tn_blk_var5(), FLA_Sylv_tn_blk_var6(), FLA_Sylv_tn_blk_var7(), FLA_Sylv_tn_blk_var8(), FLA_Sylv_tn_blk_var9(), FLA_Sylv_tt_blk_var1(), FLA_Sylv_tt_blk_var10(), FLA_Sylv_tt_blk_var11(), FLA_Sylv_tt_blk_var12(), FLA_Sylv_tt_blk_var13(), FLA_Sylv_tt_blk_var14(), FLA_Sylv_tt_blk_var15(), FLA_Sylv_tt_blk_var16(), FLA_Sylv_tt_blk_var17(), FLA_Sylv_tt_blk_var18(), FLA_Sylv_tt_blk_var2(), FLA_Sylv_tt_blk_var3(), FLA_Sylv_tt_blk_var4(), FLA_Sylv_tt_blk_var5(), FLA_Sylv_tt_blk_var6(), FLA_Sylv_tt_blk_var7(), FLA_Sylv_tt_blk_var8(), FLA_Sylv_tt_blk_var9(), and FLASH_Sylv().
00039 { 00040 FLA_Error r_val = FLA_SUCCESS; 00041 00042 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00043 FLA_Sylv_internal_check( transa, transb, isgn, A, B, C, scale, 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_Sylv_internal( transa, 00051 transb, 00052 isgn, 00053 *FLASH_OBJ_PTR_AT( A ), 00054 *FLASH_OBJ_PTR_AT( B ), 00055 *FLASH_OBJ_PTR_AT( C ), 00056 scale, 00057 flash_sylv_cntl ); 00058 } 00059 else if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER && 00060 FLA_Obj_elemtype( A ) == FLA_SCALAR && 00061 FLASH_Queue_get_enabled( ) ) 00062 { 00063 // Enqueue 00064 ENQUEUE_FLASH_Sylv( transa, transb, isgn, A, B, C, scale, cntl ); 00065 } 00066 else 00067 { 00068 if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER && 00069 FLA_Obj_elemtype( A ) == FLA_SCALAR && 00070 !FLASH_Queue_get_enabled( ) ) 00071 { 00072 // Execute leaf 00073 cntl = flash_sylv_cntl_lapack; 00074 } 00075 00076 // Parameter combinations 00077 if ( transa == FLA_NO_TRANSPOSE ) 00078 { 00079 if ( transb == FLA_NO_TRANSPOSE ) 00080 r_val = FLA_Sylv_nn( isgn, A, B, C, scale, cntl ); 00081 else if ( transb == FLA_TRANSPOSE ) 00082 r_val = FLA_Sylv_nt( isgn, A, B, C, scale, cntl ); 00083 } 00084 else if ( transa == FLA_TRANSPOSE ) 00085 { 00086 if ( transb == FLA_NO_TRANSPOSE ) 00087 r_val = FLA_Sylv_tn( isgn, A, B, C, scale, cntl ); 00088 else if ( transb == FLA_TRANSPOSE ) 00089 r_val = FLA_Sylv_tt( isgn, A, B, C, scale, cntl ); 00090 } 00091 } 00092 00093 return r_val; 00094 }
FLA_Error FLA_Sylv_internal_check | ( | FLA_Trans | transa, | |
FLA_Trans | transb, | |||
FLA_Obj | isgn, | |||
FLA_Obj | A, | |||
FLA_Obj | B, | |||
FLA_Obj | C, | |||
FLA_Obj | scale, | |||
fla_sylv_t * | cntl | |||
) |
References FLA_Check_identical_object_elemtype(), FLA_Check_null_pointer(), and FLA_Check_sylv_matrix_dims().
Referenced by FLA_Sylv_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, B ); 00045 FLA_Check_error_code( e_val ); 00046 00047 e_val = FLA_Check_identical_object_elemtype( A, C ); 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_sylv_matrix_dims( A, B, C ); 00054 FLA_Check_error_code( e_val ); 00055 00056 return FLA_SUCCESS; 00057 }
FLA_Error FLA_Sylv_nn_task | ( | FLA_Obj | isgn, | |
FLA_Obj | A, | |||
FLA_Obj | B, | |||
FLA_Obj | C, | |||
FLA_Obj | scale, | |||
fla_sylv_t * | cntl | |||
) |
References FLA_Sylv_unb_external().
Referenced by FLA_Sylv_nn().
00041 { 00042 return FLA_Sylv_unb_external( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, isgn, A, B, C, scale ); 00043 }
FLA_Error FLA_Sylv_nt_task | ( | FLA_Obj | isgn, | |
FLA_Obj | A, | |||
FLA_Obj | B, | |||
FLA_Obj | C, | |||
FLA_Obj | scale, | |||
fla_sylv_t * | cntl | |||
) |
References FLA_Sylv_unb_external().
Referenced by FLA_Sylv_nt().
00046 { 00047 return FLA_Sylv_unb_external( FLA_NO_TRANSPOSE, FLA_TRANSPOSE, isgn, A, B, C, scale ); 00048 }
FLA_Error FLA_Sylv_task | ( | FLA_Trans | transa, | |
FLA_Trans | transb, | |||
FLA_Obj | isgn, | |||
FLA_Obj | A, | |||
FLA_Obj | B, | |||
FLA_Obj | C, | |||
FLA_Obj | scale, | |||
fla_sylv_t * | cntl | |||
) |
References FLA_Sylv_unb_external().
Referenced by FLASH_Queue_exec_task().
00036 { 00037 return FLA_Sylv_unb_external( transa, transb, isgn, A, B, C, scale ); 00038 }
FLA_Error FLA_Sylv_tn_task | ( | FLA_Obj | isgn, | |
FLA_Obj | A, | |||
FLA_Obj | B, | |||
FLA_Obj | C, | |||
FLA_Obj | scale, | |||
fla_sylv_t * | cntl | |||
) |
References FLA_Sylv_unb_external().
Referenced by FLA_Sylv_tn().
00051 { 00052 return FLA_Sylv_unb_external( FLA_TRANSPOSE, FLA_NO_TRANSPOSE, isgn, A, B, C, scale ); 00053 }
FLA_Error FLA_Sylv_tt_task | ( | FLA_Obj | isgn, | |
FLA_Obj | A, | |||
FLA_Obj | B, | |||
FLA_Obj | C, | |||
FLA_Obj | scale, | |||
fla_sylv_t * | cntl | |||
) |
References FLA_Sylv_unb_external().
Referenced by FLA_Sylv_tt().
00056 { 00057 return FLA_Sylv_unb_external( FLA_TRANSPOSE, FLA_TRANSPOSE, isgn, A, B, C, scale ); 00058 }
FLA_Error FLA_Sylv_unb_external | ( | FLA_Trans | transa, | |
FLA_Trans | transb, | |||
FLA_Obj | isgn, | |||
FLA_Obj | A, | |||
FLA_Obj | B, | |||
FLA_Obj | C, | |||
FLA_Obj | scale | |||
) |
References ctrsyl(), dtrsyl(), FLA_Check_error_level(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Obj_set_to_scalar(), FLA_Obj_width(), FLA_ONE, FLA_Param_map_to_blas_trans(), FLA_Sylv_check(), strsyl(), and ztrsyl().
Referenced by FLA_Sylv_blk_external(), FLA_Sylv_nn_task(), FLA_Sylv_nt_task(), FLA_Sylv_task(), FLA_Sylv_tn_task(), FLA_Sylv_tt_task(), and fla_sylv_unb_external_f().
00036 { 00037 FLA_Datatype datatype; 00038 int ldim_A; 00039 int ldim_B; 00040 int m_C, n_C, ldim_C; 00041 int info; 00042 char blas_transa; 00043 char blas_transb; 00044 00045 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00046 FLA_Sylv_check( transa, transb, isgn, A, B, C, scale ); 00047 00048 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00049 if ( FLA_Obj_has_zero_dim( B ) ) return FLA_SUCCESS; 00050 if ( FLA_Obj_has_zero_dim( C ) ) return FLA_SUCCESS; 00051 00052 datatype = FLA_Obj_datatype( A ); 00053 00054 m_C = FLA_Obj_length( C ); 00055 n_C = FLA_Obj_width( C ); 00056 ldim_C = FLA_Obj_ldim( C ); 00057 00058 ldim_A = FLA_Obj_ldim( A ); 00059 00060 ldim_B = FLA_Obj_ldim( B ); 00061 00062 FLA_Param_map_to_blas_trans( transa, &blas_transa ); 00063 FLA_Param_map_to_blas_trans( transb, &blas_transb ); 00064 00065 00066 switch( datatype ){ 00067 00068 case FLA_FLOAT: 00069 { 00070 int *buff_isgn = ( int * ) FLA_INT_PTR( isgn ); 00071 float *buff_A = ( float * ) FLA_FLOAT_PTR( A ); 00072 float *buff_B = ( float * ) FLA_FLOAT_PTR( B ); 00073 float *buff_C = ( float * ) FLA_FLOAT_PTR( C ); 00074 float *buff_scale = ( float * ) FLA_FLOAT_PTR( scale ); 00075 00076 FLA_C2F( strsyl )( &blas_transa, 00077 &blas_transb, 00078 buff_isgn, 00079 &m_C, 00080 &n_C, 00081 buff_A, &ldim_A, 00082 buff_B, &ldim_B, 00083 buff_C, &ldim_C, 00084 buff_scale, 00085 &info ); 00086 00087 break; 00088 } 00089 00090 case FLA_DOUBLE: 00091 { 00092 int *buff_isgn = ( int * ) FLA_INT_PTR( isgn ); 00093 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A ); 00094 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B ); 00095 double *buff_C = ( double * ) FLA_DOUBLE_PTR( C ); 00096 double *buff_scale = ( double * ) FLA_DOUBLE_PTR( scale ); 00097 00098 FLA_C2F( dtrsyl )( &blas_transa, 00099 &blas_transb, 00100 buff_isgn, 00101 &m_C, 00102 &n_C, 00103 buff_A, &ldim_A, 00104 buff_B, &ldim_B, 00105 buff_C, &ldim_C, 00106 buff_scale, 00107 &info ); 00108 00109 break; 00110 } 00111 00112 case FLA_COMPLEX: 00113 { 00114 int *buff_isgn = ( int * ) FLA_INT_PTR( isgn ); 00115 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A ); 00116 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B ); 00117 scomplex *buff_C = ( scomplex * ) FLA_COMPLEX_PTR( C ); 00118 float *buff_scale = ( float * ) FLA_COMPLEX_PTR( scale ); 00119 00120 FLA_C2F( ctrsyl )( &blas_transa, 00121 &blas_transb, 00122 buff_isgn, 00123 &m_C, 00124 &n_C, 00125 buff_A, &ldim_A, 00126 buff_B, &ldim_B, 00127 buff_C, &ldim_C, 00128 buff_scale, 00129 &info ); 00130 00131 break; 00132 } 00133 00134 case FLA_DOUBLE_COMPLEX: 00135 { 00136 int *buff_isgn = ( int * ) FLA_INT_PTR( isgn ); 00137 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A ); 00138 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B ); 00139 dcomplex *buff_C = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( C ); 00140 double *buff_scale = ( double * ) FLA_DOUBLE_COMPLEX_PTR( scale ); 00141 00142 FLA_C2F( ztrsyl )( &blas_transa, 00143 &blas_transb, 00144 buff_isgn, 00145 &m_C, 00146 &n_C, 00147 buff_A, &ldim_A, 00148 buff_B, &ldim_B, 00149 buff_C, &ldim_C, 00150 buff_scale, 00151 &info ); 00152 00153 break; 00154 } 00155 00156 } 00157 00158 // We don't provide a comprehensive strategy for handing scaling to avoid 00159 // overflow, so we just force the scale argument to 1.0. 00160 FLA_Obj_set_to_scalar( FLA_ONE, scale ); 00161 00162 return info; 00163 }
void FLA_F2C() fla_sylv_unb_external_f | ( | F_INT * | transa, | |
F_INT * | transb, | |||
F_INT * | isgn, | |||
F_INT * | A, | |||
F_INT * | B, | |||
F_INT * | C, | |||
F_INT * | scale, | |||
F_INT * | IERROR | |||
) |
References FLA_Sylv_unb_external().
00167 { 00168 *IERROR = FLA_Sylv_unb_external( *( ( FLA_Trans * ) transa ), 00169 *( ( FLA_Trans * ) transb ), 00170 *( ( FLA_Obj * ) isgn ), 00171 *( ( FLA_Obj * ) A ), 00172 *( ( FLA_Obj * ) B ), 00173 *( ( FLA_Obj * ) C ), 00174 *( ( FLA_Obj * ) scale ) ); 00175 }
References FLA_Blocksize_extract(), FLA_Check_error_level(), FLA_Obj_datatype(), FLA_Obj_length(), FLA_Trinv_check(), and FLA_Trinv_internal().
Referenced by fla_trinv_f().
00040 { 00041 FLA_Datatype datatype; 00042 int m_A, r_val = 0; 00043 int FLA_TRINV_VAR3_BLOCKSIZE; 00044 00045 // Check parameters. 00046 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING ) 00047 FLA_Trinv_check( uplo, diag, A ); 00048 00049 // Determine the datatype of the operation. 00050 datatype = FLA_Obj_datatype( A ); 00051 00052 // Extract the appropriate blocksize for the given datatype. 00053 FLA_TRINV_VAR3_BLOCKSIZE = FLA_Blocksize_extract( datatype, fla_trinv_var3_bsize ); 00054 00055 // Determine the dimension of A. 00056 m_A = FLA_Obj_length( A ); 00057 00058 // Invoke FLA_Trinv_internal() with the appropriate control tree. 00059 if ( m_A <= FLA_TRINV_VAR3_BLOCKSIZE ) 00060 { 00061 r_val = FLA_Trinv_internal( uplo, diag, A, fla_trinv_cntl_lapack ); 00062 } 00063 else if ( FLA_TRINV_VAR3_BLOCKSIZE < m_A ) 00064 { 00065 r_val = FLA_Trinv_internal( uplo, diag, A, fla_trinv_cntl ); 00066 } 00067 00068 return r_val; 00069 }
References ctrtri(), dtrtri(), FLA_Check_error_level(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Param_map_to_blas_diag(), FLA_Param_map_to_blas_uplo(), FLA_Trinv_check(), strtri(), and ztrtri().
Referenced by FLA_SPDinv_blk_external(), and fla_trinv_blk_external_f().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, ldim_A; 00039 int info; 00040 char blas_uplo; 00041 char blas_diag; 00042 00043 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00044 FLA_Trinv_check( uplo, diag, A ); 00045 00046 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00047 00048 datatype = FLA_Obj_datatype( A ); 00049 00050 m_A = FLA_Obj_length( A ); 00051 ldim_A = FLA_Obj_ldim( A ); 00052 00053 FLA_Param_map_to_blas_uplo( uplo, &blas_uplo ); 00054 FLA_Param_map_to_blas_diag( diag, &blas_diag ); 00055 00056 00057 switch( datatype ){ 00058 00059 case FLA_FLOAT: 00060 { 00061 float *buff_A = ( float * ) FLA_FLOAT_PTR( A ); 00062 00063 FLA_C2F( strtri )( &blas_uplo, 00064 &blas_diag, 00065 &m_A, 00066 buff_A, &ldim_A, 00067 &info ); 00068 00069 break; 00070 } 00071 00072 case FLA_DOUBLE: 00073 { 00074 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A ); 00075 00076 FLA_C2F( dtrtri )( &blas_uplo, 00077 &blas_diag, 00078 &m_A, 00079 buff_A, &ldim_A, 00080 &info ); 00081 00082 break; 00083 } 00084 00085 case FLA_COMPLEX: 00086 { 00087 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A ); 00088 00089 FLA_C2F( ctrtri )( &blas_uplo, 00090 &blas_diag, 00091 &m_A, 00092 buff_A, &ldim_A, 00093 &info ); 00094 00095 break; 00096 } 00097 00098 case FLA_DOUBLE_COMPLEX: 00099 { 00100 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A ); 00101 00102 FLA_C2F( ztrtri )( &blas_uplo, 00103 &blas_diag, 00104 &m_A, 00105 buff_A, &ldim_A, 00106 &info ); 00107 00108 break; 00109 } 00110 00111 } 00112 00113 return info; 00114 }
void FLA_F2C() fla_trinv_blk_external_f | ( | F_INT * | uplo, | |
F_INT * | diag, | |||
F_INT * | A, | |||
F_INT * | IERROR | |||
) |
References FLA_Trinv_blk_external().
00118 { 00119 *IERROR = FLA_Trinv_blk_external( *( ( FLA_Uplo * ) uplo ), 00120 *( ( FLA_Diag * ) diag ), 00121 *( ( FLA_Obj * ) A ) ); 00122 }
References FLA_Check_floating_object(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_valid_diag(), and FLA_Check_valid_uplo().
Referenced by FLA_Trinv(), FLA_Trinv_blk_external(), FLA_Trinv_unb_external(), and FLASH_Trinv().
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_diag( diag ); 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_square( A ); 00052 FLA_Check_error_code( e_val ); 00053 00054 return FLA_SUCCESS; 00055 }
void FLA_F2C() fla_trinv_f | ( | F_INT * | uplo, | |
F_INT * | diag, | |||
F_INT * | A, | |||
F_INT * | IERROR | |||
) |
References FLA_Trinv().
00073 { 00074 *IERROR = FLA_Trinv( *( ( FLA_Uplo * ) uplo ), 00075 *( ( FLA_Diag * ) diag ), 00076 *( ( FLA_Obj * ) A ) ); 00077 }
FLA_Error FLA_Trinv_internal | ( | FLA_Uplo | uplo, | |
FLA_Diag | diag, | |||
FLA_Obj | A, | |||
fla_trinv_t * | cntl | |||
) |
References FLA_Check_error_level(), FLA_Obj_elemtype(), FLA_Trinv_internal(), FLA_Trinv_internal_check(), FLA_Trinv_l(), FLA_Trinv_u(), and FLASH_Queue_get_enabled().
Referenced by FLA_SPDinv_internal(), FLA_Trinv(), FLA_Trinv_internal(), FLA_Trinv_l_blk_var1(), FLA_Trinv_l_blk_var2(), FLA_Trinv_l_blk_var3(), FLA_Trinv_l_blk_var4(), FLA_Trinv_u_blk_var1(), FLA_Trinv_u_blk_var2(), FLA_Trinv_u_blk_var3(), FLA_Trinv_u_blk_var4(), and FLASH_Trinv().
00039 { 00040 FLA_Error r_val = FLA_SUCCESS; 00041 00042 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00043 FLA_Trinv_internal_check( uplo, diag, A, 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_Trinv_internal( uplo, 00051 diag, 00052 *FLASH_OBJ_PTR_AT( A ), 00053 flash_trinv_cntl ); 00054 } 00055 else if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER && 00056 FLA_Obj_elemtype( A ) == FLA_SCALAR && 00057 FLASH_Queue_get_enabled( ) ) 00058 { 00059 // Enqueue 00060 ENQUEUE_FLASH_Trinv( uplo, diag, A, cntl ); 00061 } 00062 else 00063 { 00064 if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER && 00065 FLA_Obj_elemtype( A ) == FLA_SCALAR && 00066 !FLASH_Queue_get_enabled( ) ) 00067 { 00068 // Execute leaf 00069 cntl = flash_trinv_cntl_lapack; 00070 } 00071 00072 // Parameter combinations 00073 if ( uplo == FLA_LOWER_TRIANGULAR ) 00074 { 00075 r_val = FLA_Trinv_l( diag, A, cntl ); 00076 } 00077 else if ( uplo == FLA_UPPER_TRIANGULAR ) 00078 { 00079 r_val = FLA_Trinv_u( diag, A, cntl ); 00080 } 00081 } 00082 00083 return r_val; 00084 }
FLA_Error FLA_Trinv_internal_check | ( | FLA_Uplo | uplo, | |
FLA_Diag | diag, | |||
FLA_Obj | A, | |||
fla_trinv_t * | cntl | |||
) |
References FLA_Check_null_pointer().
Referenced by FLA_Trinv_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 return FLA_SUCCESS; 00044 }
FLA_Error FLA_Trinv_l_task | ( | FLA_Diag | diag, | |
FLA_Obj | A, | |||
fla_trinv_t * | cntl | |||
) |
References FLA_Trinv_unb_external().
Referenced by FLA_Trinv_l().
00041 { 00042 return FLA_Trinv_unb_external( FLA_LOWER_TRIANGULAR, diag, A ); 00043 }
FLA_Error FLA_Trinv_task | ( | FLA_Uplo | uplo, | |
FLA_Diag | diag, | |||
FLA_Obj | A, | |||
fla_trinv_t * | cntl | |||
) |
References FLA_Trinv_unb_external().
Referenced by FLASH_Queue_exec_task().
00036 { 00037 return FLA_Trinv_unb_external( uplo, diag, A ); 00038 }
FLA_Error FLA_Trinv_u_task | ( | FLA_Diag | diag, | |
FLA_Obj | A, | |||
fla_trinv_t * | cntl | |||
) |
References FLA_Trinv_unb_external().
Referenced by FLA_Trinv_u().
00046 { 00047 return FLA_Trinv_unb_external( FLA_UPPER_TRIANGULAR, diag, A ); 00048 }
References ctrti2(), dtrti2(), FLA_Check_error_level(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Param_map_to_blas_diag(), FLA_Param_map_to_blas_uplo(), FLA_Trinv_check(), strti2(), and ztrti2().
Referenced by FLA_Trinv_l_task(), FLA_Trinv_task(), FLA_Trinv_u_task(), and fla_trinv_unb_external_f().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, ldim_A; 00039 int info; 00040 char blas_uplo; 00041 char blas_diag; 00042 00043 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00044 FLA_Trinv_check( uplo, diag, A ); 00045 00046 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00047 00048 datatype = FLA_Obj_datatype( A ); 00049 00050 m_A = FLA_Obj_length( A ); 00051 ldim_A = FLA_Obj_ldim( A ); 00052 00053 FLA_Param_map_to_blas_uplo( uplo, &blas_uplo ); 00054 FLA_Param_map_to_blas_diag( diag, &blas_diag ); 00055 00056 00057 switch( datatype ){ 00058 00059 case FLA_FLOAT: 00060 { 00061 float *buff_A = ( float * ) FLA_FLOAT_PTR( A ); 00062 00063 FLA_C2F( strti2 )( &blas_uplo, 00064 &blas_diag, 00065 &m_A, 00066 buff_A, &ldim_A, 00067 &info ); 00068 00069 break; 00070 } 00071 00072 case FLA_DOUBLE: 00073 { 00074 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A ); 00075 00076 FLA_C2F( dtrti2 )( &blas_uplo, 00077 &blas_diag, 00078 &m_A, 00079 buff_A, &ldim_A, 00080 &info ); 00081 00082 break; 00083 } 00084 00085 case FLA_COMPLEX: 00086 { 00087 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A ); 00088 00089 FLA_C2F( ctrti2 )( &blas_uplo, 00090 &blas_diag, 00091 &m_A, 00092 buff_A, &ldim_A, 00093 &info ); 00094 00095 break; 00096 } 00097 00098 case FLA_DOUBLE_COMPLEX: 00099 { 00100 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A ); 00101 00102 FLA_C2F( ztrti2 )( &blas_uplo, 00103 &blas_diag, 00104 &m_A, 00105 buff_A, &ldim_A, 00106 &info ); 00107 00108 break; 00109 } 00110 00111 } 00112 00113 return info; 00114 }
void FLA_F2C() fla_trinv_unb_external_f | ( | F_INT * | uplo, | |
F_INT * | diag, | |||
F_INT * | A, | |||
F_INT * | IERROR | |||
) |
References FLA_Trinv_unb_external().
00118 { 00119 *IERROR = FLA_Trinv_unb_external( *( ( FLA_Uplo * ) uplo ), 00120 *( ( FLA_Diag * ) diag ), 00121 *( ( FLA_Obj * ) A ) ); 00122 }
FLA_Error FLA_Trsm_piv_task | ( | FLA_Obj | A, | |
FLA_Obj | B, | |||
FLA_Obj | p, | |||
fla_trsm_t * | cntl | |||
) |
References FLA_Apply_pivots(), FLA_ONE, and FLA_Trsm_external().
Referenced by FLASH_Queue_exec_task(), and FLASH_Trsm_piv().
00036 { 00037 FLA_Apply_pivots( FLA_LEFT, FLA_NO_TRANSPOSE, 00038 p, B ); 00039 00040 FLA_Trsm_external( FLA_LEFT, FLA_LOWER_TRIANGULAR, 00041 FLA_NO_TRANSPOSE, FLA_UNIT_DIAG, 00042 FLA_ONE, A, B ); 00043 00044 return FLA_SUCCESS; 00045 }
References FLA_Blocksize_extract(), FLA_Check_error_level(), FLA_Obj_datatype(), FLA_Obj_length(), FLA_Ttmm_check(), and FLA_Ttmm_internal().
Referenced by fla_ttmm_f().
00040 { 00041 FLA_Datatype datatype; 00042 int m_A, r_val = 0; 00043 int FLA_TTMM_VAR1_BLOCKSIZE; 00044 00045 // Check parameters. 00046 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING ) 00047 FLA_Ttmm_check( uplo, A ); 00048 00049 // Determine the datatype of the operation. 00050 datatype = FLA_Obj_datatype( A ); 00051 00052 // Extract the appropriate blocksize for the given datatype. 00053 FLA_TTMM_VAR1_BLOCKSIZE = FLA_Blocksize_extract( datatype, fla_ttmm_var1_bsize ); 00054 00055 // Determine the dimension of A. 00056 m_A = FLA_Obj_length( A ); 00057 00058 // Invoke FLA_Ttmm_internal() with the appropriate control tree. 00059 if ( m_A <= FLA_TTMM_VAR1_BLOCKSIZE ) 00060 { 00061 r_val = FLA_Ttmm_internal( uplo, A, fla_ttmm_cntl_lapack ); 00062 } 00063 else if ( FLA_TTMM_VAR1_BLOCKSIZE < m_A ) 00064 { 00065 r_val = FLA_Ttmm_internal( uplo, A, fla_ttmm_cntl ); 00066 } 00067 00068 return r_val; 00069 }
References clauum(), dlauum(), 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_Ttmm_check(), slauum(), and zlauum().
Referenced by FLA_SPDinv_blk_external(), and fla_ttmm_blk_external_f().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, ldim_A; 00039 int info; 00040 char blas_uplo; 00041 00042 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00043 FLA_Ttmm_check( uplo, A ); 00044 00045 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00046 00047 datatype = FLA_Obj_datatype( A ); 00048 00049 m_A = FLA_Obj_length( A ); 00050 ldim_A = FLA_Obj_ldim( A ); 00051 00052 FLA_Param_map_to_blas_uplo( uplo, &blas_uplo ); 00053 00054 00055 switch( datatype ){ 00056 00057 case FLA_FLOAT: 00058 { 00059 float *buff_A = ( float * ) FLA_FLOAT_PTR( A ); 00060 00061 FLA_C2F( slauum )( &blas_uplo, 00062 &m_A, 00063 buff_A, &ldim_A, 00064 &info ); 00065 00066 break; 00067 } 00068 00069 case FLA_DOUBLE: 00070 { 00071 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A ); 00072 00073 FLA_C2F( dlauum )( &blas_uplo, 00074 &m_A, 00075 buff_A, &ldim_A, 00076 &info ); 00077 00078 break; 00079 } 00080 00081 case FLA_COMPLEX: 00082 { 00083 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A ); 00084 00085 FLA_C2F( clauum )( &blas_uplo, 00086 &m_A, 00087 buff_A, &ldim_A, 00088 &info ); 00089 00090 break; 00091 } 00092 00093 case FLA_DOUBLE_COMPLEX: 00094 { 00095 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A ); 00096 00097 FLA_C2F( zlauum )( &blas_uplo, 00098 &m_A, 00099 buff_A, &ldim_A, 00100 &info ); 00101 00102 break; 00103 } 00104 00105 } 00106 00107 return info; 00108 }
void FLA_F2C() fla_ttmm_blk_external_f | ( | F_INT * | uplo, | |
F_INT * | A, | |||
F_INT * | IERROR | |||
) |
References FLA_Ttmm_blk_external().
00112 { 00113 *IERROR = FLA_Ttmm_blk_external( *( ( FLA_Uplo * ) uplo ), 00114 *( ( FLA_Obj * ) A ) ); 00115 }
References FLA_Check_floating_object(), FLA_Check_nonconstant_object(), FLA_Check_square(), and FLA_Check_valid_uplo().
Referenced by FLA_Ttmm(), FLA_Ttmm_blk_external(), FLA_Ttmm_unb_external(), and FLASH_Ttmm().
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_square( A ); 00049 FLA_Check_error_code( e_val ); 00050 00051 return FLA_SUCCESS; 00052 }
void FLA_F2C() fla_ttmm_f | ( | F_INT * | uplo, | |
F_INT * | A, | |||
F_INT * | IERROR | |||
) |
FLA_Error FLA_Ttmm_internal | ( | FLA_Uplo | uplo, | |
FLA_Obj | A, | |||
fla_ttmm_t * | cntl | |||
) |
References FLA_Check_error_level(), FLA_Obj_elemtype(), FLA_Ttmm_internal(), FLA_Ttmm_internal_check(), FLA_Ttmm_l(), FLA_Ttmm_u(), and FLASH_Queue_get_enabled().
Referenced by FLA_SPDinv_internal(), FLA_Ttmm(), FLA_Ttmm_internal(), FLA_Ttmm_l_blk_var1(), FLA_Ttmm_l_blk_var2(), FLA_Ttmm_l_blk_var3(), FLA_Ttmm_u_blk_var1(), FLA_Ttmm_u_blk_var2(), FLA_Ttmm_u_blk_var3(), and FLASH_Ttmm().
00039 { 00040 FLA_Error r_val = FLA_SUCCESS; 00041 00042 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00043 FLA_Ttmm_internal_check( uplo, A, 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_Ttmm_internal( uplo, 00051 *FLASH_OBJ_PTR_AT( A ), 00052 flash_ttmm_cntl ); 00053 } 00054 else if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER && 00055 FLA_Obj_elemtype( A ) == FLA_SCALAR && 00056 FLASH_Queue_get_enabled( ) ) 00057 { 00058 // Enqueue 00059 ENQUEUE_FLASH_Ttmm( uplo, A, cntl ); 00060 } 00061 else 00062 { 00063 if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER && 00064 FLA_Obj_elemtype( A ) == FLA_SCALAR && 00065 !FLASH_Queue_get_enabled( ) ) 00066 { 00067 // Execute leaf 00068 cntl = flash_ttmm_cntl_lapack; 00069 } 00070 00071 // Parameter combinations 00072 if ( uplo == FLA_LOWER_TRIANGULAR ) 00073 { 00074 r_val = FLA_Ttmm_l( A, cntl ); 00075 } 00076 else if ( uplo == FLA_UPPER_TRIANGULAR ) 00077 { 00078 r_val = FLA_Ttmm_u( A, cntl ); 00079 } 00080 } 00081 00082 return r_val; 00083 }
FLA_Error FLA_Ttmm_internal_check | ( | FLA_Uplo | uplo, | |
FLA_Obj | A, | |||
fla_ttmm_t * | cntl | |||
) |
References FLA_Check_null_pointer().
Referenced by FLA_Ttmm_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 return FLA_SUCCESS; 00044 }
FLA_Error FLA_Ttmm_l_task | ( | FLA_Obj | A, | |
fla_ttmm_t * | cntl | |||
) |
References FLA_Ttmm_unb_external().
Referenced by FLA_Ttmm_l().
00041 { 00042 return FLA_Ttmm_unb_external( FLA_LOWER_TRIANGULAR, A ); 00043 }
FLA_Error FLA_Ttmm_task | ( | FLA_Uplo | uplo, | |
FLA_Obj | A, | |||
fla_ttmm_t * | cntl | |||
) |
References FLA_Ttmm_unb_external().
Referenced by FLASH_Queue_exec_task().
00036 { 00037 return FLA_Ttmm_unb_external( uplo, A ); 00038 }
FLA_Error FLA_Ttmm_u_task | ( | FLA_Obj | A, | |
fla_ttmm_t * | cntl | |||
) |
References FLA_Ttmm_unb_external().
Referenced by FLA_Ttmm_u().
00046 { 00047 return FLA_Ttmm_unb_external( FLA_UPPER_TRIANGULAR, A ); 00048 }
References clauu2(), dlauu2(), 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_Ttmm_check(), slauu2(), and zlauu2().
Referenced by FLA_Ttmm_l_task(), FLA_Ttmm_task(), FLA_Ttmm_u_task(), and fla_ttmm_unb_external_f().
00036 { 00037 FLA_Datatype datatype; 00038 int m_A, ldim_A; 00039 int info; 00040 char blas_uplo; 00041 00042 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00043 FLA_Ttmm_check( uplo, A ); 00044 00045 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS; 00046 00047 datatype = FLA_Obj_datatype( A ); 00048 00049 m_A = FLA_Obj_length( A ); 00050 ldim_A = FLA_Obj_ldim( A ); 00051 00052 FLA_Param_map_to_blas_uplo( uplo, &blas_uplo ); 00053 00054 00055 switch( datatype ){ 00056 00057 case FLA_FLOAT: 00058 { 00059 float *buff_A = ( float * ) FLA_FLOAT_PTR( A ); 00060 00061 FLA_C2F( slauu2 )( &blas_uplo, 00062 &m_A, 00063 buff_A, &ldim_A, 00064 &info ); 00065 00066 break; 00067 } 00068 00069 case FLA_DOUBLE: 00070 { 00071 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A ); 00072 00073 FLA_C2F( dlauu2 )( &blas_uplo, 00074 &m_A, 00075 buff_A, &ldim_A, 00076 &info ); 00077 00078 break; 00079 } 00080 00081 case FLA_COMPLEX: 00082 { 00083 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A ); 00084 00085 FLA_C2F( clauu2 )( &blas_uplo, 00086 &m_A, 00087 buff_A, &ldim_A, 00088 &info ); 00089 00090 break; 00091 } 00092 00093 case FLA_DOUBLE_COMPLEX: 00094 { 00095 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A ); 00096 00097 FLA_C2F( zlauu2 )( &blas_uplo, 00098 &m_A, 00099 buff_A, &ldim_A, 00100 &info ); 00101 00102 break; 00103 } 00104 00105 } 00106 00107 return info; 00108 }
void FLA_F2C() fla_ttmm_unb_external_f | ( | F_INT * | uplo, | |
F_INT * | A, | |||
F_INT * | IERROR | |||
) |
References FLA_Ttmm_unb_external().
00112 { 00113 *IERROR = FLA_Ttmm_unb_external( *( ( int * ) uplo ), 00114 *( ( FLA_Obj * ) A ) ); 00115 }