libflame revision_anchor
Functions
FLA_util_base_prototypes.h File Reference

(r)

Go to the source code of this file.

Functions

float FLA_random_float (void)
 
double FLA_random_double (void)
 
scomplex FLA_random_scomplex (void)
 
dcomplex FLA_random_dcomplex (void)
 
FLA_Error FLA_Absolute_square (FLA_Obj alpha)
 
FLA_Error FLA_Absolute_value (FLA_Obj alpha)
 
double FLA_Clock (void)
 
FLA_Error FLA_Conjugate (FLA_Obj A)
 
FLA_Error FLA_Conjugate_r (FLA_Uplo uplo, FLA_Obj A)
 
FLA_Error FLA_Fill_with_linear_dist (FLA_Obj shift, FLA_Obj delta, FLA_Obj x)
 
FLA_Error FLA_Fill_with_inverse_dist (FLA_Obj alpha, FLA_Obj x)
 
FLA_Error FLA_Fill_with_geometric_dist (FLA_Obj alpha, FLA_Obj x)
 
FLA_Error FLA_Fill_with_random_dist (FLA_Obj shift, FLA_Obj max, FLA_Obj x)
 
FLA_Error FLA_Fill_with_logarithmic_dist (FLA_Obj max, FLA_Obj x)
 
FLA_Error FLA_Fill_with_cluster_dist (FLA_Obj n_clusters, FLA_Obj cluster_width, FLA_Obj x)
 
FLA_Error FLA_Hermitianize (FLA_Uplo uplo, FLA_Obj A)
 
FLA_Error FLA_Invert (FLA_Conj conj, FLA_Obj x)
 
FLA_Error FLA_Inv_scal_elemwise (FLA_Trans trans, FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Max_abs_value (FLA_Obj A, FLA_Obj amax)
 
FLA_Error FLA_Max_abs_value_herm (FLA_Uplo uplo, FLA_Obj A, FLA_Obj maxabs)
 
double FLA_Max_elemwise_diff (FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Mult_add (FLA_Obj alpha, FLA_Obj beta, FLA_Obj gamma)
 
FLA_Error FLA_Negate (FLA_Obj x)
 
FLA_Error FLA_Norm1 (FLA_Obj A, FLA_Obj norm)
 
FLA_Error FLA_Norm_inf (FLA_Obj A, FLA_Obj norm)
 
FLA_Error FLA_Norm_frob (FLA_Obj A, FLA_Obj norm)
 
FLA_Error FLA_Pow (FLA_Obj base, FLA_Obj exp, FLA_Obj btoe)
 
FLA_Error FLA_Random_matrix (FLA_Obj A)
 
FLA_Error FLA_Random_herm_matrix (FLA_Uplo uplo, FLA_Obj A)
 
FLA_Error FLA_Random_symm_matrix (FLA_Uplo uplo, FLA_Obj A)
 
FLA_Error FLA_Random_spd_matrix (FLA_Uplo uplo, FLA_Obj A)
 
FLA_Error FLA_Random_tri_matrix (FLA_Uplo uplo, FLA_Diag diag, FLA_Obj A)
 
FLA_Error FLA_Random_unitary_matrix (FLA_Obj A)
 
FLA_Error FLA_Scal_elemwise (FLA_Trans trans, FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Setr (FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A)
 
FLA_Error FLA_Shift_pivots_to_check (FLA_Pivot_type ptype, FLA_Obj p)
 
FLA_Error FLA_Sqrt (FLA_Obj alpha)
 
FLA_Error FLA_Symmetrize (FLA_Uplo uplo, FLA_Obj A)
 
FLA_Error FLA_Triangularize (FLA_Uplo uplo, FLA_Diag diag, FLA_Obj A)
 
FLA_Error FLA_Transpose (FLA_Obj A)
 
FLA_Error FLA_Set (FLA_Obj alpha, FLA_Obj A)
 
FLA_Error FLA_Set_diag (FLA_Obj alpha, FLA_Obj A)
 
FLA_Error FLA_Set_offdiag (int offset, FLA_Obj alpha, FLA_Obj A)
 
FLA_Error FLA_Set_to_identity (FLA_Obj A)
 
FLA_Error FLA_Add_to_diag (void *diag_value, FLA_Obj A)
 
FLA_Error FLA_Shift_diag (FLA_Conj conj, FLA_Obj sigma, FLA_Obj A)
 
FLA_Error FLA_Scale_diag (FLA_Conj conj, FLA_Obj alpha, FLA_Obj A)
 
FLA_Error FLA_Set_diagonal_vector (FLA_Obj A, FLA_Obj d)
 
FLA_Error FLA_Set_diagonal_matrix (FLA_Obj d, FLA_Obj A)
 
FLA_Error FLA_Absolute_square_check (FLA_Obj alpha)
 
FLA_Error FLA_Absolute_value_check (FLA_Obj alpha)
 
FLA_Error FLA_Conjugate_check (FLA_Obj A)
 
FLA_Error FLA_Conjugate_r_check (FLA_Uplo uplo, FLA_Obj A)
 
FLA_Error FLA_Fill_with_linear_dist_check (FLA_Obj shift, FLA_Obj delta, FLA_Obj x)
 
FLA_Error FLA_Fill_with_inverse_dist_check (FLA_Obj alpha, FLA_Obj x)
 
FLA_Error FLA_Fill_with_geometric_dist_check (FLA_Obj alpha, FLA_Obj x)
 
FLA_Error FLA_Fill_with_random_dist_check (FLA_Obj shift, FLA_Obj max, FLA_Obj x)
 
FLA_Error FLA_Fill_with_logarithmic_dist_check (FLA_Obj alpha, FLA_Obj x)
 
FLA_Error FLA_Fill_with_cluster_dist_check (FLA_Obj n_clusters, FLA_Obj cluster_width, FLA_Obj x)
 
FLA_Error FLA_Hermitianize_check (FLA_Uplo uplo, FLA_Obj A)
 
FLA_Error FLA_Invert_check (FLA_Conj conj, FLA_Obj x)
 
FLA_Error FLA_Inv_scal_elemwise_check (FLA_Trans trans, FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Max_abs_value_check (FLA_Obj A, FLA_Obj amax)
 
FLA_Error FLA_Max_abs_value_herm_check (FLA_Uplo uplo, FLA_Obj A, FLA_Obj maxabs)
 
FLA_Error FLA_Max_elemwise_diff_check (FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Mult_add_check (FLA_Obj alpha, FLA_Obj beta, FLA_Obj gamma)
 
FLA_Error FLA_Negate_check (FLA_Obj x)
 
FLA_Error FLA_Norm1_check (FLA_Obj A, FLA_Obj norm)
 
FLA_Error FLA_Norm_inf_check (FLA_Obj A, FLA_Obj norm)
 
FLA_Error FLA_Norm_frob_check (FLA_Obj A, FLA_Obj norm)
 
FLA_Error FLA_Pow_check (FLA_Obj base, FLA_Obj exp, FLA_Obj btoe)
 
FLA_Error FLA_Random_matrix_check (FLA_Obj A)
 
FLA_Error FLA_Random_herm_matrix_check (FLA_Uplo uplo, FLA_Obj A)
 
FLA_Error FLA_Random_symm_matrix_check (FLA_Uplo uplo, FLA_Obj A)
 
FLA_Error FLA_Random_spd_matrix_check (FLA_Uplo uplo, FLA_Obj A)
 
FLA_Error FLA_Random_tri_matrix_check (FLA_Uplo uplo, FLA_Diag diag, FLA_Obj A)
 
FLA_Error FLA_Random_unitary_matrix_check (FLA_Obj A)
 
FLA_Error FLA_Scal_elemwise_check (FLA_Trans trans, FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Setr_check (FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A)
 
FLA_Error FLA_Sort_check (FLA_Direct direct, FLA_Obj x)
 
FLA_Error FLA_Sqrt_check (FLA_Obj alpha)
 
FLA_Error FLA_Symmetrize_check (FLA_Uplo uplo, FLA_Obj A)
 
FLA_Error FLA_Triangularize_check (FLA_Uplo uplo, FLA_Diag diag, FLA_Obj A)
 
FLA_Error FLA_Transpose_check (FLA_Obj A)
 
FLA_Error FLA_Set_check (FLA_Obj alpha, FLA_Obj A)
 
FLA_Error FLA_Set_diag_check (FLA_Obj alpha, FLA_Obj A)
 
FLA_Error FLA_Set_to_identity_check (FLA_Obj A)
 
FLA_Error FLA_Add_to_diag_check (void *diag_value, FLA_Obj A)
 
FLA_Error FLA_Shift_diag_check (FLA_Conj conj, FLA_Obj sigma, FLA_Obj A)
 
FLA_Error FLA_Scale_diag_check (FLA_Conj conj, FLA_Obj alpha, FLA_Obj A)
 
FLA_Error FLA_Transpose_blk_var1 (FLA_Obj A, fla_tpose_t *cntl)
 
FLA_Error FLA_Transpose_blk_var2 (FLA_Obj A, fla_tpose_t *cntl)
 
FLA_Error FLA_Transpose_unb_var1 (FLA_Obj A)
 
FLA_Error FLA_Transpose_unb_var2 (FLA_Obj A)
 
FLA_Error FLA_Swap_t_blk_var1 (FLA_Obj A, FLA_Obj B, fla_swap_t *cntl)
 
FLA_Error FLA_Swap_t_blk_var2 (FLA_Obj A, FLA_Obj B, fla_swap_t *cntl)
 
FLA_Error FLA_Sort (FLA_Direct direct, FLA_Obj x)
 
FLA_Error FLA_Sort_f_ops (int m_x, float *x, int inc_x)
 
FLA_Error FLA_Sort_b_ops (int m_x, float *x, int inc_x)
 
FLA_Error FLA_Sort_f_opd (int m_x, double *x, int inc_x)
 
FLA_Error FLA_Sort_b_opd (int m_x, double *x, int inc_x)
 

Function Documentation

◆ FLA_Absolute_square()

FLA_Error FLA_Absolute_square ( FLA_Obj  alpha)
14{
15 FLA_Datatype datatype;
16
19
20 datatype = FLA_Obj_datatype( alpha );
21
22 switch ( datatype ){
23
24 case FLA_FLOAT:
25 {
26 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
27
28 *buff_alpha = (*buff_alpha) * (*buff_alpha);
29
30 break;
31 }
32
33 case FLA_DOUBLE:
34 {
35 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
36
37 *buff_alpha = (*buff_alpha) * (*buff_alpha);
38
39 break;
40 }
41
42 case FLA_COMPLEX:
43 {
45
46 buff_alpha->real = buff_alpha->real * buff_alpha->real +
47 buff_alpha->imag * buff_alpha->imag;
48 buff_alpha->imag = 0.0F;
49
50 break;
51 }
52
54 {
56
57 buff_alpha->real = buff_alpha->real * buff_alpha->real +
58 buff_alpha->imag * buff_alpha->imag;
59 buff_alpha->imag = 0.0;
60
61 break;
62 }
63
64 }
65
66 return FLA_SUCCESS;
67}
FLA_Error FLA_Absolute_square_check(FLA_Obj alpha)
Definition FLA_Absolute_square_check.c:13
unsigned int FLA_Check_error_level(void)
Definition FLA_Check.c:18
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition FLA_Query.c:13
int FLA_Datatype
Definition FLA_type_defs.h:49
int i
Definition bl1_axmyv2.c:145
Definition blis_type_defs.h:138
double real
Definition blis_type_defs.h:139
Definition blis_type_defs.h:133
float real
Definition blis_type_defs.h:134

References FLA_Absolute_square_check(), FLA_Check_error_level(), FLA_Obj_datatype(), i, scomplex::real, and dcomplex::real.

Referenced by FLA_Ttmm_l_unb_var1(), FLA_Ttmm_l_unb_var2(), FLA_Ttmm_l_unb_var3(), FLA_Ttmm_u_unb_var1(), FLA_Ttmm_u_unb_var2(), and FLA_Ttmm_u_unb_var3().

◆ FLA_Absolute_square_check()

FLA_Error FLA_Absolute_square_check ( FLA_Obj  alpha)
14{
16
19
22
25
26 return FLA_SUCCESS;
27}
FLA_Error FLA_Check_if_scalar(FLA_Obj A)
Definition FLA_Check.c:373
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition FLA_Check.c:232
int FLA_Error
Definition FLA_type_defs.h:47

References FLA_Check_floating_object(), FLA_Check_if_scalar(), and FLA_Check_nonconstant_object().

Referenced by FLA_Absolute_square().

◆ FLA_Absolute_value()

FLA_Error FLA_Absolute_value ( FLA_Obj  alpha)
14{
15 FLA_Datatype datatype;
16
19
20 datatype = FLA_Obj_datatype( alpha );
21
22 switch ( datatype ){
23
24 case FLA_FLOAT:
25 {
26 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
27
28 *buff_alpha = ( float ) fabs( ( double ) *buff_alpha );
29
30 break;
31 }
32
33 case FLA_DOUBLE:
34 {
35 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
36
38
39 break;
40 }
41
42 case FLA_COMPLEX:
43 {
45
46 buff_alpha->real = ( float ) sqrt( ( double ) buff_alpha->real * buff_alpha->real +
47 buff_alpha->imag * buff_alpha->imag );
48 buff_alpha->imag = 0.0F;
49
50
51 break;
52 }
53
55 {
57
58 buff_alpha->real = sqrt( buff_alpha->real * buff_alpha->real +
59 buff_alpha->imag * buff_alpha->imag );
60 buff_alpha->imag = 0.0;
61
62 break;
63 }
64
65 }
66
67 return FLA_SUCCESS;
68}
FLA_Error FLA_Absolute_value_check(FLA_Obj alpha)
Definition FLA_Absolute_value_check.c:13

References FLA_Absolute_value_check(), FLA_Check_error_level(), FLA_Obj_datatype(), i, scomplex::real, and dcomplex::real.

Referenced by FLA_Bidiag_UT_l_realify_unb(), FLA_Bidiag_UT_u_realify_unb(), FLA_Tridiag_UT_l_realify_unb(), and FLA_Tridiag_UT_u_realify_unb().

◆ FLA_Absolute_value_check()

FLA_Error FLA_Absolute_value_check ( FLA_Obj  alpha)

◆ FLA_Add_to_diag()

FLA_Error FLA_Add_to_diag ( void diag_value,
FLA_Obj  A 
)
14{
15 FLA_Datatype datatype;
17 dim_t rs, cs;
18
21
22 datatype = FLA_Obj_datatype( A );
24 rs = FLA_Obj_row_stride( A );
25 cs = FLA_Obj_col_stride( A );
26
27 switch ( datatype ){
28
29 case FLA_FLOAT:
30 {
31 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
32 float *value_ptr = ( float * ) diag_value;
33
34 for ( j = 0; j < min_m_n; j++ )
35 buff_A[ j*cs + j*rs ] += *value_ptr;
36
37 break;
38 }
39
40 case FLA_DOUBLE:
41 {
42 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
43 double *value_ptr = ( double * ) diag_value;
44
45 for ( j = 0; j < min_m_n; j++ )
46 buff_A[ j*cs + j*rs ] += *value_ptr;
47
48 break;
49 }
50
51 case FLA_COMPLEX:
52 {
55
56 for ( j = 0; j < min_m_n; j++ )
57 {
58 buff_A[ j*cs + j*rs ].real += value_ptr->real;
59 buff_A[ j*cs + j*rs ].imag += value_ptr->imag;
60 }
61
62 break;
63 }
64
66 {
69
70 for ( j = 0; j < min_m_n; j++ )
71 {
72 buff_A[ j*cs + j*rs ].real += value_ptr->real;
73 buff_A[ j*cs + j*rs ].imag += value_ptr->imag;
74 }
75
76 break;
77 }
78
79 }
80
81 return FLA_SUCCESS;
82}
FLA_Error FLA_Add_to_diag_check(void *diag_value, FLA_Obj A)
Definition FLA_Add_to_diag_check.c:13
dim_t FLA_Obj_row_stride(FLA_Obj obj)
Definition FLA_Query.c:167
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition FLA_Query.c:174
dim_t FLA_Obj_min_dim(FLA_Obj obj)
Definition FLA_Query.c:153
unsigned long dim_t
Definition FLA_type_defs.h:71

References FLA_Add_to_diag_check(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_min_dim(), FLA_Obj_row_stride(), i, scomplex::real, and dcomplex::real.

◆ FLA_Add_to_diag_check()

FLA_Error FLA_Add_to_diag_check ( void diag_value,
FLA_Obj  A 
)

◆ FLA_Clock()

double FLA_Clock ( void  )
21{
22 return FLA_Clock_helper();
23}
double FLA_Clock_helper(void)
Definition FLA_Clock.c:40

References FLA_Clock_helper().

Referenced by FLASH_Queue_begin(), FLASH_Queue_end(), and FLASH_Queue_exec().

◆ FLA_Conjugate()

FLA_Error FLA_Conjugate ( FLA_Obj  A)
14{
15 FLA_Datatype datatype;
16 int m_A, n_A;
17 int rs_A, cs_A;
18
21
22 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
23
24 if ( FLA_Obj_is_real( A ) ) return FLA_SUCCESS;
25
26 datatype = FLA_Obj_datatype( A );
27
28 m_A = FLA_Obj_length( A );
29 n_A = FLA_Obj_width( A );
32
33
34 switch ( datatype ){
35
36 case FLA_COMPLEX:
37 {
39
41 n_A,
42 buff_A, rs_A, cs_A );
43
44 break;
45 }
46
48 {
50
52 n_A,
53 buff_A, rs_A, cs_A );
54
55 break;
56 }
57
58 }
59
60 return FLA_SUCCESS;
61}
FLA_Error FLA_Conjugate_check(FLA_Obj A)
Definition FLA_Conjugate_check.c:13
dim_t FLA_Obj_width(FLA_Obj obj)
Definition FLA_Query.c:123
FLA_Bool FLA_Obj_is_real(FLA_Obj A)
Definition FLA_Query.c:307
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition FLA_Query.c:400
dim_t FLA_Obj_length(FLA_Obj obj)
Definition FLA_Query.c:116
void bl1_zconjm(int m, int n, dcomplex *a, int a_rs, int a_cs)
Definition bl1_conjm.c:72
void bl1_cconjm(int m, int n, scomplex *a, int a_rs, int a_cs)
Definition bl1_conjm.c:23

References bl1_cconjm(), bl1_zconjm(), FLA_Check_error_level(), FLA_Conjugate_check(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_is_real(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), and i.

Referenced by FLA_Bidiag_UT_internal(), FLA_Bidiag_UT_u_step_unb_var3(), FLA_Bidiag_UT_u_step_unb_var4(), FLA_LQ_UT_form_Q(), FLA_Svd(), FLA_Svd_ext(), and FLA_Svd_ext_u_unb_var1().

◆ FLA_Conjugate_check()

FLA_Error FLA_Conjugate_check ( FLA_Obj  A)

◆ FLA_Conjugate_r()

FLA_Error FLA_Conjugate_r ( FLA_Uplo  uplo,
FLA_Obj  A 
)
14{
15 FLA_Datatype datatype;
16 int m_A, n_A;
17 int rs_A, cs_A;
19
21 FLA_Conjugate_r_check( uplo, A );
22
23 if ( FLA_Obj_is_real( A ) ) return FLA_SUCCESS;
24
25 datatype = FLA_Obj_datatype( A );
26
27 m_A = FLA_Obj_length( A );
28 n_A = FLA_Obj_width( A );
31
33
34 switch ( datatype ){
35
36 case FLA_COMPLEX:
37 {
39
41 m_A,
42 n_A,
43 buff_A, rs_A, cs_A );
44
45 break;
46 }
47
49 {
51
53 m_A,
54 n_A,
55 buff_A, rs_A, cs_A );
56
57 break;
58 }
59
60 }
61
62 return FLA_SUCCESS;
63}
FLA_Error FLA_Conjugate_r_check(FLA_Uplo uplo, FLA_Obj A)
Definition FLA_Conjugate_r_check.c:13
void FLA_Param_map_flame_to_blis_uplo(FLA_Uplo uplo, uplo1_t *blis_uplo)
Definition FLA_Param.c:285
void bl1_cconjmr(uplo1_t uplo, int m, int n, scomplex *a, int a_rs, int a_cs)
Definition bl1_conjmr.c:23
void bl1_zconjmr(uplo1_t uplo, int m, int n, dcomplex *a, int a_rs, int a_cs)
Definition bl1_conjmr.c:79
uplo1_t
Definition blis_type_defs.h:61

References bl1_cconjmr(), bl1_zconjmr(), FLA_Check_error_level(), FLA_Conjugate_r_check(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_is_real(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_Param_map_flame_to_blis_uplo(), and i.

Referenced by FLA_Bidiag_UT_internal().

◆ FLA_Conjugate_r_check()

FLA_Error FLA_Conjugate_r_check ( FLA_Uplo  uplo,
FLA_Obj  A 
)
14{
16
19
22
25
26 return FLA_SUCCESS;
27}
FLA_Error FLA_Check_valid_uplo(FLA_Uplo uplo)
Definition FLA_Check.c:76

References FLA_Check_floating_object(), FLA_Check_nonconstant_object(), and FLA_Check_valid_uplo().

Referenced by FLA_Conjugate_r().

◆ FLA_Fill_with_cluster_dist()

FLA_Error FLA_Fill_with_cluster_dist ( FLA_Obj  n_clusters,
FLA_Obj  cluster_width,
FLA_Obj  x 
)
14{
15 FLA_Obj lT, l0,
16 lB, l1,
17 l2;
19 lT_last;
20 FLA_Obj l, k;
22 dim_t n_x;
23 int nc;
24 int n_regions;
25 int region_width;
27
28
31
34
36 n_regions = 2 * nc;
39
40 // Create a local counter to increment as we create the distribution.
41 FLA_Obj_create( dt_real, 1, 1, 0, 0, &k );
42
43 // Create a local vector l. We will work with this vector, which is
44 // the same length as x, so that we can use vertical partitioning.
45 FLA_Obj_create( dt_real, n_x, 1, 0, 0, &l );
46
47 // Initialize k to 1.
48 FLA_Set( FLA_ZERO, k );
49
50 FLA_Part_2x1( l, &lT,
51 &lB, 0, FLA_TOP );
52
54 {
56 /* ** */ /* ******* */
57 &l1,
59
60 /*------------------------------------------------------------*/
61
63
64 /*------------------------------------------------------------*/
65
67 l1,
68 /* ** */ /* ******* */
69 &lB, l2, FLA_TOP );
70
71
73 &lT_last, 1, FLA_BOTTOM );
74 FLA_Copy( lT_last, k );
75
76
78 /* ** */ /* ******* */
79 &l1,
81
82 /*------------------------------------------------------------*/
83
86
87 /*------------------------------------------------------------*/
88
90 l1,
91 /* ** */ /* ******* */
92 &lB, l2, FLA_TOP );
93
95 &lT_last, 1, FLA_BOTTOM );
96 FLA_Copy( lT_last, k );
98 }
99
100 if ( leftover_width > 0 )
102
103 // Normalize by last element.
104 //FLA_Part_2x1( l, &lT,
105 // &lB, 1, FLA_BOTTOM );
106 //FLA_Inv_scal( lB, l );
107
108 // Overwrite x with the distribution we created in l.
109 FLA_Copy( l, x );
110
111 FLA_Obj_free( &l );
112 FLA_Obj_free( &k );
113
114 return FLA_SUCCESS;
115}
FLA_Error FLA_Fill_with_cluster_dist_check(FLA_Obj n_clusters, FLA_Obj cluster_width, FLA_Obj x)
Definition FLA_Fill_with_cluster_dist_check.c:13
FLA_Error FLA_Copy(FLA_Obj A, FLA_Obj B)
Definition FLA_Copy.c:15
FLA_Obj FLA_ZERO
Definition FLA_Init.c:20
FLA_Obj FLA_ONE
Definition FLA_Init.c:18
FLA_Error FLA_Cont_with_3x1_to_2x1(FLA_Obj *AT, FLA_Obj A0, FLA_Obj A1, FLA_Obj *AB, FLA_Obj A2, FLA_Side side)
Definition FLA_View.c:428
FLA_Error FLA_Repart_2x1_to_3x1(FLA_Obj AT, FLA_Obj *A0, FLA_Obj *A1, FLA_Obj AB, FLA_Obj *A2, dim_t mb, FLA_Side side)
Definition FLA_View.c:226
FLA_Error FLA_Obj_create(FLA_Datatype datatype, dim_t m, dim_t n, dim_t rs, dim_t cs, FLA_Obj *obj)
Definition FLA_Obj.c:55
FLA_Error FLA_Part_2x1(FLA_Obj A, FLA_Obj *A1, FLA_Obj *A2, dim_t mb, FLA_Side side)
Definition FLA_View.c:76
FLA_Datatype FLA_Obj_datatype_proj_to_real(FLA_Obj A)
Definition FLA_Query.c:23
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition FLA_Obj.c:588
dim_t FLA_Obj_vector_dim(FLA_Obj obj)
Definition FLA_Query.c:137
FLA_Error FLA_Fill_with_random_dist(FLA_Obj shift, FLA_Obj max, FLA_Obj x)
Definition FLA_Fill_with_random_dist.c:13
FLA_Error FLA_Mult_add(FLA_Obj alpha, FLA_Obj beta, FLA_Obj gamma)
Definition FLA_Mult_add.c:13
FLA_Error FLA_Set(FLA_Obj alpha, FLA_Obj A)
Definition FLA_Set.c:13
FLA_Error FLA_Fill_with_linear_dist(FLA_Obj shift, FLA_Obj delta, FLA_Obj x)
Definition FLA_Fill_with_linear_dist.c:13
FLA_Error FLA_Sort(FLA_Direct direct, FLA_Obj x)
Definition FLA_Sort.c:18
Definition FLA_type_defs.h:159

References FLA_Check_error_level(), FLA_Cont_with_3x1_to_2x1(), FLA_Copy(), FLA_Fill_with_cluster_dist_check(), FLA_Fill_with_linear_dist(), FLA_Fill_with_random_dist(), FLA_Mult_add(), FLA_Obj_create(), FLA_Obj_datatype_proj_to_real(), FLA_Obj_free(), FLA_Obj_length(), FLA_Obj_vector_dim(), FLA_ONE, FLA_Part_2x1(), FLA_Repart_2x1_to_3x1(), FLA_Set(), FLA_Sort(), FLA_ZERO, and i.

◆ FLA_Fill_with_cluster_dist_check()

FLA_Error FLA_Fill_with_cluster_dist_check ( FLA_Obj  n_clusters,
FLA_Obj  cluster_width,
FLA_Obj  x 
)
14{
16
19
22
25
28
31
34
37
40
41 return FLA_SUCCESS;
42}
FLA_Error FLA_Check_real_object(FLA_Obj A)
Definition FLA_Check.c:258
FLA_Error FLA_Check_identical_object_precision(FLA_Obj A, FLA_Obj B)
Definition FLA_Check.c:298
FLA_Error FLA_Check_if_vector(FLA_Obj A)
Definition FLA_Check.c:383
FLA_Error FLA_Check_int_object(FLA_Obj A)
Definition FLA_Check.c:245

References FLA_Check_floating_object(), FLA_Check_identical_object_precision(), FLA_Check_if_scalar(), FLA_Check_if_vector(), FLA_Check_int_object(), FLA_Check_nonconstant_object(), and FLA_Check_real_object().

Referenced by FLA_Fill_with_cluster_dist().

◆ FLA_Fill_with_geometric_dist()

FLA_Error FLA_Fill_with_geometric_dist ( FLA_Obj  alpha,
FLA_Obj  x 
)
14{
15 FLA_Obj lT, l0,
16 lB, lambda1,
17 l2;
20 dim_t n_x;
21
22
25
28
29 // Create a local counter to increment as we create the distribution.
30 FLA_Obj_create( dt_real, 1, 1, 0, 0, &k );
31
32 // Create a local vector l. We will work with this vector, which is
33 // the same length as x, so that we can use vertical partitioning.
34 FLA_Obj_create( dt_real, n_x, 1, 0, 0, &l );
35
36 // Create a local real scalar alpha2 of the same precision as
37 // alpha. Then copy alpha to alpha2, which will convert the
38 // complex value to real, if necessary (ie: if alpha is complex).
39 FLA_Obj_create( dt_real, 1, 1, 0, 0, &alpha2 );
41
42 // Create a temporary scalar.
43 FLA_Obj_create( dt_real, 1, 1, 0, 0, &temp );
44
45 // Initialize k to 0.
46 FLA_Set( FLA_ZERO, k );
47
48 FLA_Part_2x1( l, &lT,
49 &lB, 0, FLA_TOP );
50
51 while ( FLA_Obj_length( lB ) > 0 )
52 {
54 /* ** */ /* ******* */
55 &lambda1,
56 lB, &l2, 1, FLA_BOTTOM );
57
58 /*------------------------------------------------------------*/
59
60 // lambda1 = alpha * (1 - alpha)^k;
63 FLA_Pow( temp, k, lambda1 );
65
66 // k = k + 1;
68
69 /*------------------------------------------------------------*/
70
72 lambda1,
73 /* ** */ /* ******* */
74 &lB, l2, FLA_TOP );
75 }
76
77 // Normalize by first element.
78 //FLA_Part_2x1( l, &lT,
79 // &lB, 1, FLA_TOP );
80 //FLA_Inv_scal( lT, l );
81
82 // Overwrite x with the distribution we created in l.
83 // If x is complex, then this is where the conversion between
84 // datatypes happens.
85 FLA_Copy( l, x );
86
87 FLA_Obj_free( &l );
88 FLA_Obj_free( &k );
91
92 return FLA_SUCCESS;
93}
FLA_Error FLA_Fill_with_geometric_dist_check(FLA_Obj alpha, FLA_Obj x)
Definition FLA_Fill_with_geometric_dist_check.c:13
FLA_Error FLA_Scal(FLA_Obj alpha, FLA_Obj A)
Definition FLA_Scal.c:15
FLA_Obj FLA_MINUS_ONE
Definition FLA_Init.c:22
FLA_Error FLA_Pow(FLA_Obj base, FLA_Obj exp, FLA_Obj btoe)
Definition FLA_Pow.c:13
dcomplex temp
Definition bl1_axpyv2b.c:301
double *restrict alpha2
Definition bl1_dotv2axpyv2b.c:188

