libflame revision_anchor
Functions
FLA_CAQR_UT_inc_init_structure.c File Reference

(r)

Functions

void FLA_CAQR_UT_inc_init_structure (dim_t p, dim_t nb_part, FLA_Obj R)
 

Function Documentation

◆ FLA_CAQR_UT_inc_init_structure()

void FLA_CAQR_UT_inc_init_structure ( dim_t  p,
dim_t  nb_part,
FLA_Obj  R 
)
14{
15 dim_t m, n;
16 dim_t rs, cs;
17 dim_t i, j, ip;
19
20 m = FLA_Obj_length( R );
21 n = FLA_Obj_width( R );
22 rs = FLA_Obj_row_stride( R );
23 cs = FLA_Obj_col_stride( R );
25
26 // Fill in R by row panels.
27 for ( ip = 0; ip < p; ++ip )
28 {
30
31 int m_behind = ip*nb_part;
32 int m_ahead = m - m_behind;
33
34 int m_cur = min( nb_part, m_ahead );
35 int n_cur = n;
36
37 // Iterate across columns for the current panel.
38 for ( j = 0; j < n_cur; ++j )
39 {
40 FLA_Obj* rho = buff_R1 + j*cs;
41
42 // Mark the above-diagonal blocks as full.
43 for ( i = 0; i < j; ++i )
44 {
46 rho += rs;
47 }
48
49 // Mark the diagonal block as triangular.
50 rho->base->uplo = FLA_UPPER_TRIANGULAR;
51 rho += rs;
52
53 // Mark the below-diagonal blocks as zero.
54 for ( i = j + 1; i < m_cur; ++i )
55 {
56 rho->base->uplo = FLA_ZERO_MATRIX;
57 rho += rs;
58 }
59 }
60 }
61}
dim_t FLA_Obj_width(FLA_Obj obj)
Definition FLA_Query.c:123
dim_t FLA_Obj_row_stride(FLA_Obj obj)
Definition FLA_Query.c:167
dim_t FLA_Obj_length(FLA_Obj obj)
Definition FLA_Query.c:116
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition FLA_Query.c:174
void * FLA_Obj_buffer_at_view(FLA_Obj obj)
Definition FLA_Query.c:215
unsigned long dim_t
Definition FLA_type_defs.h:71
int i
Definition bl1_axmyv2.c:145
* rho
Definition bl1_axpyv2bdotaxpy.c:322
FLA_Uplo uplo
Definition FLA_type_defs.h:141
Definition FLA_type_defs.h:159
FLA_Base_obj * base
Definition FLA_type_defs.h:168

References FLA_Obj_view::base, FLA_Obj_buffer_at_view(), FLA_Obj_col_stride(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), i, rho, and FLA_Obj_struct::uplo.

Referenced by FLASH_CAQR_UT_inc_create_hier_matrices().