libflame  revision_anchor
Functions | Variables
FLA_Copy_internal.c File Reference

(r)

Functions

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

Variables

fla_copy_tflash_copy_cntl_blas
 
fla_copy_tflash_copy_cntl
 

Function Documentation

◆ FLA_Copy_internal()

FLA_Error FLA_Copy_internal ( FLA_Obj  A,
FLA_Obj  B,
fla_copy_t cntl 
)
17 {
18  FLA_Error r_val = FLA_SUCCESS;
19 
20  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
21  FLA_Copy_internal_check( A, B, cntl );
22 
23  if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER &&
24  FLA_Obj_elemtype( A ) == FLA_MATRIX &&
25  FLA_Cntl_variant( cntl ) == FLA_SUBPROBLEM )
26  {
27  // Recurse
28  r_val = FLA_Copy_internal( *FLASH_OBJ_PTR_AT( A ),
29  *FLASH_OBJ_PTR_AT( B ),
31  }
32  else if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER &&
33  FLA_Obj_elemtype( A ) == FLA_SCALAR &&
35  {
36  // Enqueue
37  ENQUEUE_FLASH_Copy( A, B, cntl );
38  }
39  else
40  {
41  if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER &&
42  FLA_Obj_elemtype( A ) == FLA_SCALAR &&
44  {
45  // Execute leaf
46  cntl = flash_copy_cntl_blas;
47  }
48 
49  // Parameter combinations
50  if ( FLA_Cntl_variant( cntl ) == FLA_SUBPROBLEM )
51  {
52  r_val = FLA_Copy_task( A, B, cntl );
53  }
54  else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT1 )
55  {
56  r_val = FLA_Copy_blk_var1( A, B, cntl );
57  }
58 #ifdef FLA_ENABLE_NON_CRITICAL_CODE
59  else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT2 )
60  {
61  r_val = FLA_Copy_blk_var2( A, B, cntl );
62  }
63 #endif
64  else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT3 )
65  {
66  r_val = FLA_Copy_blk_var3( A, B, cntl );
67  }
68 #ifdef FLA_ENABLE_NON_CRITICAL_CODE
69  else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT4 )
70  {
71  r_val = FLA_Copy_blk_var4( A, B, cntl );
72  }
73 #endif
74  else
75  {
76  r_val = FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
77  }
78  }
79 
80  return r_val;
81 }
FLA_Bool FLASH_Queue_get_enabled(void)
Definition: FLASH_Queue.c:171
FLA_Error FLA_Copy_blk_var1(FLA_Obj A, FLA_Obj B, fla_copy_t *cntl)
Definition: FLA_Copy_blk_var1.c:13
FLA_Error FLA_Copy_blk_var2(FLA_Obj A, FLA_Obj B, fla_copy_t *cntl)
Definition: FLA_Copy_blk_var2.c:13
FLA_Error FLA_Copy_blk_var3(FLA_Obj A, FLA_Obj B, fla_copy_t *cntl)
Definition: FLA_Copy_blk_var3.c:13
FLA_Error FLA_Copy_blk_var4(FLA_Obj A, FLA_Obj B, fla_copy_t *cntl)
Definition: FLA_Copy_blk_var4.c:13
fla_copy_t * flash_copy_cntl_blas
Definition: FLASH_Copy_cntl_init.c:13
FLA_Error FLA_Copy_internal(FLA_Obj A, FLA_Obj B, fla_copy_t *cntl)
Definition: FLA_Copy_internal.c:16
fla_copy_t * flash_copy_cntl
Definition: FLASH_Copy_cntl_init.c:15
FLA_Error FLA_Copy_internal_check(FLA_Obj A, FLA_Obj B, fla_copy_t *cntl)
Definition: FLA_Copy_internal_check.c:13
FLA_Error FLA_Copy_task(FLA_Obj A, FLA_Obj B, fla_copy_t *cntl)
Definition: FLA_Copy_task.c:13
FLA_Elemtype FLA_Obj_elemtype(FLA_Obj obj)
Definition: FLA_Query.c:51
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int FLA_Error
Definition: FLA_type_defs.h:47

References FLA_Check_error_level(), FLA_Copy_blk_var1(), FLA_Copy_blk_var2(), FLA_Copy_blk_var3(), FLA_Copy_blk_var4(), FLA_Copy_internal(), FLA_Copy_internal_check(), FLA_Copy_task(), FLA_Obj_elemtype(), flash_copy_cntl, flash_copy_cntl_blas, and FLASH_Queue_get_enabled().

Referenced by FLA_Apply_CAQ2_UT_lhfc_blk_var1(), FLA_CAQR2_UT_blk_var1(), FLA_Copy(), FLA_Copy_blk_var1(), FLA_Copy_blk_var2(), FLA_Copy_blk_var3(), FLA_Copy_blk_var4(), FLA_Copy_internal(), FLA_Copyr_l_blk_var1(), FLA_Copyr_l_blk_var2(), FLA_Copyr_l_blk_var3(), FLA_Copyr_l_blk_var4(), FLA_Copyr_u_blk_var1(), FLA_Copyr_u_blk_var2(), FLA_Copyr_u_blk_var3(), FLA_Copyr_u_blk_var4(), FLA_QR2_UT_blk_var1(), and FLASH_Copy().

Variable Documentation

◆ flash_copy_cntl

fla_copy_t* flash_copy_cntl
extern

Referenced by FLA_Copy_internal().

◆ flash_copy_cntl_blas

fla_copy_t* flash_copy_cntl_blas
extern