References alpha2, FLA_Check_error_level(), FLA_Cont_with_3x1_to_2x1(), FLA_Copy(), FLA_Fill_with_geometric_dist_check(), FLA_MINUS_ONE, FLA_Mult_add(), FLA_Obj_create(), FLA_Obj_datatype_proj_to_real(), FLA_Obj_free(), FLA_Obj_length(), FLA_Obj_vector_dim(), FLA_ONE, FLA_Part_2x1(), FLA_Pow(), FLA_Repart_2x1_to_3x1(), FLA_Scal(), FLA_Set(), FLA_ZERO, i, and temp.

◆ FLA_Fill_with_geometric_dist_check()

FLA_Error FLA_Fill_with_geometric_dist_check ( FLA_Obj  alpha,
FLA_Obj  x 
)

◆ FLA_Fill_with_inverse_dist()

FLA_Error FLA_Fill_with_inverse_dist ( FLA_Obj  alpha,
FLA_Obj  x 
)
14{
15 FLA_Obj lT, l0,
16 lB, lambda1,
17 l2;
18 FLA_Obj l, k, alpha2;
20 dim_t n_x;
21
22
25
28
29 // Create a local counter to increment as we create the distribution.
30 FLA_Obj_create( dt_real, 1, 1, 0, 0, &k );
31
32 // Create a local vector l. We will work with this vector, which is
33 // the same length as x, so that we can use vertical partitioning.
34 FLA_Obj_create( dt_real, n_x, 1, 0, 0, &l );
35
36 // Create a local real scalar alpha2 of the same precision as
37 // alpha. Then copy alpha to alpha2, which will convert the
38 // complex value to real, if necessary (ie: if alpha is complex).
39 FLA_Obj_create( dt_real, 1, 1, 0, 0, &alpha2 );
41
42 // Initialize k to 1.
43 FLA_Set( FLA_ONE, k );
44
45 FLA_Part_2x1( l, &lT,
46 &lB, 0, FLA_TOP );
47
48 while ( FLA_Obj_length( lB ) > 0 )
49 {
51 /* ** */ /* ******* */
52 &lambda1,
53 lB, &l2, 1, FLA_BOTTOM );
54
55 /*------------------------------------------------------------*/
56
57 // lambda1 = alpha2 / k;
58 FLA_Copy( k, lambda1 );
61
62 // k = k + 1;
64
65 /*------------------------------------------------------------*/
66
68 lambda1,
69 /* ** */ /* ******* */
70 &lB, l2, FLA_TOP );
71 }
72
73 // Overwrite x with the distribution we created in l.
74 // If x is complex, then this is where the conversion between
75 // datatypes happens.
76 FLA_Copy( l, x );
77
78 FLA_Obj_free( &l );
79 FLA_Obj_free( &k );
81
82 return FLA_SUCCESS;
83}
FLA_Error FLA_Fill_with_inverse_dist_check(FLA_Obj alpha, FLA_Obj x)
Definition FLA_Fill_with_inverse_dist_check.c:13
FLA_Error FLA_Inv_scal(FLA_Obj alpha, FLA_Obj A)
Definition FLA_Inv_scal.c:13
FLA_Error FLA_Invert(FLA_Conj conj, FLA_Obj x)
Definition FLA_Invert.c:13

