FLA_Her_external.c File Reference

(r)


Functions

FLA_Error FLA_Her_external (FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj x, FLA_Obj A)
void FLA_F2C() fla_her_external_f (F_INT *uplo, F_INT *alpha, F_INT *x, F_INT *A, F_INT *IERROR)

Function Documentation

FLA_Error FLA_Her_external ( FLA_Uplo  uplo,
FLA_Obj  alpha,
FLA_Obj  x,
FLA_Obj  A 
)

References cblas_cher(), cblas_zher(), CblasColMajor, cher(), FLA_Check_error_level(), FLA_Her_check(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_ldim(), FLA_Obj_length(), FLA_Param_map_to_blas_uplo(), and zher().

Referenced by FLA_Chol_l_unb_var3(), FLA_Her(), fla_her_external_f(), FLA_Herk_ln_unb_var5(), FLA_Herk_ln_unb_var6(), FLA_Herk_un_unb_var5(), FLA_Herk_un_unb_var6(), and FLA_Ttmm_u_unb_var1().

00036 {
00037   FLA_Datatype datatype;
00038   int          m_A, ldim_A;
00039   int          m_x, ldim_x, inc_x; 
00040 #ifdef FLA_ENABLE_CBLAS_INTERFACE
00041   CBLAS_ORDER  cblas_order = CblasColMajor;
00042   CBLAS_UPLO   blas_uplo;   
00043 #else
00044   char         blas_uplo;
00045 #endif
00046 
00047   if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 
00048     FLA_Her_check( uplo, alpha, x, A );
00049 
00050   if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
00051 
00052   datatype = FLA_Obj_datatype( A );
00053 
00054   m_A      = FLA_Obj_length( A );
00055   ldim_A   = FLA_Obj_ldim( A );
00056 
00057   m_x      = FLA_Obj_length( x );
00058   ldim_x   = FLA_Obj_ldim( x );
00059 
00060   inc_x    = ( m_x == 1 ? ldim_x : 1 );
00061 
00062   FLA_Param_map_to_blas_uplo( uplo, &blas_uplo );
00063 
00064 
00065   switch( datatype ){
00066 
00067   case FLA_COMPLEX:
00068   {
00069     scomplex *buff_A     = ( scomplex * ) FLA_COMPLEX_PTR( A );
00070     scomplex *buff_x     = ( scomplex * ) FLA_COMPLEX_PTR( x );
00071     float    *buff_alpha = ( float    * ) FLA_FLOAT_PTR( alpha );
00072 
00073 #ifdef FLA_ENABLE_CBLAS_INTERFACE
00074     cblas_cher( cblas_order,
00075                 blas_uplo,
00076                 m_A,
00077                 buff_alpha->real,
00078                 buff_x, inc_x,
00079                 buff_A, ldim_A ); 
00080 #else
00081     FLA_C2F( cher )( &blas_uplo,
00082                      &m_A,
00083                      buff_alpha,
00084                      buff_x, &inc_x,
00085                      buff_A, &ldim_A ); 
00086 #endif
00087     break;
00088   }
00089 
00090   case FLA_DOUBLE_COMPLEX:
00091   {
00092     dcomplex *buff_A     = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
00093     dcomplex *buff_x     = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( x );
00094     double   *buff_alpha = ( double   * ) FLA_DOUBLE_PTR( alpha );
00095 
00096 #ifdef FLA_ENABLE_CBLAS_INTERFACE
00097     cblas_zher( cblas_order,
00098                 blas_uplo,
00099                 m_A,
00100                 buff_alpha->real,
00101                 buff_x, inc_x,
00102                 buff_A, ldim_A ); 
00103 #else
00104     FLA_C2F( zher )( &blas_uplo,
00105                      &m_A,
00106                      buff_alpha,
00107                      buff_x, &inc_x,
00108                      buff_A, &ldim_A ); 
00109 #endif
00110     break;
00111   }
00112 
00113   }
00114   
00115   return FLA_SUCCESS;
00116 }

void FLA_F2C() fla_her_external_f ( F_INT *  uplo,
F_INT *  alpha,
F_INT *  x,
F_INT *  A,
F_INT *  IERROR 
)

References FLA_Her_external().

00121 {
00122   *IERROR = FLA_Her_external( *( ( FLA_Uplo * ) uplo  ), 
00123                               *( ( FLA_Obj  * ) alpha ), 
00124                               *( ( FLA_Obj  * ) x     ), 
00125                               *( ( FLA_Obj  * ) A     ) );
00126 }


Generated on Mon Jul 6 05:45:53 2009 for libflame by  doxygen 1.5.9