FLA_Axpy.h File Reference

(r)

Go to the source code of this file.

Functions

FLA_Error FLA_Axpy_internal (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_axpy_t *cntl)


Function Documentation

FLA_Error FLA_Axpy_internal ( FLA_Obj  alpha,
FLA_Obj  A,
FLA_Obj  B,
fla_axpy_t cntl 
)

References FLA_Axpy_blk_var1(), FLA_Axpy_blk_var2(), FLA_Axpy_blk_var3(), FLA_Axpy_blk_var4(), FLA_Axpy_external(), FLA_Axpy_internal(), FLA_Axpy_internal_check(), FLA_Check_error_level(), FLA_Obj_elemtype(), and FLASH_Queue_get_enabled().

00039 {
00040     FLA_Error r_val = FLA_SUCCESS;
00041 
00042     if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
00043         FLA_Axpy_internal_check( alpha, A, B, 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_Axpy_internal( alpha,
00051                                    *FLASH_OBJ_PTR_AT( A ),
00052                                    *FLASH_OBJ_PTR_AT( B ),
00053                                    flash_axpy_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_Axpy( alpha, A, B, 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_axpy_cntl_blas;
00070         }
00071         
00072         // Parameter combinations
00073         if      ( FLA_Cntl_variant( cntl ) == FLA_SUBPROBLEM )
00074         {
00075             r_val = FLA_Axpy_external( alpha, A, B );
00076         }
00077         else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT1 )
00078         {
00079             r_val = FLA_Axpy_blk_var1( alpha, A, B, cntl );
00080         }
00081 #ifdef FLA_ENABLE_NON_CRITICAL_CODE
00082         else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT2 )
00083         {
00084             r_val = FLA_Axpy_blk_var2( alpha, A, B, cntl );
00085         }
00086 #endif
00087         else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT3 )
00088         {
00089             r_val = FLA_Axpy_blk_var3( alpha, A, B, cntl );
00090         }
00091 #ifdef FLA_ENABLE_NON_CRITICAL_CODE
00092         else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT4 )
00093         {
00094             r_val = FLA_Axpy_blk_var4( alpha, A, B, cntl );
00095         }
00096 #endif
00097     }
00098 
00099     return r_val;
00100 }


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