References alpha2, FLA_Check_error_level(), FLA_Cont_with_3x1_to_2x1(), FLA_Copy(), FLA_Fill_with_inverse_dist_check(), FLA_Inv_scal(), FLA_Invert(), FLA_Mult_add(), FLA_Obj_create(), FLA_Obj_datatype_proj_to_real(), FLA_Obj_free(), FLA_Obj_length(), FLA_Obj_vector_dim(), FLA_ONE, FLA_Part_2x1(), FLA_Repart_2x1_to_3x1(), FLA_Set(), and i.

◆ FLA_Fill_with_inverse_dist_check()

FLA_Error FLA_Fill_with_inverse_dist_check ( FLA_Obj  alpha,
FLA_Obj  x 
)

◆ FLA_Fill_with_linear_dist()

FLA_Error FLA_Fill_with_linear_dist ( FLA_Obj  shift,
FLA_Obj  delta,
FLA_Obj  x 
)
14{
15 FLA_Obj lT, l0,
16 lB, lambda1,
17 l2;
18 FLA_Obj l, k, delta2;
20 dim_t n_x;
21
22
25
28
29 // Create a local counter to increment as we create the distribution.
30 FLA_Obj_create( dt_real, 1, 1, 0, 0, &k );
31
32 // Create a local vector l. We will work with this vector, which is
33 // the same length as x, so that we can use vertical partitioning.
34 FLA_Obj_create( dt_real, n_x, 1, 0, 0, &l );
35
36 // Create a local real scalar alpha2 of the same precision as
37 // alpha. Then copy alpha to alpha2, which will convert the
38 // complex value to real, if necessary (ie: if alpha is complex).
39 FLA_Obj_create( dt_real, 1, 1, 0, 0, &delta2 );
41
42 // Initialize k to shift + delta2.
43 FLA_Set( shift, k );
45
46 FLA_Part_2x1( l, &lT,
47 &lB, 0, FLA_TOP );
48
49 while ( FLA_Obj_length( lB ) > 0 )
50 {
52 /* ** */ /* ******* */
53 &lambda1,
54 lB, &l2, 1, FLA_BOTTOM );
55
56 /*------------------------------------------------------------*/
57
58 // lambda1 = k;
59 FLA_Copy( k, lambda1 );
60
61 // k = k + delta2;
63
64 /*------------------------------------------------------------*/
65
67 lambda1,
68 /* ** */ /* ******* */
69 &lB, l2, FLA_TOP );
70 }
71
72 // Normalize by last element.
73 //FLA_Part_2x1( l, &lT,
74 // &lB, 1, FLA_BOTTOM );
75 //FLA_Inv_scal( lB, l );
76
77 // Overwrite x with the distribution we created in l.
78 // If x is complex, then this is where the conversion between
79 // datatypes happens.
80 FLA_Copy( l, x );
81
82 FLA_Obj_free( &l );
83 FLA_Obj_free( &k );
85
86 return FLA_SUCCESS;
87}
FLA_Error FLA_Fill_with_linear_dist_check(FLA_Obj shift, FLA_Obj delta, FLA_Obj x)
Definition FLA_Fill_with_linear_dist_check.c:13

References FLA_Check_error_level(), FLA_Cont_with_3x1_to_2x1(), FLA_Copy(), FLA_Fill_with_linear_dist_check(), FLA_Mult_add(), FLA_Obj_create(), FLA_Obj_datatype_proj_to_real(), FLA_Obj_free(), FLA_Obj_length(), FLA_Obj_vector_dim(), FLA_ONE, FLA_Part_2x1(), FLA_Repart_2x1_to_3x1(), FLA_Set(), and i.

Referenced by FLA_Fill_with_cluster_dist().

◆ FLA_Fill_with_linear_dist_check()

FLA_Error FLA_Fill_with_linear_dist_check ( FLA_Obj  shift,
FLA_Obj  delta,
FLA_Obj  x 
)

◆ FLA_Fill_with_logarithmic_dist()

FLA_Error FLA_Fill_with_logarithmic_dist ( FLA_Obj  max,
FLA_Obj  x 
)
14{
15 FLA_Obj lT, l0,
16 lB, lambda1,
17 l2;
18 FLA_Obj l, k, alpha2;
20 dim_t n_x;
21
22
25
28
29 // Create a local counter to increment as we create the distribution.
30 FLA_Obj_create( dt_real, 1, 1, 0, 0, &k );
31
32 // Create a local vector l. We will work with this vector, which is
33 // the same length as x, so that we can use vertical partitioning.
34 FLA_Obj_create( dt_real, n_x, 1, 0, 0, &l );
35
36 // Create a local real scalar alpha2 of the same precision as
37 // alpha. Then copy alpha to alpha2, which will convert the
38 // complex value to real, if necessary (ie: if alpha is complex).
39 FLA_Obj_create( dt_real, 1, 1, 0, 0, &alpha2 );
41
42 // Initialize k to 0.
43 FLA_Set( FLA_ZERO, k );
44
45 FLA_Part_2x1( l, &lT,
46 &lB, 0, FLA_TOP );
47
48 while ( FLA_Obj_length( lB ) > 0 )
49 {
51 /* ** */ /* ******* */
52 &lambda1,
53 lB, &l2, 1, FLA_BOTTOM );
54
55 /*------------------------------------------------------------*/
56
57 // lambda1 = alpha^k;
59
60 // k = k + 1;
62
63 /*------------------------------------------------------------*/
64
66 lambda1,
67 /* ** */ /* ******* */
68 &lB, l2, FLA_TOP );
69 }
70
71 // Normalize by last element.
72 FLA_Part_2x1( l, &lT,
73 &lB, 1, FLA_BOTTOM );
74 FLA_Inv_scal( lB, l );
75
76 // Overwrite x with the distribution we created in l.
77 FLA_Copy( l, x );
78
79 FLA_Obj_free( &l );
80 FLA_Obj_free( &k );
82
83 return FLA_SUCCESS;
84}
FLA_Error FLA_Fill_with_logarithmic_dist_check(FLA_Obj alpha, FLA_Obj x)
Definition FLA_Fill_with_logarithmic_dist_check.c:13

References alpha2, FLA_Check_error_level(), FLA_Cont_with_3x1_to_2x1(), FLA_Copy(), FLA_Fill_with_logarithmic_dist_check(), FLA_Inv_scal(), FLA_Mult_add(), FLA_Obj_create(), FLA_Obj_datatype_proj_to_real(), FLA_Obj_free(), FLA_Obj_length(), FLA_Obj_vector_dim(), FLA_ONE, FLA_Part_2x1(), FLA_Pow(), FLA_Repart_2x1_to_3x1(), FLA_Set(), FLA_ZERO, and i.

◆ FLA_Fill_with_logarithmic_dist_check()

FLA_Error FLA_Fill_with_logarithmic_dist_check ( FLA_Obj  alpha,
FLA_Obj  x 
)

◆ FLA_Fill_with_random_dist()

FLA_Error FLA_Fill_with_random_dist ( FLA_Obj  shift,
FLA_Obj  max,
FLA_Obj  x 
)
14{
15 FLA_Obj r, y;
17 dim_t n_x;
18
21
24
25 FLA_Obj_create( dt_real, n_x, 1, 0, 0, &r );
26 FLA_Obj_create( dt_real, n_x, 1, 0, 0, &y );
27
29
30 FLA_Set( FLA_ONE, y );
31 FLA_Axpy( FLA_ONE, r, y );
33 FLA_Scal( max, y );
34
35 FLA_Set( shift, r );
36 FLA_Axpy( FLA_ONE, y, r );
37
38 // Overwrite x with the distribution we created in l.
39 // If x is complex, then this is where the conversion between
40 // datatypes happens.
41 FLA_Copy( r, x );
42
43 FLA_Obj_free( &r );
44 FLA_Obj_free( &y );
45
46 return FLA_SUCCESS;
47}
FLA_Error FLA_Fill_with_random_dist_check(FLA_Obj shift, FLA_Obj max, FLA_Obj x)
Definition FLA_Fill_with_random_dist_check.c:13
FLA_Error FLA_Axpy(FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
Definition FLA_Axpy.c:15
FLA_Obj FLA_ONE_HALF
Definition FLA_Init.c:19
FLA_Error FLA_Random_matrix(FLA_Obj A)
Definition FLA_Random_matrix.c:13

References FLA_Axpy(), FLA_Check_error_level(), FLA_Copy(), FLA_Fill_with_random_dist_check(), FLA_Obj_create(), FLA_Obj_datatype_proj_to_real(), FLA_Obj_free(), FLA_Obj_vector_dim(), FLA_ONE, FLA_ONE_HALF, FLA_Random_matrix(), FLA_Scal(), FLA_Set(), and i.

Referenced by FLA_Fill_with_cluster_dist().

◆ FLA_Fill_with_random_dist_check()

FLA_Error FLA_Fill_with_random_dist_check ( FLA_Obj  shift,
FLA_Obj  max,
FLA_Obj  x 
)

◆ FLA_Hermitianize()

FLA_Error FLA_Hermitianize ( FLA_Uplo  uplo,
FLA_Obj  A 
)
14{
15 FLA_Datatype datatype;
16 dim_t n_A;
20
23
24 datatype = FLA_Obj_datatype( A );
25
26 n_A = FLA_Obj_width( A );
29
32
33
34 switch ( datatype ){
35
36 case FLA_FLOAT:
37 {
38 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
39
42 n_A,
43 buff_A, rs_A, cs_A );
44
45 break;
46 }
47
48 case FLA_DOUBLE:
49 {
50 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
51
54 n_A,
55 buff_A, rs_A, cs_A );
56
57 break;
58 }
59
60 case FLA_COMPLEX:
61 {
63
66 n_A,
67 buff_A, rs_A, cs_A );
68
69 break;
70 }
71
73 {
75
78 n_A,
79 buff_A, rs_A, cs_A );
80
81 break;
82 }
83
84 }
85
86 return FLA_SUCCESS;
87}
FLA_Error FLA_Hermitianize_check(FLA_Uplo uplo, FLA_Obj A)
Definition FLA_Hermitianize_check.c:13
void FLA_Param_map_flame_to_blis_conj(FLA_Conj conj, conj1_t *blis_conj)
Definition FLA_Param.c:269
void bl1_ssymmize(conj1_t conj, uplo1_t uplo, int m, float *a, int a_rs, int a_cs)
Definition bl1_symmize.c:13
void bl1_dsymmize(conj1_t conj, uplo1_t uplo, int m, double *a, int a_rs, int a_cs)
Definition bl1_symmize.c:124
void bl1_zsymmize(conj1_t conj, uplo1_t uplo, int m, dcomplex *a, int a_rs, int a_cs)
Definition bl1_symmize.c:353
void bl1_csymmize(conj1_t conj, uplo1_t uplo, int m, scomplex *a, int a_rs, int a_cs)
Definition bl1_symmize.c:235
conj1_t
Definition blis_type_defs.h:80

