libflame  revision_anchor
Functions
FLA_Apply_QUD_UT_internal_check.c File Reference

(r)

Functions

FLA_Error FLA_Apply_QUD_UT_internal_check (FLA_Side side, FLA_Trans trans, FLA_Direct direct, FLA_Store storev, FLA_Obj T, FLA_Obj W, FLA_Obj R, FLA_Obj U, FLA_Obj C, FLA_Obj V, FLA_Obj D, fla_apqudut_t *cntl)
 

Function Documentation

◆ FLA_Apply_QUD_UT_internal_check()

FLA_Error FLA_Apply_QUD_UT_internal_check ( FLA_Side  side,
FLA_Trans  trans,
FLA_Direct  direct,
FLA_Store  storev,
FLA_Obj  T,
FLA_Obj  W,
FLA_Obj  R,
FLA_Obj  U,
FLA_Obj  C,
FLA_Obj  V,
FLA_Obj  D,
fla_apqudut_t cntl 
)

References FLA_Check_conformal_dims(), FLA_Check_identical_object_elemtype(), FLA_Check_matrix_matrix_dims(), FLA_Check_null_pointer(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Obj_elemtype(), FLA_Obj_length(), and FLA_Obj_width().

Referenced by FLA_Apply_QUD_UT_internal().

14 {
15  FLA_Error e_val;
16 
17  // Abort if the control structure is NULL.
18  e_val = FLA_Check_null_pointer( ( void* ) cntl );
19  FLA_Check_error_code( e_val );
20 
21  // Verify that the object element types are identical.
23  FLA_Check_error_code( e_val );
24 
26  FLA_Check_error_code( e_val );
27 
29  FLA_Check_error_code( e_val );
30 
32  FLA_Check_error_code( e_val );
33 
35  FLA_Check_error_code( e_val );
36 
38  FLA_Check_error_code( e_val );
39 
40  // Verify conformality between all the objects.
41  if ( side == FLA_LEFT )
42  {
43  if ( FLA_Obj_elemtype( R ) == FLA_MATRIX )
44  {
46  FLA_Check_error_code( e_val );
47 
48  e_val = FLA_Check_object_length_equals( T, max( FLA_Obj_length( U ),
49  FLA_Obj_length( V ) ) );
50  FLA_Check_error_code( e_val );
51 
52  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, W, R );
53  FLA_Check_error_code( e_val );
54  }
55  else // FLA_Obj_elemtype( R ) == FLA_SCALAR
56  {
57  }
58 
59  e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, U, R, C );
60  FLA_Check_error_code( e_val );
61 
62  e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, V, R, D );
63  FLA_Check_error_code( e_val );
64 
65  }
66  else
67  {
68  FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
69  }
70 
71  return FLA_SUCCESS;
72 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_elemtype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:987
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Check_conformal_dims(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:393
FLA_Error FLA_Check_matrix_matrix_dims(FLA_Trans transa, FLA_Trans transb, FLA_Obj A, FLA_Obj B, FLA_Obj C)
Definition: FLA_Check.c:417
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
FLA_Error FLA_Check_null_pointer(void *ptr)
Definition: FLA_Check.c:518
FLA_Error FLA_Check_object_length_equals(FLA_Obj A, dim_t m)
Definition: FLA_Check.c:1039
FLA_Elemtype FLA_Obj_elemtype(FLA_Obj obj)
Definition: FLA_Query.c:51