FLA_Copy.h File Reference

(r)

Go to the source code of this file.

Functions

FLA_Error FLA_Copy_internal (FLA_Obj A, FLA_Obj B, fla_copy_t *cntl)


Function Documentation

FLA_Error FLA_Copy_internal ( FLA_Obj  A,
FLA_Obj  B,
fla_copy_t cntl 
)

References FLA_Check_error_level(), FLA_Copy_blk_var1(), FLA_Copy_blk_var2(), FLA_Copy_blk_var3(), FLA_Copy_blk_var4(), FLA_Copy_external(), FLA_Copy_internal(), FLA_Copy_internal_check(), 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_Copy_internal_check( 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_Copy_internal( *FLASH_OBJ_PTR_AT( A ),
00051                                    *FLASH_OBJ_PTR_AT( B ),
00052                                    flash_copy_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_Copy( A, B, 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_copy_cntl_blas;
00069         }
00070         
00071         // Parameter combinations
00072         if      ( FLA_Cntl_variant( cntl ) == FLA_SUBPROBLEM )
00073         {
00074             r_val = FLA_Copy_external( A, B );
00075         }
00076         else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT1 )
00077         {
00078             r_val = FLA_Copy_blk_var1( A, B, cntl );
00079         }
00080 #ifdef FLA_ENABLE_NON_CRITICAL_CODE
00081         else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT2 )
00082         {
00083             r_val = FLA_Copy_blk_var2( A, B, cntl );
00084         }
00085 #endif
00086         else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT3 )
00087         {
00088             r_val = FLA_Copy_blk_var3( A, B, cntl );
00089         }
00090 #ifdef FLA_ENABLE_NON_CRITICAL_CODE
00091         else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT4 )
00092         {
00093             r_val = FLA_Copy_blk_var4( A, B, cntl );
00094         }
00095 #endif
00096     }
00097 
00098     return r_val;
00099 }


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