References bl1_csymmize(), bl1_dsymmize(), bl1_ssymmize(), bl1_zsymmize(), FLA_Check_error_level(), FLA_Hermitianize_check(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_Param_map_flame_to_blis_conj(), FLA_Param_map_flame_to_blis_uplo(), and i.

Referenced by FLA_Random_herm_matrix(), and FLASH_Hermitianize().

◆ FLA_Hermitianize_check()

FLA_Error FLA_Hermitianize_check ( FLA_Uplo  uplo,
FLA_Obj  A 
)

◆ FLA_Inv_scal_elemwise()

FLA_Error FLA_Inv_scal_elemwise ( FLA_Trans  trans,
FLA_Obj  A,
FLA_Obj  B 
)
14{
15 FLA_Datatype datatype;
16 int m_B, n_B;
17 int rs_A, cs_A;
18 int rs_B, cs_B;
20
23
24 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
25
26 datatype = FLA_Obj_datatype( A );
27
30
31 m_B = FLA_Obj_length( B );
32 n_B = FLA_Obj_width( B );
35
37
38 switch ( datatype ){
39
40 case FLA_FLOAT:
41 {
42 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
43 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
44
46 m_B,
47 n_B,
49 buff_B, rs_B, cs_B );
50
51 break;
52 }
53
54 case FLA_DOUBLE:
55 {
56 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
57 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
58
60 m_B,
61 n_B,
63 buff_B, rs_B, cs_B );
64
65 break;
66 }
67
68 case FLA_COMPLEX:
69 {
72
74 m_B,
75 n_B,
77 buff_B, rs_B, cs_B );
78
79 break;
80 }
81
83 {
86
88 m_B,
89 n_B,
91 buff_B, rs_B, cs_B );
92
93 break;
94 }
95
96 }
97
98 return FLA_SUCCESS;
99}
FLA_Error FLA_Inv_scal_elemwise_check(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition FLA_Inv_scal_elemwise_check.c:13
void FLA_Param_map_flame_to_blis_trans(FLA_Trans trans, trans1_t *blis_trans)
Definition FLA_Param.c:245
void bl1_zewinvscalmt(trans1_t trans, int m, int n, dcomplex *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
Definition bl1_ewinvscalmt.c:373
void bl1_dewinvscalmt(trans1_t trans, int m, int n, double *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
Definition bl1_ewinvscalmt.c:85
void bl1_sewinvscalmt(trans1_t trans, int m, int n, float *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
Definition bl1_ewinvscalmt.c:13
void bl1_cewinvscalmt(trans1_t trans, int m, int n, scomplex *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
Definition bl1_ewinvscalmt.c:229
trans1_t
Definition blis_type_defs.h:53

References bl1_cewinvscalmt(), bl1_dewinvscalmt(), bl1_sewinvscalmt(), bl1_zewinvscalmt(), FLA_Check_error_level(), FLA_Inv_scal_elemwise_check(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_Param_map_flame_to_blis_trans(), and i.

◆ FLA_Inv_scal_elemwise_check()

FLA_Error FLA_Inv_scal_elemwise_check ( FLA_Trans  trans,
FLA_Obj  A,
FLA_Obj  B 
)
14{
16
19
22
25
28
31
32 return FLA_SUCCESS;
33}
FLA_Error FLA_Check_conformal_dims(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition FLA_Check.c:393
FLA_Error FLA_Check_valid_trans(FLA_Trans trans)
Definition FLA_Check.c:87
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition FLA_Check.c:967

References FLA_Check_conformal_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), and FLA_Check_valid_trans().

Referenced by FLA_Inv_scal_elemwise().

◆ FLA_Invert()

FLA_Error FLA_Invert ( FLA_Conj  conj,
FLA_Obj  x 
)
14{
15 FLA_Datatype datatype;
16 int n_elem;
17 int inc_x;
19
22
23 if ( FLA_Obj_has_zero_dim( x ) ) return FLA_SUCCESS;
24
25 datatype = FLA_Obj_datatype( x );
26
29
31
32
33 switch ( datatype ){
34
35 case FLA_FLOAT:
36 {
37 float *buff_x = ( float * ) FLA_FLOAT_PTR( x );
38
40 n_elem,
41 buff_x, inc_x );
42
43 break;
44 }
45
46 case FLA_DOUBLE:
47 {
48 double *buff_x = ( double * ) FLA_DOUBLE_PTR( x );
49
51 n_elem,
52 buff_x, inc_x );
53
54 break;
55 }
56
57 case FLA_COMPLEX:
58 {
60
62 n_elem,
63 buff_x, inc_x );
64
65 break;
66 }
67
69 {
71
73 n_elem,
74 buff_x, inc_x );
75
76 break;
77 }
78
79 }
80
81 return FLA_SUCCESS;
82}
FLA_Error FLA_Invert_check(FLA_Conj conj, FLA_Obj x)
Definition FLA_Invert_check.c:13
dim_t FLA_Obj_vector_inc(FLA_Obj obj)
Definition FLA_Query.c:145
void bl1_dinvertv(conj1_t conj, int n, double *x, int incx)
Definition bl1_invertv.c:27
void bl1_zinvertv(conj1_t conj, int n, dcomplex *x, int incx)
Definition bl1_invertv.c:67
void bl1_cinvertv(conj1_t conj, int n, scomplex *x, int incx)
Definition bl1_invertv.c:41
void bl1_sinvertv(conj1_t conj, int n, float *x, int incx)
Definition bl1_invertv.c:13

References bl1_cinvertv(), bl1_dinvertv(), bl1_sinvertv(), bl1_zinvertv(), FLA_Check_error_level(), FLA_Invert_check(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_vector_dim(), FLA_Obj_vector_inc(), FLA_Param_map_flame_to_blis_conj(), and i.

Referenced by FLA_Fill_with_inverse_dist(), FLA_Hevd_compute_scaling(), FLA_Svd_compute_scaling(), FLA_Trinv_ln_unb_var1(), FLA_Trinv_ln_unb_var2(), FLA_Trinv_ln_unb_var3(), FLA_Trinv_ln_unb_var4(), FLA_Trinv_un_unb_var1(), FLA_Trinv_un_unb_var2(), FLA_Trinv_un_unb_var3(), and FLA_Trinv_un_unb_var4().

◆ FLA_Invert_check()

FLA_Error FLA_Invert_check ( FLA_Conj  conj,
FLA_Obj  x 
)

◆ FLA_Max_abs_value()

FLA_Error FLA_Max_abs_value ( FLA_Obj  A,
FLA_Obj  amax 
)
14{
15 FLA_Datatype datatype;
17 dim_t m_A, n_A;
19
22
23 datatype = FLA_Obj_datatype( A );
25
26 m_A = FLA_Obj_length( A );
27 n_A = FLA_Obj_width( A );
30
31
32 switch ( datatype ){
33
34 case FLA_FLOAT:
35 {
36 float* buff_A = ( float * ) FLA_FLOAT_PTR( A );
37 float* buff_maxabs = ( float * ) FLA_FLOAT_PTR( maxabs );
38
40 n_A,
43
44 break;
45 }
46
47 case FLA_DOUBLE:
48 {
49 double* buff_A = ( double * ) FLA_DOUBLE_PTR( A );
50 double* buff_maxabs = ( double * ) FLA_DOUBLE_PTR( maxabs );
51
53 n_A,
56
57 break;
58 }
59
60 case FLA_COMPLEX:
61 {
62 if ( dt_maxabs == FLA_FLOAT )
63 {
65 float* buff_maxabs = ( float * ) FLA_FLOAT_PTR( maxabs );
66
68 n_A,
71 }
72 else
73 {
76
78 n_A,
80 &(buff_maxabs->real) );
81
82 buff_maxabs->imag = 0.0;
83 }
84
85 break;
86 }
87
89 {
90 if ( dt_maxabs == FLA_DOUBLE )
91 {
93 double* buff_maxabs = ( double * ) FLA_DOUBLE_PTR( maxabs );
94
96 n_A,
99 }
100 else
101 {
104
106 n_A,
107 buff_A, rs_A, cs_A,
108 &(buff_maxabs->real) );
109
110 buff_maxabs->imag = 0.0;
111 }
112
113 break;
114 }
115
116 }
117
118 return FLA_SUCCESS;
119}
FLA_Error FLA_Max_abs_value_check(FLA_Obj A, FLA_Obj amax)
Definition FLA_Max_abs_value_check.c:13
void bl1_cmaxabsm(int m, int n, scomplex *a, int a_rs, int a_cs, float *maxabs)
Definition bl1_maxabsm.c:103
void bl1_smaxabsm(int m, int n, float *a, int a_rs, int a_cs, float *maxabs)
Definition bl1_maxabsm.c:13
void bl1_dmaxabsm(int m, int n, double *a, int a_rs, int a_cs, double *maxabs)
Definition bl1_maxabsm.c:58
void bl1_zmaxabsm(int m, int n, dcomplex *a, int a_rs, int a_cs, double *maxabs)
Definition bl1_maxabsm.c:148

References bl1_cmaxabsm(), bl1_dmaxabsm(), bl1_smaxabsm(), bl1_zmaxabsm(), FLA_Check_error_level(), FLA_Max_abs_value_check(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), and i.

Referenced by FLA_Norm1(), FLA_Norm_inf(), FLA_Svd_compute_scaling(), and FLA_Svd_ext_u_unb_var1().

◆ FLA_Max_abs_value_check()

FLA_Error FLA_Max_abs_value_check ( FLA_Obj  A,
FLA_Obj  amax 
)

◆ FLA_Max_abs_value_herm()

FLA_Error FLA_Max_abs_value_herm ( FLA_Uplo  uplo,
FLA_Obj  A,
FLA_Obj  maxabs 
)
14{
15 FLA_Datatype datatype;
16 dim_t n_A;
19
22
23 datatype = FLA_Obj_datatype( A );
24
25 n_A = FLA_Obj_width( A );
28
30
31 switch ( datatype ){
32
33 case FLA_FLOAT:
34 {
35 float* buff_A = ( float * ) FLA_FLOAT_PTR( A );
36 float* buff_maxabs = ( float * ) FLA_FLOAT_PTR( maxabs );
37
39 n_A,
40 n_A,
43
44 break;
45 }
46
47 case FLA_DOUBLE:
48 {
49 double* buff_A = ( double * ) FLA_DOUBLE_PTR( A );
50 double* buff_maxabs = ( double * ) FLA_DOUBLE_PTR( maxabs );
51
53 n_A,
54 n_A,
57
58 break;
59 }
60
61 case FLA_COMPLEX:
62 {
64 float *buff_maxabs = ( float * ) FLA_FLOAT_PTR( maxabs );
65
67 n_A,
68 n_A,
71
72 break;
73 }
74
76 {
78 double *buff_maxabs = ( double * ) FLA_DOUBLE_PTR( maxabs );
79
81 n_A,
82 n_A,
85
86 break;
87 }
88
89 }
90
91 return FLA_SUCCESS;
92}
FLA_Error FLA_Max_abs_value_herm_check(FLA_Uplo uplo, FLA_Obj A, FLA_Obj maxabs)
Definition FLA_Max_abs_value_herm_check.c:13
void bl1_cmaxabsmr(uplo1_t uplo, int m, int n, scomplex *a, int a_rs, int a_cs, float *maxabs)
Definition bl1_maxabsmr.c:143
void bl1_zmaxabsmr(uplo1_t uplo, int m, int n, dcomplex *a, int a_rs, int a_cs, double *maxabs)
Definition bl1_maxabsmr.c:208
void bl1_smaxabsmr(uplo1_t uplo, int m, int n, float *a, int a_rs, int a_cs, float *maxabs)
Definition bl1_maxabsmr.c:13
void bl1_dmaxabsmr(uplo1_t uplo, int m, int n, double *a, int a_rs, int a_cs, double *maxabs)
Definition bl1_maxabsmr.c:78

References bl1_cmaxabsmr(), bl1_dmaxabsmr(), bl1_smaxabsmr(), bl1_zmaxabsmr(), FLA_Check_error_level(), FLA_Max_abs_value_herm_check(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_Param_map_flame_to_blis_uplo(), and i.

Referenced by FLA_Hevd_compute_scaling().

◆ FLA_Max_abs_value_herm_check()

FLA_Error FLA_Max_abs_value_herm_check ( FLA_Uplo  uplo,
FLA_Obj  A,
FLA_Obj  maxabs 
)

◆ FLA_Max_elemwise_diff()

double FLA_Max_elemwise_diff ( FLA_Obj  A,
FLA_Obj  B 
)
14{
15 FLA_Datatype datatype;
16 dim_t i, j;
17 dim_t m_A, n_A;
20 double diff;
21 double d_max = 0.0;
22
25
26 datatype = FLA_Obj_datatype( A );
27
28 m_A = FLA_Obj_length( A );
29 n_A = FLA_Obj_width( A );
32
35
36 switch ( datatype ){
37
38 case FLA_FLOAT:
39 {
40 float *buff_a = ( float * ) FLA_FLOAT_PTR( A );
41 float *buff_b = ( float * ) FLA_FLOAT_PTR( B );
42
43 for( j = 0; j < n_A; j++ )
44 {
45 for( i = 0; i < m_A; i++ )
46 {
47 diff = ( double ) ( buff_a[ j*cs_A + i*rs_A ] - buff_b[ j*cs_B + i*rs_B ] );
48
49 if( fabs(diff) > d_max )
50 d_max = fabs(diff);
51 }
52 }
53
54 break;
55 }
56
57 case FLA_DOUBLE:
58 {
59 double *buff_a = ( double * ) FLA_DOUBLE_PTR( A );
60 double *buff_b = ( double * ) FLA_DOUBLE_PTR( B );
61
62 for( j = 0; j < n_A; j++ )
63 {
64 for( i = 0; i < m_A; i++ )
65 {
66 diff = ( double ) ( buff_a[ j*cs_A + i*rs_A ] - buff_b[ j*cs_B + i*rs_B ] );
67
68 if( fabs(diff) > d_max )
69 d_max = fabs(diff);
70 }
71 }
72
73 break;
74 }
75
76 case FLA_COMPLEX:
77 {
80
81 for( j = 0; j < n_A; j++ )
82 {
83 for( i = 0; i < m_A; i++ )
84 {
85 diff = ( double ) ( buff_a[ j*cs_A + i*rs_A ].real - buff_b[ j*cs_B + i*rs_B ].real );
86
87 if( fabs(diff) > d_max )
88 d_max = fabs(diff);
89
90 diff = ( double ) ( buff_a[ j*cs_A + i*rs_A ].imag - buff_b[ j*cs_B + i*rs_B ].imag );
91
92 if( fabs(diff) > d_max )
93 d_max = fabs(diff);
94 }
95 }
96
97 break;
98 }
99
101 {
104
105 for( j = 0; j < n_A; j++ )
106 {
107 for( i = 0; i < m_A; i++ )
108 {
109 diff = ( double ) ( buff_a[ j*cs_A + i*rs_A ].real - buff_b[ j*cs_B + i*rs_B ].real );
110
111 if( fabs(diff) > d_max )
112 d_max = fabs(diff);
113
114 diff = ( double ) ( buff_a[ j*cs_A + i*rs_A ].imag - buff_b[ j*cs_B + i*rs_B ].imag );
115
116 if( fabs(diff) > d_max )
117 d_max = fabs(diff);
118 }
119 }
120
121 break;
122 }
123
124 }
125
126
127 return d_max;
128}
FLA_Error FLA_Max_elemwise_diff_check(FLA_Obj A, FLA_Obj B)
Definition FLA_Max_elemwise_diff_check.c:13
float real
Definition FLA_f2c.h:30
rho_c imag
Definition bl1_axpyv2bdotaxpy.c:483

References FLA_Check_error_level(), FLA_Max_elemwise_diff_check(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), i, and imag.

Referenced by FLASH_Max_elemwise_diff().

◆ FLA_Max_elemwise_diff_check()

FLA_Error FLA_Max_elemwise_diff_check ( FLA_Obj  A,
FLA_Obj  B 
)

◆ FLA_Mult_add()

FLA_Error FLA_Mult_add ( FLA_Obj  alpha,
FLA_Obj  beta,
FLA_Obj  gamma 
)
14{
15 FLA_Datatype datatype;
16
19
20 datatype = FLA_Obj_datatype( gamma );
21
22 switch ( datatype ){
23
24 case FLA_FLOAT:
25 {
26 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
27 float *buff_beta = ( float * ) FLA_FLOAT_PTR( beta );
28 float *buff_gamma = ( float * ) FLA_FLOAT_PTR( gamma );
29
31
32 break;
33 }
34
35 case FLA_DOUBLE:
36 {
37 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
38 double *buff_beta = ( double * ) FLA_DOUBLE_PTR( beta );
39 double *buff_gamma = ( double * ) FLA_DOUBLE_PTR( gamma );
40
42
43 break;
44 }
45
46 case FLA_COMPLEX:
47 {
52
53 alphabeta.real = buff_alpha->real * buff_beta->real -
54 buff_alpha->imag * buff_beta->imag;
55
56 alphabeta.imag = buff_alpha->real * buff_beta->imag +
57 buff_alpha->imag * buff_beta->real;
58
59 buff_gamma->real = buff_gamma->real + alphabeta.real;
60 buff_gamma->imag = buff_gamma->imag + alphabeta.imag;
61
62 break;
63 }
64
66 {
71
72 alphabeta.real = buff_alpha->real * buff_beta->real -
73 buff_alpha->imag * buff_beta->imag;
74
75 alphabeta.imag = buff_alpha->real * buff_beta->imag +
76 buff_alpha->imag * buff_beta->real;
77
78 buff_gamma->real = buff_gamma->real + alphabeta.real;
79 buff_gamma->imag = buff_gamma->imag + alphabeta.imag;
80
81 break;
82 }
83
84 }
85
86 return FLA_SUCCESS;
87}
FLA_Error FLA_Mult_add_check(FLA_Obj alpha, FLA_Obj beta, FLA_Obj gamma)
Definition FLA_Mult_add_check.c:13

References FLA_Check_error_level(), FLA_Mult_add_check(), FLA_Obj_datatype(), i, scomplex::real, and dcomplex::real.

Referenced by FLA_Bidiag_UT_u_step_unb_var3(), FLA_Bidiag_UT_u_step_unb_var4(), FLA_Fill_with_cluster_dist(), FLA_Fill_with_geometric_dist(), FLA_Fill_with_inverse_dist(), FLA_Fill_with_linear_dist(), FLA_Fill_with_logarithmic_dist(), FLA_Lyap_h_unb_var1(), FLA_Lyap_h_unb_var2(), FLA_Lyap_h_unb_var3(), FLA_Lyap_h_unb_var4(), FLA_Lyap_n_unb_var1(), FLA_Lyap_n_unb_var2(), FLA_Lyap_n_unb_var3(), and FLA_Lyap_n_unb_var4().

◆ FLA_Mult_add_check()

FLA_Error FLA_Mult_add_check ( FLA_Obj  alpha,
FLA_Obj  beta,
FLA_Obj  gamma 
)

◆ FLA_Negate()

FLA_Error FLA_Negate ( FLA_Obj  x)
14{
17
18 return FLA_Scal( FLA_MINUS_ONE, x );
19}
FLA_Error FLA_Negate_check(FLA_Obj x)
Definition FLA_Negate_check.c:13

References FLA_Check_error_level(), FLA_MINUS_ONE, FLA_Negate_check(), FLA_Scal(), and i.

◆ FLA_Negate_check()

FLA_Error FLA_Negate_check ( FLA_Obj  x)

◆ FLA_Norm1()

FLA_Error FLA_Norm1 ( FLA_Obj  A,
FLA_Obj  norm 
)
14{
15 FLA_Obj AL, AR, A0, a1, A2;
16
17 FLA_Obj b;
18 FLA_Obj bL, bR, b0, beta1, b2;
19
22
23 FLA_Obj_create( FLA_Obj_datatype( A ), 1, FLA_Obj_width( A ), 0, 0, &b );
24
25 FLA_Part_1x2( A, &AL, &AR, 0, FLA_LEFT );
26
27 FLA_Part_1x2( b, &bL, &bR, 0, FLA_LEFT );
28
29 while ( FLA_Obj_width( AL ) < FLA_Obj_width( A ) ){
30
31 FLA_Repart_1x2_to_1x3( AL, /**/ AR, &A0, /**/ &a1, &A2,
32 1, FLA_RIGHT );
33
34 FLA_Repart_1x2_to_1x3( bL, /**/ bR, &b0, /**/ &beta1, &b2,
35 1, FLA_RIGHT );
36
37 /*------------------------------------------------------------*/
38
39 FLA_Asum( a1, beta1 );
40
41 /*------------------------------------------------------------*/
42
43 FLA_Cont_with_1x3_to_1x2( &AL, /**/ &AR, A0, a1, /**/ A2,
44 FLA_LEFT );
45
46 FLA_Cont_with_1x3_to_1x2( &bL, /**/ &bR, b0, beta1, /**/ b2,
47 FLA_LEFT );
48 }
49
51
52 FLA_Obj_free( &b );
53
54 return FLA_SUCCESS;
55}
FLA_Error FLA_Norm1_check(FLA_Obj A, FLA_Obj norm)
Definition FLA_Norm1_check.c:13
FLA_Error FLA_Asum(FLA_Obj x, FLA_Obj asum_x)
Definition FLA_Asum.c:13
FLA_Error FLA_Cont_with_1x3_to_1x2(FLA_Obj *AL, FLA_Obj *AR, FLA_Obj A0, FLA_Obj A1, FLA_Obj A2, FLA_Side side)
Definition FLA_View.c:475
FLA_Error FLA_Part_1x2(FLA_Obj A, FLA_Obj *A1, FLA_Obj *A2, dim_t nb, FLA_Side side)
Definition FLA_View.c:110
FLA_Error FLA_Repart_1x2_to_1x3(FLA_Obj AL, FLA_Obj AR, FLA_Obj *A0, FLA_Obj *A1, FLA_Obj *A2, dim_t nb, FLA_Side side)
Definition FLA_View.c:267
FLA_Error FLA_Max_abs_value(FLA_Obj A, FLA_Obj amax)
Definition FLA_Max_abs_value.c:13

References FLA_Asum(), FLA_Check_error_level(), FLA_Cont_with_1x3_to_1x2(), FLA_Max_abs_value(), FLA_Norm1_check(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_width(), FLA_Part_1x2(), FLA_Repart_1x2_to_1x3(), and i.

Referenced by FLASH_Norm1().

◆ FLA_Norm1_check()

FLA_Error FLA_Norm1_check ( FLA_Obj  A,
FLA_Obj  norm 
)

◆ FLA_Norm_frob()

FLA_Error FLA_Norm_frob ( FLA_Obj  A,
FLA_Obj  norm 
)
14{
15 FLA_Datatype datatype;
16 int m_A, n_A;
17 int rs_A, cs_A;
18
21
22 datatype = FLA_Obj_datatype( A );
23
24 m_A = FLA_Obj_length( A );
25 n_A = FLA_Obj_width( A );
28
29
30 switch ( datatype ){
31
32 case FLA_FLOAT:
33 {
34 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
35 float *buff_norm = ( float * ) FLA_FLOAT_PTR( norm );
36
38 n_A,
40 buff_norm );
41
42 break;
43 }
44
45 case FLA_DOUBLE:
46 {
47 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
48 double *buff_norm = ( double * ) FLA_DOUBLE_PTR( norm );
49
51 n_A,
53 buff_norm );
54
55 break;
56 }
57
58 case FLA_COMPLEX:
59 {
61 float *buff_norm = ( float * ) FLA_FLOAT_PTR( norm );
62
64 n_A,
66 buff_norm );
67
68 break;
69 }
70
72 {
74 double *buff_norm = ( double * ) FLA_DOUBLE_PTR( norm );
75
77 n_A,
79 buff_norm );
80
81 break;
82 }
83
84 }
85
86 return FLA_SUCCESS;
87}
FLA_Error FLA_Norm_frob_check(FLA_Obj A, FLA_Obj norm)
Definition FLA_Norm_frob_check.c:13
void bl1_cfnorm(int m, int n, scomplex *a, int a_rs, int a_cs, float *norm)
Definition bl1_fnorm.c:121
void bl1_dfnorm(int m, int n, double *a, int a_rs, int a_cs, double *norm)
Definition bl1_fnorm.c:67
void bl1_sfnorm(int m, int n, float *a, int a_rs, int a_cs, float *norm)
Definition bl1_fnorm.c:13
void bl1_zfnorm(int m, int n, dcomplex *a, int a_rs, int a_cs, double *norm)
Definition bl1_fnorm.c:175

