libflame  revision_anchor
Functions
FLA_Svd.c File Reference

(r)

Functions

FLA_Error FLA_Svd (FLA_Svd_type jobu, FLA_Svd_type jobv, FLA_Obj A, FLA_Obj s, FLA_Obj U, FLA_Obj V)

Function Documentation

FLA_Error FLA_Svd ( FLA_Svd_type  jobu,
FLA_Svd_type  jobv,
FLA_Obj  A,
FLA_Obj  s,
FLA_Obj  U,
FLA_Obj  V 
)

References FLA_Check_error_level(), FLA_Obj_length(), FLA_Obj_width(), FLA_Svd_check(), and FLA_Svd_uv_unb_var1().

{
  FLA_Error r_val      = FLA_SUCCESS;
  dim_t     n_iter_max = 30;
  dim_t     k_accum    = 32;
  dim_t     b_alg      = 512;

  // Check parameters.
  if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
    FLA_Svd_check( jobu, jobv, A, s, U, V );

  if ( jobu != FLA_SVD_VECTORS_ALL || jobv != FLA_SVD_VECTORS_ALL )
    FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );

  if ( FLA_Obj_length( A ) >= FLA_Obj_width( A ) )
    r_val = FLA_Svd_uv_unb_var1( n_iter_max, A, s, U, V, k_accum, b_alg );
  else
    FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );

  return r_val;
}