1 /*
2
3 Copyright (C) 2014, The University of Texas at Austin
4
5 This file is part of libflame and is available under the 3-Clause
6 BSD license, which can be found in the LICENSE file at the top-level
7 directory, or at http://opensource.org/licenses/BSD-3-Clause
8
9 */
10
11 #include "FLAME.h"
12
13 #ifdef FLA_ENABLE_NON_CRITICAL_CODE
14
FLA_Gemv_t_blk_var6(FLA_Obj alpha,FLA_Obj A,FLA_Obj x,FLA_Obj beta,FLA_Obj y,fla_gemv_t * cntl)15 FLA_Error FLA_Gemv_t_blk_var6( FLA_Obj alpha, FLA_Obj A, FLA_Obj x, FLA_Obj beta, FLA_Obj y, fla_gemv_t* cntl )
16 {
17 FLA_Obj AT, A0,
18 AB, A1,
19 A2;
20
21 FLA_Obj xT, x0,
22 xB, x1,
23 x2;
24
25 dim_t b;
26
27 FLA_Scal_internal( beta, y,
28 FLA_Cntl_sub_scal( cntl ) );
29
30 FLA_Part_2x1( A, &AT,
31 &AB, 0, FLA_BOTTOM );
32
33 FLA_Part_2x1( x, &xT,
34 &xB, 0, FLA_BOTTOM );
35
36 while ( FLA_Obj_length( AB ) < FLA_Obj_length( A ) ){
37
38 b = FLA_Determine_blocksize( AT, FLA_TOP, FLA_Cntl_blocksize( cntl ) );
39
40 FLA_Repart_2x1_to_3x1( AT, &A0,
41 &A1,
42 /* ** */ /* ** */
43 AB, &A2, b, FLA_TOP );
44
45 FLA_Repart_2x1_to_3x1( xT, &x0,
46 &x1,
47 /* ** */ /* ** */
48 xB, &x2, b, FLA_TOP );
49
50 /*------------------------------------------------------------*/
51
52 /* y = alpha * A1' * x1 + y */
53 FLA_Gemv_internal( FLA_TRANSPOSE,
54 alpha, A1, x1, FLA_ONE, y,
55 FLA_Cntl_sub_gemv( cntl ) );
56
57 /*------------------------------------------------------------*/
58
59 FLA_Cont_with_3x1_to_2x1( &AT, A0,
60 /* ** */ /* ** */
61 A1,
62 &AB, A2, FLA_BOTTOM );
63
64 FLA_Cont_with_3x1_to_2x1( &xT, x0,
65 /* ** */ /* ** */
66 x1,
67 &xB, x2, FLA_BOTTOM );
68
69 }
70
71 return FLA_SUCCESS;
72 }
73
74 #endif
75