References bl1_cfnorm(), bl1_dfnorm(), bl1_sfnorm(), bl1_zfnorm(), FLA_Check_error_level(), FLA_Norm_frob_check(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), and i.

◆ FLA_Norm_frob_check()

FLA_Error FLA_Norm_frob_check ( FLA_Obj  A,
FLA_Obj  norm 
)

◆ FLA_Norm_inf()

FLA_Error FLA_Norm_inf ( FLA_Obj  A,
FLA_Obj  norm 
)
14{
15 FLA_Obj AT, A0,
16 AB, a1t,
17 A2;
18
19 FLA_Obj bT, b0,
20 bB, beta1,
21 b2;
22 FLA_Obj b;
23
26
28
29 FLA_Part_2x1( A, &AT,
30 &AB, 0, FLA_TOP );
31
32 FLA_Part_2x1( b, &bT,
33 &bB, 0, FLA_TOP );
34
35 while ( FLA_Obj_length( AT ) < FLA_Obj_length( A ) ){
36
38 /* ** */ /* *** */
39 &a1t,
40 AB, &A2, 1, FLA_BOTTOM );
41
43 /* ** */ /* ***** */
44 &beta1,
45 bB, &b2, 1, FLA_BOTTOM );
46
47 /*------------------------------------------------------------*/
48
49 FLA_Asum( a1t, beta1 );
50
51 /*------------------------------------------------------------*/
52
54 a1t,
55 /* ** */ /* *** */
56 &AB, A2, FLA_TOP );
57
59 beta1,
60 /* ** */ /* ***** */
61 &bB, b2, FLA_TOP );
62
63 }
64
66
67 FLA_Obj_free( &b );
68
69 return FLA_SUCCESS;
70}
FLA_Error FLA_Norm_inf_check(FLA_Obj A, FLA_Obj norm)
Definition FLA_Norm_inf_check.c:13

References FLA_Asum(), FLA_Check_error_level(), FLA_Cont_with_3x1_to_2x1(), FLA_Max_abs_value(), FLA_Norm_inf_check(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_length(), FLA_Part_2x1(), FLA_Repart_2x1_to_3x1(), and i.

◆ FLA_Norm_inf_check()

FLA_Error FLA_Norm_inf_check ( FLA_Obj  A,
FLA_Obj  norm 
)

◆ FLA_Pow()

FLA_Error FLA_Pow ( FLA_Obj  base,
FLA_Obj  exp,
FLA_Obj  btoe 
)
14{
15 FLA_Datatype datatype;
16 int r_val = FLA_SUCCESS;
17
19 FLA_Pow_check( base, exp, btoe );
20
21 datatype = FLA_Obj_datatype( base );
22
23 switch ( datatype ){
24
25 case FLA_FLOAT:
26 {
27 float *buff_base = ( float * ) FLA_FLOAT_PTR( base );
28 float *buff_exp = ( float * ) FLA_FLOAT_PTR( exp );
29 float *buff_btoe = ( float * ) FLA_FLOAT_PTR( btoe );
30
32
33 break;
34 }
35
36 case FLA_DOUBLE:
37 {
38 double *buff_base = ( double * ) FLA_DOUBLE_PTR( base );
39 double *buff_exp = ( double * ) FLA_DOUBLE_PTR( exp );
40 double *buff_btoe = ( double * ) FLA_DOUBLE_PTR( btoe );
41
43
44 break;
45 }
46
47 case FLA_COMPLEX:
48 {
52
53 buff_btoe->real = ( float ) pow( buff_base->real, buff_exp->real );
54 buff_btoe->imag = 0.0;
55
56 break;
57 }
58
60 {
64
65 buff_btoe->real = ( double ) pow( buff_base->real, buff_exp->real );
66 buff_btoe->imag = 0.0;
67
68 break;
69 }
70
71 }
72
73 return r_val;
74}
FLA_Error FLA_Pow_check(FLA_Obj base, FLA_Obj exp, FLA_Obj btoe)
Definition FLA_Pow.c:13

References FLA_Check_error_level(), FLA_Obj_datatype(), FLA_Pow_check(), i, scomplex::real, and dcomplex::real.

Referenced by FLA_Fill_with_geometric_dist(), and FLA_Fill_with_logarithmic_dist().

◆ FLA_Pow_check()

FLA_Error FLA_Pow_check ( FLA_Obj  base,
FLA_Obj  exp,
FLA_Obj  btoe 
)

◆ FLA_random_dcomplex()

dcomplex FLA_random_dcomplex ( void  )
34{
35 dcomplex z;
36
39
40 return z;
41}
double FLA_random_double()
Definition FLA_random_number.c:18
double imag
Definition blis_type_defs.h:139

References FLA_random_double(), dcomplex::imag, and dcomplex::real.

◆ FLA_random_double()

double FLA_random_double ( void  )
19{
20 return ( ( double ) rand() / ( double ) RAND_MAX ) * 2.0 - 1.0;
21}

References i.

Referenced by FLA_random_dcomplex().

◆ FLA_random_float()

float FLA_random_float ( void  )
14{
15 return ( float )( ( ( double ) rand() / ( double ) RAND_MAX ) * 2.0 - 1.0 );
16}

References i.

Referenced by FLA_random_scomplex().

◆ FLA_Random_herm_matrix()

FLA_Error FLA_Random_herm_matrix ( FLA_Uplo  uplo,
FLA_Obj  A 
)
14{
17
19
20 FLA_Hermitianize( uplo, A );
21
22 return FLA_SUCCESS;
23}
FLA_Error FLA_Random_herm_matrix_check(FLA_Uplo uplo, FLA_Obj A)
Definition FLA_Random_herm_matrix_check.c:13
FLA_Error FLA_Random_tri_matrix(FLA_Uplo uplo, FLA_Diag diag, FLA_Obj A)
Definition FLA_Random_tri_matrix.c:13
FLA_Error FLA_Hermitianize(FLA_Uplo uplo, FLA_Obj A)
Definition FLA_Hermitianize.c:13

References FLA_Check_error_level(), FLA_Hermitianize(), FLA_Random_herm_matrix_check(), FLA_Random_tri_matrix(), and i.

◆ FLA_Random_herm_matrix_check()

FLA_Error FLA_Random_herm_matrix_check ( FLA_Uplo  uplo,
FLA_Obj  A 
)

◆ FLA_Random_matrix()

FLA_Error FLA_Random_matrix ( FLA_Obj  A)
14{
15 FLA_Datatype datatype;
16 int m_A, n_A;
17 int rs_A, cs_A;
18
21
22 datatype = FLA_Obj_datatype( A );
23
24 m_A = FLA_Obj_length( A );
25 n_A = FLA_Obj_width( A );
28
29
30 switch( datatype ){
31
32 case FLA_FLOAT:
33 {
34 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
35
37 n_A,
38 buff_A, rs_A, cs_A );
39
40 break;
41 }
42
43 case FLA_DOUBLE:
44 {
45 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
46
48 n_A,
49 buff_A, rs_A, cs_A );
50
51 break;
52 }
53
54 case FLA_COMPLEX:
55 {
57
59 n_A,
60 buff_A, rs_A, cs_A );
61
62 break;
63 }
64
66 {
68
70 n_A,
71 buff_A, rs_A, cs_A );
72
73 break;
74 }
75
76 }
77
78 return FLA_SUCCESS;
79}
FLA_Error FLA_Random_matrix_check(FLA_Obj A)
Definition FLA_Random_matrix_check.c:13
void bl1_srandm(int m, int n, float *a, int a_rs, int a_cs)
Definition bl1_randm.c:13
void bl1_zrandm(int m, int n, dcomplex *a, int a_rs, int a_cs)
Definition bl1_randm.c:115
void bl1_crandm(int m, int n, scomplex *a, int a_rs, int a_cs)
Definition bl1_randm.c:81
void bl1_drandm(int m, int n, double *a, int a_rs, int a_cs)
Definition bl1_randm.c:47

References bl1_crandm(), bl1_drandm(), bl1_srandm(), bl1_zrandm(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_Random_matrix_check(), and i.

Referenced by FLA_Fill_with_random_dist(), FLA_Random_unitary_matrix(), and FLASH_Random_matrix().

◆ FLA_Random_matrix_check()

FLA_Error FLA_Random_matrix_check ( FLA_Obj  A)

◆ FLA_random_scomplex()

scomplex FLA_random_scomplex ( void  )
24{
25 scomplex z;
26
29
30 return z;
31}
float FLA_random_float()
Definition FLA_random_number.c:13
float imag
Definition blis_type_defs.h:134

References FLA_random_float(), scomplex::imag, and scomplex::real.

◆ FLA_Random_spd_matrix()

FLA_Error FLA_Random_spd_matrix ( FLA_Uplo  uplo,
FLA_Obj  A 
)
14{
15 FLA_Obj R;
16
19
20 // Create a temporary object R conformal to A.
22
23 // Randomize R to be an uplo-triangular matrix. Note that the diagonal of R
24 // needs to be positive to ensure that R * R' is SPD/HPD.
26
27 if ( uplo == FLA_LOWER_TRIANGULAR )
28 {
29 // A = R * R';
31 }
32 else // if ( uplo == FLA_UPPER_TRIANGULAR )
33 {
34 // A = R' * R;
36 }
37
38 // Free R.
39 FLA_Obj_free( &R );
40
41 return FLA_SUCCESS;
42}
FLA_Error FLA_Random_spd_matrix_check(FLA_Uplo uplo, FLA_Obj A)
Definition FLA_Random_spd_matrix_check.c:13
FLA_Error FLA_Herk_external(FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj beta, FLA_Obj C)
Definition FLA_Herk_external.c:13
FLA_Error FLA_Obj_create_conf_to(FLA_Trans trans, FLA_Obj old, FLA_Obj *obj)
Definition FLA_Obj.c:286

References FLA_Check_error_level(), FLA_Herk_external(), FLA_Obj_create_conf_to(), FLA_Obj_free(), FLA_ONE, FLA_Random_spd_matrix_check(), FLA_Random_tri_matrix(), FLA_ZERO, and i.

Referenced by FLASH_Random_spd_matrix().

◆ FLA_Random_spd_matrix_check()

FLA_Error FLA_Random_spd_matrix_check ( FLA_Uplo  uplo,
FLA_Obj  A 
)

◆ FLA_Random_symm_matrix()

FLA_Error FLA_Random_symm_matrix ( FLA_Uplo  uplo,
FLA_Obj  A 
)
14{
17
19
20 FLA_Symmetrize( uplo, A );
21
22 return FLA_SUCCESS;
23}
FLA_Error FLA_Random_symm_matrix_check(FLA_Uplo uplo, FLA_Obj A)
Definition FLA_Random_symm_matrix_check.c:13
FLA_Error FLA_Symmetrize(FLA_Uplo uplo, FLA_Obj A)
Definition FLA_Symmetrize.c:13

References FLA_Check_error_level(), FLA_Random_symm_matrix_check(), FLA_Random_tri_matrix(), FLA_Symmetrize(), and i.

◆ FLA_Random_symm_matrix_check()

FLA_Error FLA_Random_symm_matrix_check ( FLA_Uplo  uplo,
FLA_Obj  A 
)

◆ FLA_Random_tri_matrix()

FLA_Error FLA_Random_tri_matrix ( FLA_Uplo  uplo,
FLA_Diag  diag,
FLA_Obj  A 
)
14{
15 FLA_Datatype datatype;
16 int m_A, n_A;
17 int rs_A, cs_A;
20
23
24 datatype = FLA_Obj_datatype( A );
25
26 m_A = FLA_Obj_length( A );
27 n_A = FLA_Obj_width( A );
30
33
34
35 switch( datatype ){
36
37 case FLA_FLOAT:
38 {
39 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
40
43 m_A,
44 n_A,
45 buff_A, rs_A, cs_A );
46
47 break;
48 }
49
50 case FLA_DOUBLE:
51 {
52 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
53
56 m_A,
57 n_A,
58 buff_A, rs_A, cs_A );
59
60 break;
61 }
62
63 case FLA_COMPLEX:
64 {
66
69 m_A,
70 n_A,
71 buff_A, rs_A, cs_A );
72
73 break;
74 }
75
77 {
79
82 m_A,
83 n_A,
84 buff_A, rs_A, cs_A );
85
86 break;
87 }
88
89 }
90
91 return FLA_SUCCESS;
92}
FLA_Error FLA_Random_tri_matrix_check(FLA_Uplo uplo, FLA_Diag diag, FLA_Obj A)
Definition FLA_Random_tri_matrix_check.c:13
void FLA_Param_map_flame_to_blis_diag(FLA_Diag diag, diag1_t *blis_diag)
Definition FLA_Param.c:317
void bl1_zrandmr(uplo1_t uplo, diag1_t diag, int m, int n, dcomplex *a, int a_rs, int a_cs)
Definition bl1_randmr.c:377
void bl1_crandmr(uplo1_t uplo, diag1_t diag, int m, int n, scomplex *a, int a_rs, int a_cs)
Definition bl1_randmr.c:255
void bl1_srandmr(uplo1_t uplo, diag1_t diag, int m, int n, float *a, int a_rs, int a_cs)
Definition bl1_randmr.c:13
void bl1_drandmr(uplo1_t uplo, diag1_t diag, int m, int n, double *a, int a_rs, int a_cs)
Definition bl1_randmr.c:134
diag1_t
Definition blis_type_defs.h:73

