FLA_Swap_t_blk_var1.c File Reference

(r)


Functions

FLA_Error FLA_Swap_t_blk_var1 (FLA_Obj A, FLA_Obj B, fla_swap_t *cntl)

Function Documentation

FLA_Error FLA_Swap_t_blk_var1 ( FLA_Obj  A,
FLA_Obj  B,
fla_swap_t cntl 
)

References FLA_Cont_with_1x3_to_1x2(), FLA_Cont_with_3x1_to_2x1(), FLA_Determine_blocksize(), FLA_Obj_width(), FLA_Part_1x2(), FLA_Part_2x1(), FLA_Repart_1x2_to_1x3(), FLA_Repart_2x1_to_3x1(), and FLA_Swapt_external().

Referenced by FLA_Transpose_blk_var1().

00036 {
00037   FLA_Obj AL,    AR,       A0,  A1,  A2;
00038 
00039   FLA_Obj BT,              B0,
00040           BB,              B1,
00041                            B2;
00042 
00043   dim_t b;
00044 
00045   FLA_Part_1x2( A,    &AL,  &AR,      0, FLA_LEFT );
00046 
00047   FLA_Part_2x1( B,    &BT, 
00048                       &BB,            0, FLA_TOP );
00049 
00050   while ( FLA_Obj_width( AL ) < FLA_Obj_width( A ) ){
00051 
00052     b = FLA_Determine_blocksize( AR, FLA_RIGHT, FLA_Cntl_blocksize( cntl ) );
00053 
00054     FLA_Repart_1x2_to_1x3( AL,  /**/ AR,        &A0, /**/ &A1, &A2,
00055                            b, FLA_RIGHT );
00056 
00057     FLA_Repart_2x1_to_3x1( BT,                &B0, 
00058                         /* ** */            /* ** */
00059                                               &B1, 
00060                            BB,                &B2,        b, FLA_BOTTOM );
00061 
00062     /*------------------------------------------------------------*/
00063 
00064     FLA_Swapt_external( FLA_TRANSPOSE, A1, B1 );
00065 
00066     /*------------------------------------------------------------*/
00067 
00068     FLA_Cont_with_1x3_to_1x2( &AL,  /**/ &AR,        A0, A1, /**/ A2,
00069                               FLA_LEFT );
00070 
00071     FLA_Cont_with_3x1_to_2x1( &BT,                B0, 
00072                                                   B1, 
00073                             /* ** */           /* ** */
00074                               &BB,                B2,     FLA_TOP );
00075 
00076   }
00077 
00078   return FLA_SUCCESS;
00079 }


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