libflame  revision_anchor
Functions
FLA_Swap_check.c File Reference

(r)

Functions

FLA_Error FLA_Swap_check (FLA_Obj A, FLA_Obj B)
 

Function Documentation

◆ FLA_Swap_check()

FLA_Error FLA_Swap_check ( FLA_Obj  A,
FLA_Obj  B 
)

References FLA_Check_conformal_dims(), FLA_Check_equal_vector_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), and FLA_Obj_is_vector().

Referenced by FLA_Swap_external().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( A );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( A );
21  FLA_Check_error_code( e_val );
22 
24  FLA_Check_error_code( e_val );
25 
26  if ( FLA_Obj_is_vector( A ) && FLA_Obj_is_vector( B ) )
27  {
28  e_val = FLA_Check_equal_vector_dims( A, B );
29  FLA_Check_error_code( e_val );
30  }
31  else
32  {
33  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, B );
34  FLA_Check_error_code( e_val );
35  }
36 
37  return FLA_SUCCESS;
38 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
FLA_Bool FLA_Obj_is_vector(FLA_Obj A)
Definition: FLA_Query.c:388
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_conformal_dims(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:393
FLA_Error FLA_Check_equal_vector_dims(FLA_Obj x, FLA_Obj y)
Definition: FLA_Check.c:477