References bl1_crandmr(), bl1_drandmr(), bl1_srandmr(), bl1_zrandmr(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_Param_map_flame_to_blis_diag(), FLA_Param_map_flame_to_blis_uplo(), FLA_Random_tri_matrix_check(), and i.

Referenced by FLA_Random_herm_matrix(), FLA_Random_spd_matrix(), and FLA_Random_symm_matrix().

◆ FLA_Random_tri_matrix_check()

FLA_Error FLA_Random_tri_matrix_check ( FLA_Uplo  uplo,
FLA_Diag  diag,
FLA_Obj  A 
)

◆ FLA_Random_unitary_matrix()

FLA_Error FLA_Random_unitary_matrix ( FLA_Obj  A)
14{
15 FLA_Obj B, T;
16
19
21
23
25
26 FLA_QR_UT( B, T );
27
28 FLA_QR_UT_form_Q( B, T, A );
29 //FLA_Apply_Q_UT_create_workspace( A, T, &W );
30 //FLA_Apply_Q_UT( FLA_LEFT, FLA_NO_TRANSPOSE, FLA_FORWARD, FLA_COLUMNWISE, B, T, W, A );
31
32 //FLA_Obj_free( &W );
33 FLA_Obj_free( &T );
34 FLA_Obj_free( &B );
35
36/*
37 FLA_Datatype datatype;
38 FLA_Obj v, tau;
39 FLA_Obj aT,
40 AB;
41 int i, mn;
42 int k;
43
44 datatype = FLA_Obj_datatype( A );
45 mn = FLA_Obj_length( A );
46 k = 1;
47
48 FLA_Obj_create( datatype, mn-1, 1, 0, 0, &v );
49 FLA_Obj_create( datatype, 1, 1, 0, 0, &tau );
50
51 FLA_Obj_set_to_identity( A );
52
53 FLA_Part_2x1( A, &aT,
54 &AB, 1, FLA_TOP );
55
56 for ( i = 0; i < k; ++i )
57 {
58 FLA_Random_matrix( tau );
59 FLA_Random_matrix( v );
60
61 FLA_Apply_H2_UT( FLA_LEFT, tau, v, aT,
62 AB );
63 }
64
65 FLA_Obj_free( &tau );
66 FLA_Obj_free( &v );
67*/
68
69 return FLA_SUCCESS;
70}
FLA_Error FLA_QR_UT_form_Q(FLA_Obj A, FLA_Obj T, FLA_Obj Q)
Definition FLA_QR_UT_form_Q.c:13
FLA_Error FLA_QR_UT_create_T(FLA_Obj A, FLA_Obj *T)
Definition FLA_QR_UT_create_T.c:13
FLA_Error FLA_Random_unitary_matrix_check(FLA_Obj A)
Definition FLA_Random_unitary_matrix_check.c:13
FLA_Error FLA_QR_UT(FLA_Obj A, FLA_Obj T)
Definition FLA_QR_UT.c:15

References FLA_Check_error_level(), FLA_Obj_create_conf_to(), FLA_Obj_free(), FLA_QR_UT(), FLA_QR_UT_create_T(), FLA_QR_UT_form_Q(), FLA_Random_matrix(), FLA_Random_unitary_matrix_check(), and i.

◆ FLA_Random_unitary_matrix_check()

FLA_Error FLA_Random_unitary_matrix_check ( FLA_Obj  A)

◆ FLA_Scal_elemwise()

FLA_Error FLA_Scal_elemwise ( FLA_Trans  trans,
FLA_Obj  A,
FLA_Obj  B 
)
14{
15 FLA_Datatype datatype;
16 int m_B, n_B;
17 int rs_A, cs_A;
18 int rs_B, cs_B;
20
23
24 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
25
26 datatype = FLA_Obj_datatype( A );
27
30
31 m_B = FLA_Obj_length( B );
32 n_B = FLA_Obj_width( B );
35
37
38 switch ( datatype ){
39
40 case FLA_FLOAT:
41 {
42 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
43 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
44
46 m_B,
47 n_B,
49 buff_B, rs_B, cs_B );
50
51 break;
52 }
53
54 case FLA_DOUBLE:
55 {
56 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
57 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
58
60 m_B,
61 n_B,
63 buff_B, rs_B, cs_B );
64
65 break;
66 }
67
68 case FLA_COMPLEX:
69 {
72
74 m_B,
75 n_B,
77 buff_B, rs_B, cs_B );
78
79 break;
80 }
81
83 {
86
88 m_B,
89 n_B,
91 buff_B, rs_B, cs_B );
92
93 break;
94 }
95
96 }
97
98 return FLA_SUCCESS;
99}
FLA_Error FLA_Scal_elemwise_check(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition FLA_Scal_elemwise_check.c:13
void bl1_cewscalmt(trans1_t trans, int m, int n, scomplex *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
Definition bl1_ewscalmt.c:229
void bl1_dewscalmt(trans1_t trans, int m, int n, double *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
Definition bl1_ewscalmt.c:85
void bl1_zewscalmt(trans1_t trans, int m, int n, dcomplex *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
Definition bl1_ewscalmt.c:373
void bl1_sewscalmt(trans1_t trans, int m, int n, float *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
Definition bl1_ewscalmt.c:13

References bl1_cewscalmt(), bl1_dewscalmt(), bl1_sewscalmt(), bl1_zewscalmt(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_Param_map_flame_to_blis_trans(), FLA_Scal_elemwise_check(), and i.

◆ FLA_Scal_elemwise_check()

FLA_Error FLA_Scal_elemwise_check ( FLA_Trans  trans,
FLA_Obj  A,
FLA_Obj  B 
)

◆ FLA_Scale_diag()

FLA_Error FLA_Scale_diag ( FLA_Conj  conj,
FLA_Obj  alpha,
FLA_Obj  A 
)
14{
17 dim_t m_A, n_A;
20
23
26 m_A = FLA_Obj_length( A );
27 n_A = FLA_Obj_width( A );
30
32
33 switch( datatype_A ){
34
35 case FLA_FLOAT:
36 {
37 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
38 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
39
41 0,
42 m_A,
43 n_A,
45 buff_A, rs_A, cs_A );
46
47 break;
48 }
49 case FLA_DOUBLE:
50 {
51 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
52 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
53
55 0,
56 m_A,
57 n_A,
59 buff_A, rs_A, cs_A );
60
61 break;
62 }
63
64 case FLA_COMPLEX:
65 {
67 {
70
72 0,
73 m_A,
74 n_A,
76 buff_A, rs_A, cs_A );
77 }
78 else
79 {
81 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
82
84 0,
85 m_A,
86 n_A,
88 buff_A, rs_A, cs_A );
89 }
90
91 break;
92 }
93
95 {
97 {
100
102 0,
103 m_A,
104 n_A,
106 buff_A, rs_A, cs_A );
107 }
108 else
109 {
111 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
112
114 0,
115 m_A,
116 n_A,
118 buff_A, rs_A, cs_A );
119 }
120
121 break;
122 }
123
124 }
125
126 return FLA_SUCCESS;
127}
FLA_Error FLA_Scale_diag_check(FLA_Conj conj, FLA_Obj alpha, FLA_Obj A)
Definition FLA_Scale_diag_check.c:13
void bl1_zdscalediag(conj1_t conj, int offset, int m, int n, double *sigma, dcomplex *a, int a_rs, int a_cs)
Definition bl1_scalediag.c:77
void bl1_cscalediag(conj1_t conj, int offset, int m, int n, scomplex *sigma, scomplex *a, int a_rs, int a_cs)
Definition bl1_scalediag.c:99
void bl1_dscalediag(conj1_t conj, int offset, int m, int n, double *sigma, double *a, int a_rs, int a_cs)
Definition bl1_scalediag.c:34
void bl1_csscalediag(conj1_t conj, int offset, int m, int n, float *sigma, scomplex *a, int a_rs, int a_cs)
Definition bl1_scalediag.c:55
void bl1_zscalediag(conj1_t conj, int offset, int m, int n, dcomplex *sigma, dcomplex *a, int a_rs, int a_cs)
Definition bl1_scalediag.c:123
void bl1_sscalediag(conj1_t conj, int offset, int m, int n, float *sigma, float *a, int a_rs, int a_cs)
Definition bl1_scalediag.c:13

References bl1_cscalediag(), bl1_csscalediag(), bl1_dscalediag(), bl1_sscalediag(), bl1_zdscalediag(), bl1_zscalediag(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_Param_map_flame_to_blis_conj(), FLA_Scale_diag_check(), and i.

Referenced by FLA_UDdate_UT_unb_var1().

◆ FLA_Scale_diag_check()

FLA_Error FLA_Scale_diag_check ( FLA_Conj  conj,
FLA_Obj  alpha,
FLA_Obj  A 
)

◆ FLA_Set()

FLA_Error FLA_Set ( FLA_Obj  alpha,
FLA_Obj  A 
)
14{
15 FLA_Datatype datatype;
16 dim_t m_A, n_A;
18
21
22 datatype = FLA_Obj_datatype( A );
23 m_A = FLA_Obj_length( A );
24 n_A = FLA_Obj_width( A );
27
28 switch ( datatype ){
29
30 case FLA_INT:
31 {
32 int *buff_A = ( int * ) FLA_INT_PTR( A );
33 int *buff_alpha = ( int * ) FLA_INT_PTR( alpha );
34
36 n_A,
38 buff_A, rs_A, cs_A );
39
40 break;
41 }
42
43 case FLA_FLOAT:
44 {
45 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
46 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
47
49 n_A,
51 buff_A, rs_A, cs_A );
52
53 break;
54 }
55
56 case FLA_DOUBLE:
57 {
58 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
59 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
60
62 n_A,
64 buff_A, rs_A, cs_A );
65
66 break;
67 }
68
69 case FLA_COMPLEX:
70 {
73
75 n_A,
77 buff_A, rs_A, cs_A );
78
79 break;
80 }
81
83 {
86
88 n_A,
90 buff_A, rs_A, cs_A );
91
92 break;
93 }
94
95 }
96
97 return FLA_SUCCESS;
98}
FLA_Error FLA_Set_check(FLA_Obj alpha, FLA_Obj A)
Definition FLA_Set_check.c:13
void bl1_dsetm(int m, int n, double *sigma, double *a, int a_rs, int a_cs)
Definition bl1_setm.c:45
void bl1_isetm(int m, int n, int *sigma, int *a, int a_rs, int a_cs)
Definition bl1_setm.c:13
void bl1_ssetm(int m, int n, float *sigma, float *a, int a_rs, int a_cs)
Definition bl1_setm.c:29
void bl1_csetm(int m, int n, scomplex *sigma, scomplex *a, int a_rs, int a_cs)
Definition bl1_setm.c:61
void bl1_zsetm(int m, int n, dcomplex *sigma, dcomplex *a, int a_rs, int a_cs)
Definition bl1_setm.c:78

References bl1_csetm(), bl1_dsetm(), bl1_isetm(), bl1_ssetm(), bl1_zsetm(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_Set_check(), and i.

Referenced by FLA_Asum_external(), FLA_Bidiag_UT_form_U_ext(), FLA_Bidiag_UT_form_V_ext(), FLA_Bidiag_UT_l_realify_unb(), FLA_Bidiag_UT_realify(), FLA_Bidiag_UT_u_blf_var4(), FLA_Bidiag_UT_u_blk_var4(), FLA_Bidiag_UT_u_blk_var5(), FLA_Bidiag_UT_u_realify_unb(), FLA_Bidiag_UT_u_step_unb_var1(), FLA_Bidiag_UT_u_step_unb_var2(), FLA_Bidiag_UT_u_step_unb_var4(), FLA_Bidiag_UT_u_step_unb_var5(), FLA_Fill_with_cluster_dist(), FLA_Fill_with_geometric_dist(), FLA_Fill_with_inverse_dist(), FLA_Fill_with_linear_dist(), FLA_Fill_with_logarithmic_dist(), FLA_Fill_with_random_dist(), FLA_Hess_UT_blf_var2(), FLA_Hess_UT_blf_var3(), FLA_Hess_UT_blf_var4(), FLA_Hess_UT_blk_var1(), FLA_Hess_UT_blk_var2(), FLA_Hess_UT_blk_var3(), FLA_Hess_UT_blk_var4(), FLA_Hess_UT_step_unb_var1(), FLA_Hess_UT_step_unb_var2(), FLA_Hess_UT_step_unb_var3(), FLA_Hess_UT_step_unb_var4(), FLA_Hess_UT_step_unb_var5(), FLA_Hevd_lv_unb_var1(), FLA_Hevd_lv_unb_var2(), FLA_LQ_UT_solve(), FLA_Nrm2_external(), FLA_Obj_create_buffer_task(), FLA_QR_UT_piv(), FLA_QR_UT_piv_unb_var1(), FLA_QR_UT_piv_unb_var2(), FLA_Scal_external(), FLA_Scalc_external(), FLA_Set_to_identity(), FLA_Sylv_unb_external(), FLA_Tridiag_UT_form_Q(), FLA_Tridiag_UT_l_blf_var3(), FLA_Tridiag_UT_l_blk_var3(), FLA_Tridiag_UT_l_realify_unb(), FLA_Tridiag_UT_l_step_unb_var1(), FLA_Tridiag_UT_l_step_unb_var2(), FLA_Tridiag_UT_l_step_unb_var3(), FLA_Tridiag_UT_realify(), FLA_Tridiag_UT_u_realify_unb(), FLASH_Norm1(), and FLASH_Set().

◆ FLA_Set_check()

FLA_Error FLA_Set_check ( FLA_Obj  alpha,
FLA_Obj  A 
)

◆ FLA_Set_diag()

FLA_Error FLA_Set_diag ( FLA_Obj  alpha,
FLA_Obj  A 
)
14{
15 FLA_Datatype datatype;
16 int m_A, n_A;
17 int rs_A, cs_A;
18
21
22 datatype = FLA_Obj_datatype( A );
23 m_A = FLA_Obj_length( A );
24 n_A = FLA_Obj_width( A );
27
28 switch ( datatype ){
29
30 case FLA_INT:
31 {
32 int *buff_A = ( int * ) FLA_INT_PTR( A );
33 int *buff_alpha = ( int * ) FLA_INT_PTR( alpha );
34
35 bl1_isetdiag( 0,
36 m_A,
37 n_A,
39 buff_A, rs_A, cs_A );
40
41 break;
42 }
43
44 case FLA_FLOAT:
45 {
46 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
47 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
48
49 bl1_ssetdiag( 0,
50 m_A,
51 n_A,
53 buff_A, rs_A, cs_A );
54
55 break;
56 }
57
58 case FLA_DOUBLE:
59 {
60 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
61 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
62
63 bl1_dsetdiag( 0,
64 m_A,
65 n_A,
67 buff_A, rs_A, cs_A );
68
69 break;
70 }
71
72 case FLA_COMPLEX:
73 {
76
77 bl1_csetdiag( 0,
78 m_A,
79 n_A,
81 buff_A, rs_A, cs_A );
82
83 break;
84 }
85
87 {
90
91 bl1_zsetdiag( 0,
92 m_A,
93 n_A,
95 buff_A, rs_A, cs_A );
96
97 break;
98 }
99
100 }
101
102 return FLA_SUCCESS;
103}
FLA_Error FLA_Set_diag_check(FLA_Obj alpha, FLA_Obj A)
Definition FLA_Set_diag_check.c:13
void bl1_zsetdiag(int offset, int m, int n, dcomplex *sigma, dcomplex *a, int a_rs, int a_cs)
Definition bl1_setdiag.c:98
void bl1_isetdiag(int offset, int m, int n, int *sigma, int *a, int a_rs, int a_cs)
Definition bl1_setdiag.c:13
void bl1_csetdiag(int offset, int m, int n, scomplex *sigma, scomplex *a, int a_rs, int a_cs)
Definition bl1_setdiag.c:76
void bl1_dsetdiag(int offset, int m, int n, double *sigma, double *a, int a_rs, int a_cs)
Definition bl1_setdiag.c:55
void bl1_ssetdiag(int offset, int m, int n, float *sigma, float *a, int a_rs, int a_cs)
Definition bl1_setdiag.c:34

References bl1_csetdiag(), bl1_dsetdiag(), bl1_isetdiag(), bl1_ssetdiag(), bl1_zsetdiag(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_Set_diag_check(), and i.

Referenced by FLA_QR_UT_form_Q(), and FLA_Set_to_identity().

◆ FLA_Set_diag_check()

FLA_Error FLA_Set_diag_check ( FLA_Obj  alpha,
FLA_Obj  A 
)

◆ FLA_Set_diagonal_matrix()

FLA_Error FLA_Set_diagonal_matrix ( FLA_Obj  d,
FLA_Obj  A 
)
72{
73 FLA_Datatype datatype;
74 int i, m;
75 int rs_A, cs_A;
76 int inc_d;
77
78 datatype = FLA_Obj_datatype( A );
79
80 m = FLA_Obj_min_dim( A );
81
84
86
87 switch ( datatype )
88 {
89 case FLA_FLOAT:
90 {
92 break;
93 }
94 case FLA_DOUBLE:
95 {
97 break;
98 }
99
100 case FLA_COMPLEX:
101 {
103 break;
104 }
105
107 {
109 break;
110 }
111 }
112 return FLA_SUCCESS;
113}

References FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_min_dim(), FLA_Obj_row_stride(), FLA_Obj_vector_inc(), and i.

◆ FLA_Set_diagonal_vector()

FLA_Error FLA_Set_diagonal_vector ( FLA_Obj  A,
FLA_Obj  d 
)
28{
29 FLA_Datatype datatype;
30 int i, m;
31 int rs_A, cs_A;
32 int inc_d;
33
34 datatype = FLA_Obj_datatype( A );
35
36 m = FLA_Obj_min_dim( A );
37
40
42
43 switch ( datatype )
44 {
45 case FLA_FLOAT:
46 {
48 break;
49 }
50 case FLA_DOUBLE:
51 {
53 break;
54 }
55
56 case FLA_COMPLEX:
57 {
59 break;
60 }
61
63 {
65 break;
66 }
67 }
68 return FLA_SUCCESS;
69}

References FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_min_dim(), FLA_Obj_row_stride(), FLA_Obj_vector_inc(), and i.

◆ FLA_Set_offdiag()

FLA_Error FLA_Set_offdiag ( int  offset,
FLA_Obj  alpha,
FLA_Obj  A 
)
14{
15 FLA_Datatype datatype;
16 int m_A, n_A;
17 int rs_A, cs_A;
18
19 //if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
20 // FLA_Set_diag_check( alpha, A );
21
22 datatype = FLA_Obj_datatype( A );
23 m_A = FLA_Obj_length( A );
24 n_A = FLA_Obj_width( A );
27
28 switch ( datatype ){
29
30 case FLA_INT:
31 {
32 int *buff_A = ( int * ) FLA_INT_PTR( A );
33 int *buff_alpha = ( int * ) FLA_INT_PTR( alpha );
34
36 m_A,
37 n_A,
39 buff_A, rs_A, cs_A );
40
41 break;
42 }
43
44 case FLA_FLOAT:
45 {
46 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
47 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
48
50 m_A,
51 n_A,
53 buff_A, rs_A, cs_A );
54
55 break;
56 }
57
58 case FLA_DOUBLE:
59 {
60 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
61 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
62
64 m_A,
65 n_A,
67 buff_A, rs_A, cs_A );
68
69 break;
70 }
71
72 case FLA_COMPLEX:
73 {
76
78 m_A,
79 n_A,
81 buff_A, rs_A, cs_A );
82
83 break;
84 }
85
87 {
90
92 m_A,
93 n_A,
95 buff_A, rs_A, cs_A );
96
97 break;
98 }
99
100 }
101
102 return FLA_SUCCESS;
103}

