libflame revision_anchor
Functions
FLA_Apply_pivots.h File Reference

(r)

Go to the source code of this file.

Functions

FLA_Error FLA_Apply_pivots_internal (FLA_Side side, FLA_Trans trans, FLA_Obj p, FLA_Obj A, fla_appiv_t *cntl)
FLA_Error FLA_Apply_pivots_ln (FLA_Obj p, FLA_Obj A, fla_appiv_t *cntl)

Function Documentation

FLA_Error FLA_Apply_pivots_internal ( FLA_Side  side,
FLA_Trans  trans,
FLA_Obj  p,
FLA_Obj  A,
fla_appiv_t cntl 
)

References FLA_Apply_pivots_ln(), FLA_Apply_pivots_macro_task(), and FLASH_Queue_get_enabled().

Referenced by FLA_Apply_pivots(), FLA_Apply_pivots_ln_blk_var1(), FLA_Apply_pivots_ln_blk_var2(), FLA_Apply_pivots_ln_task(), FLA_Apply_pivots_macro_task(), FLA_Apply_pivots_task(), FLA_LU_piv_blk_var3(), FLA_LU_piv_blk_var4(), FLA_LU_piv_blk_var5(), and FLASH_Apply_pivots().

{
   FLA_Error r_val = FLA_SUCCESS;

   if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER &&
        FLA_Cntl_variant( cntl ) == FLA_SUBPROBLEM )
   {
      if ( FLASH_Queue_get_enabled( ) )
      {
         // Enqueue
         ENQUEUE_FLASH_Apply_pivots_macro( side, trans, *FLASH_OBJ_PTR_AT( p ), A, cntl );
      }
      else
      {
         // Execute leaf
         r_val = FLA_Apply_pivots_macro_task( side, trans, *FLASH_OBJ_PTR_AT( p ), A, cntl );
      }
   }
   else
   {
      // Parameter combinations
      if ( trans == FLA_NO_TRANSPOSE )
      {
         if      ( side == FLA_LEFT )
         {
            r_val = FLA_Apply_pivots_ln( p, A, cntl );
         }
         else if ( side == FLA_RIGHT )
         {
            FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
         }
      }
      else if ( trans == FLA_TRANSPOSE )
      {
         if      ( side == FLA_LEFT )
         {
            FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
         }
         else if ( side == FLA_RIGHT )
         {
            FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
         }
      }
   }   

   return r_val;
}
FLA_Error FLA_Apply_pivots_ln ( FLA_Obj  p,
FLA_Obj  A,
fla_appiv_t cntl 
)

References FLA_Apply_pivots_ln_blk_var1(), FLA_Apply_pivots_ln_blk_var2(), FLA_Apply_pivots_ln_opt_var1(), and FLA_Apply_pivots_ln_unb_ext().

Referenced by FLA_Apply_pivots_internal().

{
    FLA_Error r_val = FLA_SUCCESS;

    if      ( FLA_Cntl_variant( cntl ) == FLA_UNBLOCKED_EXTERN )
    {
        r_val = FLA_Apply_pivots_ln_unb_ext( p, A );
    }
    else if ( FLA_Cntl_variant( cntl ) == FLA_UNB_OPT_VARIANT1 )
    {
        r_val = FLA_Apply_pivots_ln_opt_var1( p, A );
    }
    else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT1 )
    {
        r_val = FLA_Apply_pivots_ln_blk_var1( p, A, cntl );
    }
    else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT2 )
    {
        r_val = FLA_Apply_pivots_ln_blk_var2( p, A, cntl );
    }
    else
    {
        FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
    }
   
    return r_val;
}