FLA_Norm_inf.c File Reference

(r)


Functions

FLA_Error FLA_Norm_inf (FLA_Obj A, FLA_Obj norm)
void FLA_F2C() fla_norm_inf_f (F_INT *A, F_INT *norm, F_INT *IERROR)

Function Documentation

FLA_Error FLA_Norm_inf ( FLA_Obj  A,
FLA_Obj  norm 
)

References FLA_Asum_external(), FLA_Check_error_level(), FLA_Cont_with_3x1_to_2x1(), FLA_Max_abs_value(), FLA_Norm_inf_check(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_length(), FLA_Part_2x1(), and FLA_Repart_2x1_to_3x1().

Referenced by fla_norm_inf_f().

00036 {
00037   FLA_Obj AT,              A0,
00038           AB,              a1t,
00039                            A2;
00040 
00041   FLA_Obj bT,              b0,
00042           bB,              beta1,
00043                            b2;
00044   FLA_Obj b;
00045 
00046   if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
00047     FLA_Norm_inf_check( A, norm );
00048 
00049   FLA_Obj_create( FLA_Obj_datatype( A ), FLA_Obj_length( A ), 1, &b );
00050 
00051   FLA_Part_2x1( A,    &AT, 
00052                       &AB,            0, FLA_TOP );
00053 
00054   FLA_Part_2x1( b,    &bT, 
00055                       &bB,            0, FLA_TOP );
00056 
00057   while ( FLA_Obj_length( AT ) < FLA_Obj_length( A ) ){
00058 
00059     FLA_Repart_2x1_to_3x1( AT,                &A0, 
00060                         /* ** */            /* *** */
00061                                               &a1t, 
00062                            AB,                &A2,        1, FLA_BOTTOM );
00063 
00064     FLA_Repart_2x1_to_3x1( bT,                &b0, 
00065                         /* ** */            /* ***** */
00066                                               &beta1, 
00067                            bB,                &b2,        1, FLA_BOTTOM );
00068 
00069     /*------------------------------------------------------------*/
00070 
00071     FLA_Asum_external( a1t, beta1 );
00072 
00073     /*------------------------------------------------------------*/
00074 
00075     FLA_Cont_with_3x1_to_2x1( &AT,                A0, 
00076                                                   a1t, 
00077                             /* ** */           /* *** */
00078                               &AB,                A2,     FLA_TOP );
00079 
00080     FLA_Cont_with_3x1_to_2x1( &bT,                b0, 
00081                                                   beta1, 
00082                             /* ** */           /* ***** */
00083                               &bB,                b2,     FLA_TOP );
00084 
00085   }
00086 
00087   FLA_Max_abs_value( b, norm );
00088 
00089   FLA_Obj_free( &b );
00090 
00091   return FLA_SUCCESS;
00092 }

void FLA_F2C() fla_norm_inf_f ( F_INT *  A,
F_INT *  norm,
F_INT *  IERROR 
)

References FLA_Norm_inf().

00096 {
00097   *IERROR = FLA_Norm_inf( *( ( FLA_Obj * ) A    ),
00098                           *( ( FLA_Obj * ) norm ) );
00099 }


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