References bl1_csetdiag(), bl1_dsetdiag(), bl1_isetdiag(), bl1_ssetdiag(), bl1_zsetdiag(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), and i.

◆ FLA_Set_to_identity()

FLA_Error FLA_Set_to_identity ( FLA_Obj  A)
14{
17
18 FLA_Set( FLA_ZERO, A );
19
21
22 return FLA_SUCCESS;
23}
FLA_Error FLA_Set_to_identity_check(FLA_Obj A)
Definition FLA_Set_to_identity_check.c:13
FLA_Error FLA_Set_diag(FLA_Obj alpha, FLA_Obj A)
Definition FLA_Set_diag.c:13

References FLA_Check_error_level(), FLA_ONE, FLA_Set(), FLA_Set_diag(), FLA_Set_to_identity_check(), FLA_ZERO, and i.

Referenced by FLA_Form_perm_matrix(), FLA_QR_UT_form_Q(), FLA_Svd_uv_unb_var2(), and FLA_UDdate_UT_unb_var1().

◆ FLA_Set_to_identity_check()

FLA_Error FLA_Set_to_identity_check ( FLA_Obj  A)

◆ FLA_Setr()

FLA_Error FLA_Setr ( FLA_Uplo  uplo,
FLA_Obj  alpha,
FLA_Obj  A 
)
14{
15 FLA_Datatype datatype;
16 int m_A, n_A;
17 int rs_A, cs_A;
19
21 FLA_Setr_check( uplo, alpha, A );
22
23 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
24
25 datatype = FLA_Obj_datatype( A );
26
27 m_A = FLA_Obj_length( A );
28 n_A = FLA_Obj_width( A );
29
32
34
35 switch ( datatype ){
36
37 case FLA_FLOAT:
38 {
39 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
40 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
41
43 m_A,
44 n_A,
46 buff_A, rs_A, cs_A );
47
48 break;
49 }
50
51 case FLA_DOUBLE:
52 {
53 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
54 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
55
57 m_A,
58 n_A,
60 buff_A, rs_A, cs_A );
61
62 break;
63 }
64
65 case FLA_COMPLEX:
66 {
69
71 m_A,
72 n_A,
74 buff_A, rs_A, cs_A );
75
76 break;
77 }
78
80 {
83
85 m_A,
86 n_A,
88 buff_A, rs_A, cs_A );
89
90 break;
91 }
92
93 }
94
95 return FLA_SUCCESS;
96}
FLA_Error FLA_Setr_check(FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A)
Definition FLA_Setr_check.c:13
void bl1_csetmr(uplo1_t uplo, int m, int n, scomplex *sigma, scomplex *a, int a_rs, int a_cs)
Definition bl1_setmr.c:119
void bl1_dsetmr(uplo1_t uplo, int m, int n, double *sigma, double *a, int a_rs, int a_cs)
Definition bl1_setmr.c:66
void bl1_zsetmr(uplo1_t uplo, int m, int n, dcomplex *sigma, dcomplex *a, int a_rs, int a_cs)
Definition bl1_setmr.c:172
void bl1_ssetmr(uplo1_t uplo, int m, int n, float *sigma, float *a, int a_rs, int a_cs)
Definition bl1_setmr.c:13

References bl1_csetmr(), bl1_dsetmr(), bl1_ssetmr(), bl1_zsetmr(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_Param_map_flame_to_blis_uplo(), FLA_Setr_check(), and i.

Referenced by FLA_QR_UT_form_Q(), FLA_Svd_ext_u_unb_var1(), FLA_Svd_uv_unb_var1(), and FLA_Svd_uv_unb_var2().

◆ FLA_Setr_check()

FLA_Error FLA_Setr_check ( FLA_Uplo  uplo,
FLA_Obj  alpha,
FLA_Obj  A 
)

◆ FLA_Shift_diag()

FLA_Error FLA_Shift_diag ( FLA_Conj  conj,
FLA_Obj  sigma,
FLA_Obj  A 
)
14{
17 dim_t m_A, n_A;
20
23
26 m_A = FLA_Obj_length( A );
27 n_A = FLA_Obj_width( A );
30
32
33 switch( datatype_A ){
34
35 case FLA_FLOAT:
36 {
37 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
38 float *buff_sigma = ( float * ) FLA_FLOAT_PTR( sigma );
39
41 0,
42 m_A,
43 n_A,
45 buff_A, rs_A, cs_A );
46
47 break;
48 }
49 case FLA_DOUBLE:
50 {
51 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
52 double *buff_sigma = ( double * ) FLA_DOUBLE_PTR( sigma );
53
55 0,
56 m_A,
57 n_A,
59 buff_A, rs_A, cs_A );
60
61 break;
62 }
63
64 case FLA_COMPLEX:
65 {
67 {
70
72 0,
73 m_A,
74 n_A,
76 buff_A, rs_A, cs_A );
77 }
78 else
79 {
81 float *buff_sigma = ( float * ) FLA_FLOAT_PTR( sigma );
82
84 0,
85 m_A,
86 n_A,
88 buff_A, rs_A, cs_A );
89 }
90
91 break;
92 }
93
95 {
97 {
100
102 0,
103 m_A,
104 n_A,
106 buff_A, rs_A, cs_A );
107 }
108 else
109 {
111 double *buff_sigma = ( double * ) FLA_DOUBLE_PTR( sigma );
112
114 0,
115 m_A,
116 n_A,
118 buff_A, rs_A, cs_A );
119 }
120
121 break;
122 }
123
124 }
125
126 return FLA_SUCCESS;
127}
FLA_Error FLA_Shift_diag_check(FLA_Conj conj, FLA_Obj sigma, FLA_Obj A)
Definition FLA_Shift_diag_check.c:13
void bl1_cshiftdiag(conj1_t conj, int offset, int m, int n, scomplex *sigma, scomplex *a, int a_rs, int a_cs)
Definition bl1_shiftdiag.c:97
void bl1_dshiftdiag(conj1_t conj, int offset, int m, int n, double *sigma, double *a, int a_rs, int a_cs)
Definition bl1_shiftdiag.c:34
void bl1_zdshiftdiag(conj1_t conj, int offset, int m, int n, double *sigma, dcomplex *a, int a_rs, int a_cs)
Definition bl1_shiftdiag.c:76
void bl1_csshiftdiag(conj1_t conj, int offset, int m, int n, float *sigma, scomplex *a, int a_rs, int a_cs)
Definition bl1_shiftdiag.c:55
void bl1_zshiftdiag(conj1_t conj, int offset, int m, int n, dcomplex *sigma, dcomplex *a, int a_rs, int a_cs)
Definition bl1_shiftdiag.c:122
void bl1_sshiftdiag(conj1_t conj, int offset, int m, int n, float *sigma, float *a, int a_rs, int a_cs)
Definition bl1_shiftdiag.c:13

References bl1_cshiftdiag(), bl1_csshiftdiag(), bl1_dshiftdiag(), bl1_sshiftdiag(), bl1_zdshiftdiag(), bl1_zshiftdiag(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_Param_map_flame_to_blis_conj(), FLA_Shift_diag_check(), and i.

Referenced by FLA_Lyap_h_unb_var1(), FLA_Lyap_h_unb_var2(), FLA_Lyap_h_unb_var3(), FLA_Lyap_h_unb_var4(), FLA_Lyap_n_unb_var1(), FLA_Lyap_n_unb_var2(), FLA_Lyap_n_unb_var3(), FLA_Lyap_n_unb_var4(), and FLASH_Shift_diag().

◆ FLA_Shift_diag_check()

FLA_Error FLA_Shift_diag_check ( FLA_Conj  conj,
FLA_Obj  sigma,
FLA_Obj  A 
)

◆ FLA_Shift_pivots_to_check()

FLA_Error FLA_Shift_pivots_to_check ( FLA_Pivot_type  ptype,
FLA_Obj  p 
)
14{
16
19
22
25
28
29 return FLA_SUCCESS;
30}
FLA_Error FLA_Check_valid_pivot_type(FLA_Pivot_type ptype)
Definition FLA_Check.c:552
FLA_Error FLA_Check_col_vector(FLA_Obj x)
Definition FLA_Check.c:1233

◆ FLA_Sort()

FLA_Error FLA_Sort ( FLA_Direct  direct,
FLA_Obj  x 
)
19{
20 FLA_Datatype datatype;
22 dim_t m_x;
24
27
28 datatype = FLA_Obj_datatype( x );
29
32
33 // If the vector does not have unit stride, copy it to a temporary vector
34 // that does have unit stride.
35 if ( inc_x != 1 )
36 {
39 }
40 else
41 {
42 x_use = x;
43 }
44
45 switch ( datatype )
46 {
47 case FLA_FLOAT:
48 {
49 float* x_p = ( float* ) FLA_FLOAT_PTR( x_use );
50
51 if ( direct == FLA_FORWARD )
53 x_p, inc_x );
54 else // if ( direct == FLA_BACKWARD )
56 x_p, inc_x );
57
58 break;
59 }
60
61 case FLA_DOUBLE:
62 {
63 double* x_p = ( double* ) FLA_DOUBLE_PTR( x_use );
64
65 if ( direct == FLA_FORWARD )
67 x_p, inc_x );
68 else // if ( direct == FLA_BACKWARD )
70 x_p, inc_x );
71
72 break;
73 }
74
75 }
76
77 if ( inc_x != 1 )
78 {
79 FLA_Copy( x_use, x );
81 }
82
83 return FLA_SUCCESS;
84}
FLA_Error FLA_Sort_f_opd(int m_x, double *x, int inc_x)
Definition FLA_Sort.c:110
FLA_Error FLA_Sort_b_opd(int m_x, double *x, int inc_x)
Definition FLA_Sort.c:121
FLA_Error FLA_Sort_f_ops(int m_x, float *x, int inc_x)
Definition FLA_Sort.c:88
FLA_Error FLA_Sort_b_ops(int m_x, float *x, int inc_x)
Definition FLA_Sort.c:99
FLA_Error FLA_Sort_check(FLA_Direct direct, FLA_Obj x)
Definition FLA_Sort_check.c:13
FLA_Error FLA_Obj_create_copy_of(FLA_Trans trans, FLA_Obj old, FLA_Obj *obj)
Definition FLA_Obj.c:345

References FLA_Check_error_level(), FLA_Copy(), FLA_Obj_create_copy_of(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_vector_dim(), FLA_Obj_vector_inc(), FLA_Sort_b_opd(), FLA_Sort_b_ops(), FLA_Sort_check(), FLA_Sort_f_opd(), FLA_Sort_f_ops(), and i.

Referenced by FLA_Fill_with_cluster_dist(), and FLA_Sort_bsvd_ext().

◆ FLA_Sort_b_opd()

FLA_Error FLA_Sort_b_opd ( int  m_x,
double x,
int  inc_x 
)
123{
124 qsort( x,
125 m_x,
126 sizeof( double ),
127 fla_dcomp_b );
128
129 return FLA_SUCCESS;
130}
int fla_dcomp_b(const void *a, const void *b)
Definition FLA_Sort.c:175

References fla_dcomp_b(), and i.

Referenced by FLA_Sort().

◆ FLA_Sort_b_ops()

FLA_Error FLA_Sort_b_ops ( int  m_x,
float x,
int  inc_x 
)
101{
102 qsort( x,
103 m_x,
104 sizeof( float ),
105 fla_scomp_b );
106
107 return FLA_SUCCESS;
108}
int fla_scomp_b(const void *a, const void *b)
Definition FLA_Sort.c:149

References fla_scomp_b(), and i.

Referenced by FLA_Sort().

◆ FLA_Sort_check()

FLA_Error FLA_Sort_check ( FLA_Direct  direct,
FLA_Obj  x 
)
14{
16
19
22
25
26 return FLA_SUCCESS;
27}
FLA_Error FLA_Check_valid_direct(FLA_Conj direct)
Definition FLA_Check.c:123

References FLA_Check_floating_object(), FLA_Check_nonconstant_object(), and FLA_Check_valid_direct().

Referenced by FLA_Sort().

◆ FLA_Sort_f_opd()

FLA_Error FLA_Sort_f_opd ( int  m_x,
double x,
int  inc_x 
)
112{
113 qsort( x,
114 m_x,
115 sizeof( double ),
116 fla_dcomp_f );
117
118 return FLA_SUCCESS;
119}
int fla_dcomp_f(const void *a, const void *b)
Definition FLA_Sort.c:162

References fla_dcomp_f(), and i.

Referenced by FLA_Sort().

◆ FLA_Sort_f_ops()

FLA_Error FLA_Sort_f_ops ( int  m_x,
float x,
int  inc_x 
)
90{
91 qsort( x,
92 m_x,
93 sizeof( float ),
95
96 return FLA_SUCCESS;
97}
int fla_scomp_f(const void *a, const void *b)
Definition FLA_Sort.c:136

References fla_scomp_f(), and i.

Referenced by FLA_Sort().

◆ FLA_Sqrt()

FLA_Error FLA_Sqrt ( FLA_Obj  alpha)
14{
15 FLA_Datatype datatype;
16 int r_val = FLA_SUCCESS;
17
20
21 datatype = FLA_Obj_datatype( alpha );
22
23 switch ( datatype ){
24
25 case FLA_FLOAT:
26 {
27 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
28
29 if ( *buff_alpha <= 0.0F || isnan(*buff_alpha) )
31 else
33
34 break;
35 }
36
37 case FLA_DOUBLE:
38 {
39 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
40
41 if ( *buff_alpha <= 0.0 || isnan(*buff_alpha) )
43 else
45
46 break;
47 }
48
49 case FLA_COMPLEX:
50 {
52
53 if ( buff_alpha->real <= 0.0F || isnan(buff_alpha->real) )
55 else
56 buff_alpha->real = ( float ) sqrt( buff_alpha->real );
57
58 break;
59 }
60
62 {
64
65 if ( buff_alpha->real <= 0.0 || isnan(buff_alpha->real) )
67 else
68 buff_alpha->real = ( double ) sqrt( buff_alpha->real );
69
70 break;
71 }
72
73 }
74
75 return r_val;
76}
FLA_Error FLA_Sqrt_check(FLA_Obj alpha)
Definition FLA_Sqrt_check.c:13

References FLA_Check_error_level(), FLA_Obj_datatype(), FLA_Sqrt_check(), i, scomplex::real, and dcomplex::real.

Referenced by FLA_Chol_l_unb_var1(), FLA_Chol_l_unb_var2(), FLA_Chol_l_unb_var3(), FLA_Chol_u_unb_var1(), FLA_Chol_u_unb_var2(), FLA_Chol_u_unb_var3(), FLA_Hevd_compute_scaling(), and FLA_Svd_compute_scaling().

◆ FLA_Sqrt_check()

FLA_Error FLA_Sqrt_check ( FLA_Obj  alpha)

◆ FLA_Swap_t_blk_var1()

FLA_Error FLA_Swap_t_blk_var1 ( FLA_Obj  A,
FLA_Obj  B,
fla_swap_t cntl 
)
14{
15 FLA_Obj AL, AR, A0, A1, A2;
16
17 FLA_Obj BT, B0,
18 BB, B1,
19 B2;
20
21 dim_t b;
22
23 FLA_Part_1x2( A, &AL, &AR, 0, FLA_LEFT );
24
25 FLA_Part_2x1( B, &BT,
26 &BB, 0, FLA_TOP );
27
28 while ( FLA_Obj_width( AL ) < FLA_Obj_width( A ) ){
29
31
32 FLA_Repart_1x2_to_1x3( AL, /**/ AR, &A0, /**/ &A1, &A2,
33 b, FLA_RIGHT );
34
36 /* ** */ /* ** */
37 &B1,
38 BB, &B2, b, FLA_BOTTOM );
39
40 /*------------------------------------------------------------*/
41
43
44 /*------------------------------------------------------------*/
45
46 FLA_Cont_with_1x3_to_1x2( &AL, /**/ &AR, A0, A1, /**/ A2,
47 FLA_LEFT );
48
50 B1,
51 /* ** */ /* ** */
52 &BB, B2, FLA_TOP );
53
54 }
55
56 return FLA_SUCCESS;
57}
FLA_Error FLA_Swapt_external(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition FLA_Swapt_external.c:13
dim_t FLA_Determine_blocksize(FLA_Obj A_unproc, FLA_Quadrant to_dir, fla_blocksize_t *cntl_blocksizes)
Definition FLA_Blocksize.c:234

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(), FLA_Swapt_external(), and i.

Referenced by FLA_Transpose_blk_var1().

◆ FLA_Swap_t_blk_var2()

FLA_Error FLA_Swap_t_blk_var2 ( FLA_Obj  A,
FLA_Obj  B,
fla_swap_t cntl 
)
14{
15 FLA_Obj AT, A0,
16 AB, A1,
17 A2;
18
19 FLA_Obj BL, BR, B0, B1, B2;
20
21 dim_t b;
22
23 FLA_Part_2x1( A, &AT,
24 &AB, 0, FLA_TOP );
25
26 FLA_Part_1x2( B, &BL, &BR, 0, FLA_LEFT );
27
28 while ( FLA_Obj_length( AT ) < FLA_Obj_length( A ) ){
29
31
33 /* ** */ /* ** */
34 &A1,
35 AB, &A2, b, FLA_BOTTOM );
36
37 FLA_Repart_1x2_to_1x3( BL, /**/ BR, &B0, /**/ &B1, &B2,
38 b, FLA_RIGHT );
39
40 /*------------------------------------------------------------*/
41
43
44 /*------------------------------------------------------------*/
45
47 A1,
48 /* ** */ /* ** */
49 &AB, A2, FLA_TOP );
50
51 FLA_Cont_with_1x3_to_1x2( &BL, /**/ &BR, B0, B1, /**/ B2,
52 FLA_LEFT );
53
54 }
55
56 return FLA_SUCCESS;
57}

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

