Files
LAFF/Answers/Week04/Mvmult_t_unb_var2.m
Julien Lengrand-Lambert d4dce71599 Create repo
2018-05-02 09:13:08 +02:00

49 lines
1.2 KiB
Matlab
Executable File

function [ y_out ] = Mvmult_t_unb_var2( A, x, y )
[ AT, ...
AB ] = FLA_Part_2x1( A, ...
0, 'FLA_TOP' );
[ xT, ...
xB ] = FLA_Part_2x1( x, ...
0, 'FLA_TOP' );
while ( size( AT, 1 ) < size( A, 1 ) )
[ A0, ...
a1t, ...
A2 ] = FLA_Repart_2x1_to_3x1( AT, ...
AB, ...
1, 'FLA_BOTTOM' );
[ x0, ...
chi1, ...
x2 ] = FLA_Repart_2x1_to_3x1( xT, ...
xB, ...
1, 'FLA_BOTTOM' );
%------------------------------------------------------------%
y = laff_axpy( chi1, a1t, y );
%------------------------------------------------------------%
[ AT, ...
AB ] = FLA_Cont_with_3x1_to_2x1( A0, ...
a1t, ...
A2, ...
'FLA_TOP' );
[ xT, ...
xB ] = FLA_Cont_with_3x1_to_2x1( x0, ...
chi1, ...
x2, ...
'FLA_TOP' );
end
y_out = y;
return