Debian Codegraph @

src/blas/3/syr2k/un/flamec/FLA_Syr2k_un_blk_var9.c

raw
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 FLA_Error FLA_Syr2k_un_blk_var9( FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_syr2k_t* cntl )
14 {
15 FLA_Obj AL, AR, A0, A1, A2;
16
17 FLA_Obj BL, BR, B0, B1, B2;
18
19 dim_t b;
20
21 FLA_Scalr_internal( FLA_UPPER_TRIANGULAR, beta, C,
22 FLA_Cntl_sub_scalr( cntl ) );
23
24 FLA_Part_1x2( A, &AL, &AR, 0, FLA_LEFT );
25
26 FLA_Part_1x2( B, &BL, &BR, 0, FLA_LEFT );
27
28 while ( FLA_Obj_width( AL ) < FLA_Obj_width( A ) ){
29
30 b = FLA_Determine_blocksize( AR, FLA_RIGHT, FLA_Cntl_blocksize( cntl ) );
31
32 FLA_Repart_1x2_to_1x3( AL, /**/ AR, &A0, /**/ &A1, &A2,
33 b, FLA_RIGHT );
34
35 FLA_Repart_1x2_to_1x3( BL, /**/ BR, &B0, /**/ &B1, &B2,
36 b, FLA_RIGHT );
37
38 /*------------------------------------------------------------*/
39
40 /* C = C + A1 * B1' + B1 * A1' */
41 FLA_Syr2k_internal( FLA_UPPER_TRIANGULAR, FLA_NO_TRANSPOSE,
42 alpha, A1, B1, FLA_ONE, C,
43 FLA_Cntl_sub_syr2k( cntl ) );
44
45 /*------------------------------------------------------------*/
46
47 FLA_Cont_with_1x3_to_1x2( &AL, /**/ &AR, A0, A1, /**/ A2,
48 FLA_LEFT );
49
50 FLA_Cont_with_1x3_to_1x2( &BL, /**/ &BR, B0, B1, /**/ B2,
51 FLA_LEFT );
52
53 }
54
55 return FLA_SUCCESS;
56 }
57