FLA_Herk.c File Reference

(r)


Functions

FLA_Error FLA_Herk (FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj beta, FLA_Obj C)
void FLA_F2C() fla_herk_f (F_INT *uplo, F_INT *trans, F_INT *alpha, F_INT *A, F_INT *beta, F_INT *C, F_INT *IERROR)

Variables

fla_herk_tfla_herk_cntl_ip
fla_herk_tfla_herk_cntl_op
fla_herk_tfla_herk_cntl_sq
fla_blocksize_tfla_herk_var2_bsize
fla_blocksize_tfla_herk_var5_bsize

Function Documentation

FLA_Error FLA_Herk ( FLA_Uplo  uplo,
FLA_Trans  trans,
FLA_Obj  alpha,
FLA_Obj  A,
FLA_Obj  beta,
FLA_Obj  C 
)

References FLA_Blocksize_extract(), FLA_Check_error_level(), FLA_Herk_check(), FLA_Herk_external(), FLA_Herk_internal(), FLA_Obj_datatype(), FLA_Obj_length(), and FLA_Obj_width().

Referenced by fla_herk_f().

00042 {
00043   FLA_Error    r_val = FLA_SUCCESS;
00044 #ifdef FLA_ENABLE_BLAS3_FRONT_END_CNTL_TREES
00045   FLA_Datatype datatype;
00046   int          m_C, k_A;
00047   int          FLA_HERK_VAR2_BLOCKSIZE;
00048   int          FLA_HERK_VAR5_BLOCKSIZE;
00049 #endif
00050 
00051   // Check parameters.
00052   if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
00053     FLA_Herk_check( uplo, trans, alpha, A, beta, C );
00054 
00055 #ifdef FLA_ENABLE_BLAS3_FRONT_END_CNTL_TREES
00056   // Determine the datatype of the operation.
00057   datatype = FLA_Obj_datatype( A );
00058 
00059   // Extract the appropriate blocksize for the given datatype.
00060   FLA_HERK_VAR2_BLOCKSIZE = FLA_Blocksize_extract( datatype, fla_herk_var2_bsize );
00061   FLA_HERK_VAR5_BLOCKSIZE = FLA_Blocksize_extract( datatype, fla_herk_var5_bsize );
00062 
00063   // Determine the dimension of C.
00064   m_C = FLA_Obj_length( C );
00065 
00066   // Determine the k dimension of A after transposition.
00067   if ( trans == FLA_NO_TRANSPOSE )
00068     k_A = FLA_Obj_width( A );
00069   else
00070     k_A = FLA_Obj_length( A );
00071 
00072   // Invoke FLA_Herk_internal() with the appropriate control tree.
00073   if      ( FLA_HERK_VAR2_BLOCKSIZE < m_C && FLA_HERK_VAR5_BLOCKSIZE < k_A )
00074   {
00075     r_val = FLA_Herk_internal( uplo, trans, alpha, A, beta, C, fla_herk_cntl_sq );
00076   }
00077   else if ( FLA_HERK_VAR2_BLOCKSIZE < m_C && k_A <= FLA_HERK_VAR5_BLOCKSIZE )
00078   {
00079     r_val = FLA_Herk_internal( uplo, trans, alpha, A, beta, C, fla_herk_cntl_op );
00080   }
00081   else if ( m_C <= FLA_HERK_VAR2_BLOCKSIZE && FLA_HERK_VAR5_BLOCKSIZE < k_A )
00082   {
00083     r_val = FLA_Herk_internal( uplo, trans, alpha, A, beta, C, fla_herk_cntl_ip );
00084   }
00085   else if ( m_C <= FLA_HERK_VAR2_BLOCKSIZE && k_A <= FLA_HERK_VAR5_BLOCKSIZE )
00086   {
00087     r_val = FLA_Herk_external( uplo, trans, alpha, A, beta, C );
00088   }
00089 #else
00090   r_val = FLA_Herk_external( uplo, trans, alpha, A, beta, C );
00091 #endif
00092 
00093   return r_val;
00094 }

void FLA_F2C() fla_herk_f ( F_INT *  uplo,
F_INT *  trans,
F_INT *  alpha,
F_INT *  A,
F_INT *  beta,
F_INT *  C,
F_INT *  IERROR 
)

References FLA_Herk().

00098 {
00099   *IERROR = FLA_Herk( *( ( FLA_Uplo  * ) uplo  ),
00100                       *( ( FLA_Trans * ) trans ),
00101                       *( ( FLA_Obj   * ) alpha ),
00102                       *( ( FLA_Obj   * ) A     ),
00103                       *( ( FLA_Obj   * ) beta  ),
00104                       *( ( FLA_Obj   * ) C     ) );
00105 }


Variable Documentation


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