Referenced by FLA_Transpose_blk_var2().

◆ FLA_Symmetrize()

FLA_Error FLA_Symmetrize ( FLA_Uplo  uplo,
FLA_Obj  A 
)
14{
15 FLA_Datatype datatype;
16 dim_t n_A;
20
22 FLA_Symmetrize_check( uplo, A );
23
24 datatype = FLA_Obj_datatype( A );
25
26 n_A = FLA_Obj_width( A );
29
32
33
34 switch ( datatype ){
35
36 case FLA_FLOAT:
37 {
38 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
39
42 n_A,
43 buff_A, rs_A, cs_A );
44
45 break;
46 }
47
48 case FLA_DOUBLE:
49 {
50 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
51
54 n_A,
55 buff_A, rs_A, cs_A );
56
57 break;
58 }
59
60 case FLA_COMPLEX:
61 {
63
66 n_A,
67 buff_A, rs_A, cs_A );
68
69 break;
70 }
71
73 {
75
78 n_A,
79 buff_A, rs_A, cs_A );
80
81 break;
82 }
83
84 }
85
86 return FLA_SUCCESS;
87}
FLA_Error FLA_Symmetrize_check(FLA_Uplo uplo, FLA_Obj A)
Definition FLA_Symmetrize_check.c:13

References bl1_csymmize(), bl1_dsymmize(), bl1_ssymmize(), bl1_zsymmize(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_Param_map_flame_to_blis_conj(), FLA_Param_map_flame_to_blis_uplo(), FLA_Symmetrize_check(), and i.

Referenced by FLA_Random_symm_matrix().

◆ FLA_Symmetrize_check()

FLA_Error FLA_Symmetrize_check ( FLA_Uplo  uplo,
FLA_Obj  A 
)

◆ FLA_Transpose()

FLA_Error FLA_Transpose ( FLA_Obj  A)
16{
18
21
23
24 return r_val;
25}
fla_tpose_t * fla_tpose_cntl
Definition FLA_Transpose_cntl_init.c:16
FLA_Error FLA_Transpose_check(FLA_Obj A)
Definition FLA_Transpose_check.c:13
FLA_Error FLA_Transpose_blk_var2(FLA_Obj A, fla_tpose_t *cntl)
Definition FLA_Transpose_blk_var2.c:13

References FLA_Check_error_level(), fla_tpose_cntl, FLA_Transpose_blk_var2(), FLA_Transpose_check(), and i.

◆ FLA_Transpose_blk_var1()

FLA_Error FLA_Transpose_blk_var1 ( FLA_Obj  A,
fla_tpose_t cntl 
)
14{
15 FLA_Obj ATL, ATR, A00, A01, A02,
16 ABL, ABR, A10, A11, A12,
17 A20, A21, A22;
18
19 dim_t b;
20
21 FLA_Part_2x2( A, &ATL, &ATR,
22 &ABL, &ABR, 0, 0, FLA_TL );
23
24 while ( FLA_Obj_length( ATL ) < FLA_Obj_length( A ) ){
25
27
28 FLA_Repart_2x2_to_3x3( ATL, /**/ ATR, &A00, /**/ &A01, &A02,
29 /* ************* */ /* ******************** */
30 &A10, /**/ &A11, &A12,
31 ABL, /**/ ABR, &A20, /**/ &A21, &A22,
32 b, b, FLA_BR );
33
34 /*------------------------------------------------------------*/
35
37
39 FLA_Cntl_sub_swap( cntl ) );
40
41 /*------------------------------------------------------------*/
42
43 FLA_Cont_with_3x3_to_2x2( &ATL, /**/ &ATR, A00, A01, /**/ A02,
44 A10, A11, /**/ A12,
45 /* ************** */ /* ****************** */
46 &ABL, /**/ &ABR, A20, A21, /**/ A22,
47 FLA_TL );
48
49 }
50
51 return FLA_SUCCESS;
52}
FLA_Error FLA_Cont_with_3x3_to_2x2(FLA_Obj *ATL, FLA_Obj *ATR, FLA_Obj A00, FLA_Obj A01, FLA_Obj A02, FLA_Obj A10, FLA_Obj A11, FLA_Obj A12, FLA_Obj *ABL, FLA_Obj *ABR, FLA_Obj A20, FLA_Obj A21, FLA_Obj A22, FLA_Quadrant quadrant)
Definition FLA_View.c:304
FLA_Error FLA_Part_2x2(FLA_Obj A, FLA_Obj *A11, FLA_Obj *A12, FLA_Obj *A21, FLA_Obj *A22, dim_t mb, dim_t nb, FLA_Quadrant quadrant)
Definition FLA_View.c:17
FLA_Error FLA_Repart_2x2_to_3x3(FLA_Obj ATL, FLA_Obj ATR, FLA_Obj *A00, FLA_Obj *A01, FLA_Obj *A02, FLA_Obj *A10, FLA_Obj *A11, FLA_Obj *A12, FLA_Obj ABL, FLA_Obj ABR, FLA_Obj *A20, FLA_Obj *A21, FLA_Obj *A22, dim_t mb, dim_t nb, FLA_Quadrant quadrant)
Definition FLA_View.c:142
FLA_Error FLA_Swap_t_blk_var1(FLA_Obj A, FLA_Obj B, fla_swap_t *cntl)
Definition FLA_Swap_t_blk_var1.c:13
FLA_Error FLA_Transpose_unb_var1(FLA_Obj A)
Definition FLA_Transpose_unb_var1.c:13

References FLA_Cont_with_3x3_to_2x2(), FLA_Determine_blocksize(), FLA_Obj_length(), FLA_Part_2x2(), FLA_Repart_2x2_to_3x3(), FLA_Swap_t_blk_var1(), FLA_Transpose_unb_var1(), and i.

◆ FLA_Transpose_blk_var2()

FLA_Error FLA_Transpose_blk_var2 ( FLA_Obj  A,
fla_tpose_t cntl 
)
14{
15 FLA_Obj ATL, ATR, A00, A01, A02,
16 ABL, ABR, A10, A11, A12,
17 A20, A21, A22;
18
19 dim_t b;
20
21 FLA_Part_2x2( A, &ATL, &ATR,
22 &ABL, &ABR, 0, 0, FLA_TL );
23
24 while ( FLA_Obj_length( ATL ) < FLA_Obj_length( A ) ){
25
27
28 FLA_Repart_2x2_to_3x3( ATL, /**/ ATR, &A00, /**/ &A01, &A02,
29 /* ************* */ /* ******************** */
30 &A10, /**/ &A11, &A12,
31 ABL, /**/ ABR, &A20, /**/ &A21, &A22,
32 b, b, FLA_BR );
33
34 /*------------------------------------------------------------*/
35
37
39 FLA_Cntl_sub_swap( cntl ) );
40
41 /*------------------------------------------------------------*/
42
43 FLA_Cont_with_3x3_to_2x2( &ATL, /**/ &ATR, A00, A01, /**/ A02,
44 A10, A11, /**/ A12,
45 /* ************** */ /* ****************** */
46 &ABL, /**/ &ABR, A20, A21, /**/ A22,
47 FLA_TL );
48
49 }
50
51 return FLA_SUCCESS;
52}
FLA_Error FLA_Swap_t_blk_var2(FLA_Obj A, FLA_Obj B, fla_swap_t *cntl)
Definition FLA_Swap_t_blk_var2.c:13
FLA_Error FLA_Transpose_unb_var2(FLA_Obj A)
Definition FLA_Transpose_unb_var2.c:13

References FLA_Cont_with_3x3_to_2x2(), FLA_Determine_blocksize(), FLA_Obj_length(), FLA_Part_2x2(), FLA_Repart_2x2_to_3x3(), FLA_Swap_t_blk_var2(), FLA_Transpose_unb_var2(), and i.

Referenced by FLA_Transpose().

◆ FLA_Transpose_check()

FLA_Error FLA_Transpose_check ( FLA_Obj  A)

◆ FLA_Transpose_unb_var1()

FLA_Error FLA_Transpose_unb_var1 ( FLA_Obj  A)
14{
15 FLA_Obj ATL, ATR, A00, a01, A02,
17 A20, a21, A22;
18
19 FLA_Part_2x2( A, &ATL, &ATR,
20 &ABL, &ABR, 0, 0, FLA_TL );
21
22 while ( FLA_Obj_length( ATL ) < FLA_Obj_length( A ) ){
23
24 FLA_Repart_2x2_to_3x3( ATL, /**/ ATR, &A00, /**/ &a01, &A02,
25 /* ************* */ /* ************************** */
26 &a10t, /**/ &alpha11, &a12t,
27 ABL, /**/ ABR, &A20, /**/ &a21, &A22,
28 1, 1, FLA_BR );
29
30 /*------------------------------------------------------------*/
31
33
34 /*------------------------------------------------------------*/
35
36 FLA_Cont_with_3x3_to_2x2( &ATL, /**/ &ATR, A00, a01, /**/ A02,
37 a10t, alpha11, /**/ a12t,
38 /* ************** */ /* ************************ */
39 &ABL, /**/ &ABR, A20, a21, /**/ A22,
40 FLA_TL );
41
42 }
43
44 return FLA_SUCCESS;
45}

References FLA_Cont_with_3x3_to_2x2(), FLA_Obj_length(), FLA_Part_2x2(), FLA_Repart_2x2_to_3x3(), FLA_Swapt_external(), and i.

Referenced by FLA_Transpose_blk_var1().

◆ FLA_Transpose_unb_var2()

FLA_Error FLA_Transpose_unb_var2 ( FLA_Obj  A)
14{
15 FLA_Obj ATL, ATR, A00, a01, A02,
17 A20, a21, A22;
18
19 FLA_Part_2x2( A, &ATL, &ATR,
20 &ABL, &ABR, 0, 0, FLA_TL );
21
22 while ( FLA_Obj_length( ATL ) < FLA_Obj_length( A ) ){
23
24 FLA_Repart_2x2_to_3x3( ATL, /**/ ATR, &A00, /**/ &a01, &A02,
25 /* ************* */ /* ************************** */
26 &a10t, /**/ &alpha11, &a12t,
27 ABL, /**/ ABR, &A20, /**/ &a21, &A22,
28 1, 1, FLA_BR );
29
30 /*------------------------------------------------------------*/
31
33
34 /*------------------------------------------------------------*/
35
36 FLA_Cont_with_3x3_to_2x2( &ATL, /**/ &ATR, A00, a01, /**/ A02,
37 a10t, alpha11, /**/ a12t,
38 /* ************** */ /* ************************ */
39 &ABL, /**/ &ABR, A20, a21, /**/ A22,
40 FLA_TL );
41
42 }
43
44 return FLA_SUCCESS;
45}

References FLA_Cont_with_3x3_to_2x2(), FLA_Obj_length(), FLA_Part_2x2(), FLA_Repart_2x2_to_3x3(), FLA_Swapt_external(), and i.

Referenced by FLA_Transpose_blk_var2().

◆ FLA_Triangularize()

FLA_Error FLA_Triangularize ( FLA_Uplo  uplo,
FLA_Diag  diag,
FLA_Obj  A 
)
14{
15 FLA_Datatype datatype;
16 int m_A, n_A;
17 int rs_A, cs_A;
19
22
23 datatype = FLA_Obj_datatype( A );
24
25 m_A = FLA_Obj_length( A );
26 n_A = FLA_Obj_width( A );
29
30 // We have to toggle the uplo parameter because we will use it to specify
31 // which triangle to zero out.
32 if ( uplo == FLA_LOWER_TRIANGULAR ) uplo = FLA_UPPER_TRIANGULAR;
33 else uplo = FLA_LOWER_TRIANGULAR;
34
36
37 switch ( datatype ){
38
39 case FLA_FLOAT:
40 {
41 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
42 float *buff_0 = ( float * ) FLA_FLOAT_PTR( FLA_ZERO );
43 float *buff_1 = ( float * ) FLA_FLOAT_PTR( FLA_ONE );
44
46 m_A,
47 n_A,
48 buff_0,
49 buff_A, rs_A, cs_A );
50
51 if ( diag == FLA_UNIT_DIAG )
52 bl1_ssetdiag( 0,
53 m_A,
54 n_A,
55 buff_1,
56 buff_A, rs_A, cs_A );
57 else if ( diag == FLA_ZERO_DIAG )
58 bl1_ssetdiag( 0,
59 m_A,
60 n_A,
61 buff_0,
62 buff_A, rs_A, cs_A );
63
64 break;
65 }
66
67 case FLA_DOUBLE:
68 {
69 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
70 double *buff_0 = ( double * ) FLA_DOUBLE_PTR( FLA_ZERO );
71 double *buff_1 = ( double * ) FLA_DOUBLE_PTR( FLA_ONE );
72
74 m_A,
75 n_A,
76 buff_0,
77 buff_A, rs_A, cs_A );
78
79 if ( diag == FLA_UNIT_DIAG )
80 bl1_dsetdiag( 0,
81 m_A,
82 n_A,
83 buff_1,
84 buff_A, rs_A, cs_A );
85 else if ( diag == FLA_ZERO_DIAG )
86 bl1_dsetdiag( 0,
87 m_A,
88 n_A,
89 buff_0,
90 buff_A, rs_A, cs_A );
91
92 break;
93 }
94
95 case FLA_COMPLEX:
96 {
100
102 m_A,
103 n_A,
104 buff_0,
105 buff_A, rs_A, cs_A );
106
107 if ( diag == FLA_UNIT_DIAG )
108 bl1_csetdiag( 0,
109 m_A,
110 n_A,
111 buff_1,
112 buff_A, rs_A, cs_A );
113 else if ( diag == FLA_ZERO_DIAG )
114 bl1_csetdiag( 0,
115 m_A,
116 n_A,
117 buff_0,
118 buff_A, rs_A, cs_A );
119
120 break;
121 }
122
124 {
128
130 m_A,
131 n_A,
132 buff_0,
133 buff_A, rs_A, cs_A );
134
135 if ( diag == FLA_UNIT_DIAG )
136 bl1_zsetdiag( 0,
137 m_A,
138 n_A,
139 buff_1,
140 buff_A, rs_A, cs_A );
141 else if ( diag == FLA_ZERO_DIAG )
142 bl1_zsetdiag( 0,
143 m_A,
144 n_A,
145 buff_0,
146 buff_A, rs_A, cs_A );
147
148 break;
149 }
150
151 }
152
153 return FLA_SUCCESS;
154}
FLA_Error FLA_Triangularize_check(FLA_Uplo uplo, FLA_Diag diag, FLA_Obj A)
Definition FLA_Triangularize_check.c:13

References bl1_csetdiag(), bl1_csetmr(), bl1_dsetdiag(), bl1_dsetmr(), bl1_ssetdiag(), bl1_ssetmr(), bl1_zsetdiag(), bl1_zsetmr(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_ONE, FLA_Param_map_flame_to_blis_uplo(), FLA_Triangularize_check(), FLA_ZERO, and i.

Referenced by FLA_Bidiag_UT_u_blf_var4(), FLA_Bidiag_UT_u_blk_var4(), FLA_Bidiag_UT_u_blk_var5(), FLA_Hess_UT_blf_var2(), FLA_Hess_UT_blf_var3(), FLA_Hess_UT_blf_var4(), FLA_Hess_UT_blk_var1(), FLA_Hess_UT_blk_var2(), FLA_Hess_UT_blk_var3(), FLA_Hess_UT_blk_var4(), FLA_SA_LU_unb(), FLA_Tridiag_UT_l_blf_var3(), FLA_Tridiag_UT_l_blk_var3(), and FLASH_Triangularize().

◆ FLA_Triangularize_check()

FLA_Error FLA_Triangularize_check ( FLA_Uplo  uplo,
FLA_Diag  diag,
FLA_Obj  A 
)