libflame revision_anchor
FLA_blas1_prototypes.h File Reference

(r)

Go to the source code of this file.

Functions

FLA_Error FLA_Asum (FLA_Obj x, FLA_Obj asum_x)
 
FLA_Error FLA_Axpy (FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Axpys (FLA_Obj alpha0, FLA_Obj alpha1, FLA_Obj A, FLA_Obj beta, FLA_Obj B)
 
FLA_Error FLA_Axpyt (FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Axpyrt (FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Copy (FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Copyr (FLA_Uplo uplo, FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Copyrt (FLA_Uplo uplo, FLA_Trans trans, FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Copyt (FLA_Trans trans, FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Dot (FLA_Obj x, FLA_Obj y, FLA_Obj rho)
 
FLA_Error FLA_Dot2cs (FLA_Conj conj, FLA_Obj alpha, FLA_Obj x, FLA_Obj y, FLA_Obj beta, FLA_Obj rho)
 
FLA_Error FLA_Dot2s (FLA_Obj alpha, FLA_Obj x, FLA_Obj y, FLA_Obj beta, FLA_Obj rho)
 
FLA_Error FLA_Dotc (FLA_Conj conj, FLA_Obj x, FLA_Obj y, FLA_Obj rho)
 
FLA_Error FLA_Dotcs (FLA_Conj conj, FLA_Obj alpha, FLA_Obj x, FLA_Obj y, FLA_Obj beta, FLA_Obj rho)
 
FLA_Error FLA_Dots (FLA_Obj alpha, FLA_Obj x, FLA_Obj y, FLA_Obj beta, FLA_Obj rho)
 
FLA_Error FLA_Amax (FLA_Obj x, FLA_Obj index)
 
FLA_Error FLA_Inv_scal (FLA_Obj alpha, FLA_Obj A)
 
FLA_Error FLA_Inv_scalc (FLA_Conj conjalpha, FLA_Obj alpha, FLA_Obj A)
 
FLA_Error FLA_Nrm2 (FLA_Obj x, FLA_Obj norm_x)
 
FLA_Error FLA_Scal (FLA_Obj alpha, FLA_Obj A)
 
FLA_Error FLA_Scalc (FLA_Conj conjalpha, FLA_Obj alpha, FLA_Obj A)
 
FLA_Error FLA_Scalr (FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A)
 
FLA_Error FLA_Swap (FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Swapt (FLA_Trans trans, FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Axpy_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_axpy_t *cntl)
 
FLA_Error FLA_Axpyt_task (FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_axpyt_t *cntl)
 
FLA_Error FLA_Copy_task (FLA_Obj A, FLA_Obj B, fla_copy_t *cntl)
 
FLA_Error FLA_Copyt_task (FLA_Trans trans, FLA_Obj A, FLA_Obj B, fla_copyt_t *cntl)
 
FLA_Error FLA_Copyr_task (FLA_Uplo uplo, FLA_Obj A, FLA_Obj B, fla_copyr_t *cntl)
 
FLA_Error FLA_Scal_task (FLA_Obj alpha, FLA_Obj A, fla_scal_t *cntl)
 
FLA_Error FLA_Scalr_task (FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A, fla_scalr_t *cntl)
 
FLA_Error FLA_Axpyt_n_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_axpyt_t *cntl)
 
FLA_Error FLA_Axpyt_t_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_axpyt_t *cntl)
 
FLA_Error FLA_Axpyt_c_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_axpyt_t *cntl)
 
FLA_Error FLA_Axpyt_h_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_axpyt_t *cntl)
 
FLA_Error FLA_Copyt_n_task (FLA_Obj A, FLA_Obj B, fla_copyt_t *cntl)
 
FLA_Error FLA_Copyt_t_task (FLA_Obj A, FLA_Obj B, fla_copyt_t *cntl)
 
FLA_Error FLA_Copyt_c_task (FLA_Obj A, FLA_Obj B, fla_copyt_t *cntl)
 
FLA_Error FLA_Copyt_h_task (FLA_Obj A, FLA_Obj B, fla_copyt_t *cntl)
 
FLA_Error FLA_Copyr_l_task (FLA_Obj A, FLA_Obj B, fla_copyr_t *cntl)
 
FLA_Error FLA_Copyr_u_task (FLA_Obj A, FLA_Obj B, fla_copyr_t *cntl)
 
FLA_Error FLA_Scalr_l_task (FLA_Obj alpha, FLA_Obj A, fla_scalr_t *cntl)
 
FLA_Error FLA_Scalr_u_task (FLA_Obj alpha, FLA_Obj A, fla_scalr_t *cntl)
 
FLA_Error FLA_Asum_external (FLA_Obj x, FLA_Obj asum_x)
 
FLA_Error FLA_Axpy_external (FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Axpys_external (FLA_Obj alpha0, FLA_Obj alpha1, FLA_Obj A, FLA_Obj beta, FLA_Obj B)
 
FLA_Error FLA_Axpyt_external (FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Axpyrt_external (FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Copy_external (FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Copyr_external (FLA_Uplo uplo, FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Copyrt_external (FLA_Uplo uplo, FLA_Trans trans, FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Copyt_external (FLA_Trans trans, FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Dot_external (FLA_Obj x, FLA_Obj y, FLA_Obj rho)
 
FLA_Error FLA_Dotc_external (FLA_Conj conj, FLA_Obj x, FLA_Obj y, FLA_Obj rho)
 
FLA_Error FLA_Dots_external (FLA_Obj alpha, FLA_Obj x, FLA_Obj y, FLA_Obj beta, FLA_Obj rho)
 
FLA_Error FLA_Dotcs_external (FLA_Conj conj, FLA_Obj alpha, FLA_Obj x, FLA_Obj y, FLA_Obj beta, FLA_Obj rho)
 
FLA_Error FLA_Dot2s_external (FLA_Obj alpha, FLA_Obj x, FLA_Obj y, FLA_Obj beta, FLA_Obj rho)
 
FLA_Error FLA_Dot2cs_external (FLA_Conj conj, FLA_Obj alpha, FLA_Obj x, FLA_Obj y, FLA_Obj beta, FLA_Obj rho)
 
FLA_Error FLA_Amax_external (FLA_Obj x, FLA_Obj index)
 
FLA_Error FLA_Inv_scal_external (FLA_Obj alpha, FLA_Obj A)
 
FLA_Error FLA_Inv_scalc_external (FLA_Conj conjalpha, FLA_Obj alpha, FLA_Obj A)
 
FLA_Error FLA_Nrm2_external (FLA_Obj x, FLA_Obj nrm_x)
 
FLA_Error FLA_Scal_external (FLA_Obj alpha, FLA_Obj A)
 
FLA_Error FLA_Scalc_external (FLA_Conj conjalpha, FLA_Obj alpha, FLA_Obj A)
 
FLA_Error FLA_Scalr_external (FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A)
 
FLA_Error FLA_Swap_external (FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Swapt_external (FLA_Trans trans, FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Axpy_external_gpu (FLA_Obj alpha, FLA_Obj A, void *A_gpu, FLA_Obj B, void *B_gpu)
 
FLA_Error FLA_Copy_external_gpu (FLA_Obj A, void *A_gpu, FLA_Obj B, void *B_gpu)
 
FLA_Error FLA_Scal_external_gpu (FLA_Obj alpha, FLA_Obj A, void *A_gpu)
 
FLA_Error FLA_Scalr_external_gpu (FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A, void *A_gpu)
 
FLA_Error FLA_Asum_check (FLA_Obj x, FLA_Obj asum_x)
 
FLA_Error FLA_Axpy_check (FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Axpys_check (FLA_Obj alpha0, FLA_Obj alpha1, FLA_Obj A, FLA_Obj beta, FLA_Obj B)
 
FLA_Error FLA_Axpyt_check (FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Axpyrt_check (FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Copy_check (FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Copyr_check (FLA_Uplo uplo, FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Copyrt_check (FLA_Uplo uplo, FLA_Trans trans, FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Copyt_check (FLA_Trans trans, FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Dot_check (FLA_Obj x, FLA_Obj y, FLA_Obj rho)
 
FLA_Error FLA_Dotc_check (FLA_Conj conj, FLA_Obj x, FLA_Obj y, FLA_Obj rho)
 
FLA_Error FLA_Dots_check (FLA_Obj alpha, FLA_Obj x, FLA_Obj y, FLA_Obj beta, FLA_Obj rho)
 
FLA_Error FLA_Dotcs_check (FLA_Conj conj, FLA_Obj alpha, FLA_Obj x, FLA_Obj y, FLA_Obj beta, FLA_Obj rho)
 
FLA_Error FLA_Dot2s_check (FLA_Obj alpha, FLA_Obj x, FLA_Obj y, FLA_Obj beta, FLA_Obj rho)
 
FLA_Error FLA_Dot2cs_check (FLA_Conj conj, FLA_Obj alpha, FLA_Obj x, FLA_Obj y, FLA_Obj beta, FLA_Obj rho)
 
FLA_Error FLA_Amax_check (FLA_Obj x, FLA_Obj index)
 
FLA_Error FLA_Inv_scal_check (FLA_Obj alpha, FLA_Obj A)
 
FLA_Error FLA_Inv_scalc_check (FLA_Conj conjalpha, FLA_Obj alpha, FLA_Obj A)
 
FLA_Error FLA_Nrm2_check (FLA_Obj x, FLA_Obj nrm_x)
 
FLA_Error FLA_Scal_check (FLA_Obj alpha, FLA_Obj A)
 
FLA_Error FLA_Scalc_check (FLA_Conj conjalpha, FLA_Obj alpha, FLA_Obj A)
 
FLA_Error FLA_Scalr_check (FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A)
 
FLA_Error FLA_Swap_check (FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Swapt_check (FLA_Trans trans, FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Axpy_internal_check (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_axpy_t *cntl)
 
FLA_Error FLA_Axpyt_internal_check (FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_axpyt_t *cntl)
 
FLA_Error FLA_Copy_internal_check (FLA_Obj A, FLA_Obj B, fla_copy_t *cntl)
 
FLA_Error FLA_Copyt_internal_check (FLA_Trans trans, FLA_Obj A, FLA_Obj B, fla_copyt_t *cntl)
 
FLA_Error FLA_Copyr_internal_check (FLA_Uplo uplo, FLA_Obj A, FLA_Obj B, fla_copyr_t *cntl)
 
FLA_Error FLA_Scal_internal_check (FLA_Obj alpha, FLA_Obj A, fla_scal_t *cntl)
 
FLA_Error FLA_Scalr_internal_check (FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A, fla_scalr_t *cntl)
 

Function Documentation

◆ FLA_Amax()

FLA_Error FLA_Amax ( FLA_Obj x,
FLA_Obj index )
14{
15 return FLA_Amax_external( x, index );
16}
FLA_Error FLA_Amax_external(FLA_Obj x, FLA_Obj index)
Definition FLA_Amax_external.c:13

References FLA_Amax_external().

◆ FLA_Amax_check()

FLA_Error FLA_Amax_check ( FLA_Obj x,
FLA_Obj index )
14{
15 FLA_Error e_val;
16
17 e_val = FLA_Check_floating_object( x );
18 FLA_Check_error_code( e_val );
19
21 FLA_Check_error_code( e_val );
22
23 e_val = FLA_Check_if_vector( x );
24 FLA_Check_error_code( e_val );
25
26 e_val = FLA_Check_int_object( index );
27 FLA_Check_error_code( e_val );
28
29 e_val = FLA_Check_nonconstant_object( index );
30 FLA_Check_error_code( e_val );
31
32 e_val = FLA_Check_if_scalar( index );
33 FLA_Check_error_code( e_val );
34
35 return FLA_SUCCESS;
36}
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_if_vector(FLA_Obj A)
Definition FLA_Check.c:383
FLA_Error FLA_Check_int_object(FLA_Obj A)
Definition FLA_Check.c:245
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(), FLA_Check_if_vector(), FLA_Check_int_object(), and FLA_Check_nonconstant_object().

Referenced by FLA_Amax_external().

◆ FLA_Amax_external()

FLA_Error FLA_Amax_external ( FLA_Obj x,
FLA_Obj index )
14{
15 FLA_Datatype datatype;
16 int num_elem;
17 int inc_x;
18 int *buff_index;
19
20 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
21 FLA_Amax_check( x, index );
22
23 buff_index = ( int * ) FLA_INT_PTR( index );
24
25 if ( FLA_Obj_has_zero_dim( x ) )
26 {
27 *buff_index = 0;
28 return FLA_SUCCESS;
29 }
30
31 datatype = FLA_Obj_datatype( x );
32
33 inc_x = FLA_Obj_vector_inc( x );
34 num_elem = FLA_Obj_vector_dim( x );
35
36
37 switch ( datatype ){
38
39 case FLA_FLOAT:
40 {
41 float* buff_x = ( float * ) FLA_FLOAT_PTR( x );
42
43 bl1_samax( num_elem,
44 buff_x, inc_x,
45 buff_index );
46
47 break;
48 }
49
50 case FLA_DOUBLE:
51 {
52 double* buff_x = ( double * ) FLA_DOUBLE_PTR( x );
53
54 bl1_damax( num_elem,
55 buff_x, inc_x,
56 buff_index );
57
58 break;
59 }
60
61 case FLA_COMPLEX:
62 {
63 scomplex* buff_x = ( scomplex * ) FLA_COMPLEX_PTR( x );
64
65 bl1_camax( num_elem,
66 buff_x, inc_x,
67 buff_index );
68
69 break;
70 }
71
72 case FLA_DOUBLE_COMPLEX:
73 {
74 dcomplex* buff_x = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( x );
75
76 bl1_zamax( num_elem,
77 buff_x, inc_x,
78 buff_index );
79
80 break;
81 }
82
83 }
84
85 return FLA_SUCCESS;
86}
FLA_Error FLA_Amax_check(FLA_Obj x, FLA_Obj index)
Definition FLA_Amax_check.c:13
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition FLA_Query.c:400
unsigned int FLA_Check_error_level(void)
Definition FLA_Check.c:18
dim_t FLA_Obj_vector_inc(FLA_Obj obj)
Definition FLA_Query.c:145
dim_t FLA_Obj_vector_dim(FLA_Obj obj)
Definition FLA_Query.c:137
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition FLA_Query.c:13
int FLA_Datatype
Definition FLA_type_defs.h:49
void bl1_samax(int n, float *x, int incx, int *index)
Definition bl1_amax.c:13
void bl1_zamax(int n, dcomplex *x, int incx, int *index)
Definition bl1_amax.c:46
void bl1_damax(int n, double *x, int incx, int *index)
Definition bl1_amax.c:24
void bl1_camax(int n, scomplex *x, int incx, int *index)
Definition bl1_amax.c:35
Definition blis_type_defs.h:138
Definition blis_type_defs.h:133

References bl1_camax(), bl1_damax(), bl1_samax(), bl1_zamax(), FLA_Amax_check(), FLA_Check_error_level(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_vector_dim(), and FLA_Obj_vector_inc().

Referenced by FLA_Amax(), FLA_LU_piv_unb_var3(), FLA_LU_piv_unb_var3b(), FLA_LU_piv_unb_var4(), FLA_LU_piv_unb_var5(), FLA_QR_UT_piv_unb_var1(), and FLA_QR_UT_piv_unb_var2().

◆ FLA_Asum()

FLA_Error FLA_Asum ( FLA_Obj x,
FLA_Obj asum_x )
14{
15 return FLA_Asum_external( x, asum_x );
16}
FLA_Error FLA_Asum_external(FLA_Obj x, FLA_Obj asum_x)
Definition FLA_Asum_external.c:13

References FLA_Asum_external().

Referenced by FLA_Norm1(), and FLA_Norm_inf().

◆ FLA_Asum_check()

FLA_Error FLA_Asum_check ( FLA_Obj x,
FLA_Obj asum_x )
14{
15 FLA_Error e_val;
16
17 e_val = FLA_Check_floating_object( x );
18 FLA_Check_error_code( e_val );
19
21 FLA_Check_error_code( e_val );
22
23// e_val = FLA_Check_real_object( asum_x );
24// FLA_Check_error_code( e_val );
25
26 e_val = FLA_Check_identical_object_precision( x, asum_x );
27 FLA_Check_error_code( e_val );
28
29 e_val = FLA_Check_if_scalar( asum_x );
30 FLA_Check_error_code( e_val );
31
32 e_val = FLA_Check_if_vector( x );
33 FLA_Check_error_code( e_val );
34
35 return FLA_SUCCESS;
36}
FLA_Error FLA_Check_identical_object_precision(FLA_Obj A, FLA_Obj B)
Definition FLA_Check.c:298

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

Referenced by FLA_Asum_external().

◆ FLA_Asum_external()

FLA_Error FLA_Asum_external ( FLA_Obj x,
FLA_Obj asum_x )
14{
15 FLA_Datatype datatype;
16 FLA_Datatype dt_asum;
17 int num_elem;
18 int inc_x;
19
20 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
21 FLA_Asum_check( x, asum_x );
22
23 if ( FLA_Obj_has_zero_dim( x ) )
24 {
25 FLA_Set( FLA_ZERO, asum_x );
26 return FLA_SUCCESS;
27 }
28
29 dt_asum = FLA_Obj_datatype( asum_x );
30 datatype = FLA_Obj_datatype( x );
31
32 inc_x = FLA_Obj_vector_inc( x );
33 num_elem = FLA_Obj_vector_dim( x );
34
35
36 switch ( datatype ){
37
38 case FLA_FLOAT:
39 {
40 float *buff_x = ( float * ) FLA_FLOAT_PTR( x );
41 float *buff_asum_x = ( float * ) FLA_FLOAT_PTR( asum_x );
42
43 bl1_sasum( num_elem,
44 buff_x, inc_x,
45 buff_asum_x );
46
47 break;
48 }
49
50 case FLA_DOUBLE:
51 {
52 double *buff_x = ( double * ) FLA_DOUBLE_PTR( x );
53 double *buff_asum_x = ( double * ) FLA_DOUBLE_PTR( asum_x );
54
55 bl1_dasum( num_elem,
56 buff_x, inc_x,
57 buff_asum_x );
58
59 break;
60 }
61
62 case FLA_COMPLEX:
63 {
64 if ( dt_asum == FLA_FLOAT )
65 {
66 scomplex *buff_x = ( scomplex * ) FLA_COMPLEX_PTR( x );
67 float *buff_asum_x = ( float * ) FLA_FLOAT_PTR( asum_x );
68
69 bl1_casum( num_elem,
70 buff_x, inc_x,
71 buff_asum_x );
72 }
73 else if ( dt_asum == FLA_COMPLEX )
74 {
75 scomplex *buff_x = ( scomplex * ) FLA_COMPLEX_PTR( x );
76 scomplex *buff_asum_x = ( scomplex * ) FLA_COMPLEX_PTR( asum_x );
77
78 bl1_casum( num_elem,
79 buff_x, inc_x,
80 &(buff_asum_x->real) );
81 buff_asum_x->imag = 0.0F;
82 }
83
84 break;
85 }
86
87 case FLA_DOUBLE_COMPLEX:
88 {
89 if ( dt_asum == FLA_DOUBLE )
90 {
91 dcomplex *buff_x = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( x );
92 double *buff_asum_x = ( double * ) FLA_DOUBLE_PTR( asum_x );
93
94 bl1_zasum( num_elem,
95 buff_x, inc_x,
96 buff_asum_x );
97 }
98 else if ( dt_asum == FLA_DOUBLE_COMPLEX )
99 {
100 dcomplex *buff_x = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( x );
101 dcomplex *buff_asum_x = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( asum_x );
102
103 bl1_zasum( num_elem,
104 buff_x, inc_x,
105 &(buff_asum_x->real) );
106 buff_asum_x->imag = 0.0;
107 }
108
109 break;
110 }
111
112 }
113
114 return FLA_SUCCESS;
115}
FLA_Error FLA_Asum_check(FLA_Obj x, FLA_Obj asum_x)
Definition FLA_Asum_check.c:13
FLA_Obj FLA_ZERO
Definition FLA_Init.c:20
FLA_Error FLA_Set(FLA_Obj alpha, FLA_Obj A)
Definition FLA_Set.c:13
void bl1_zasum(int n, dcomplex *x, int incx, double *norm)
Definition bl1_asum.c:46
void bl1_casum(int n, scomplex *x, int incx, float *norm)
Definition bl1_asum.c:35
void bl1_sasum(int n, float *x, int incx, float *norm)
Definition bl1_asum.c:13
void bl1_dasum(int n, double *x, int incx, double *norm)
Definition bl1_asum.c:24
double real
Definition blis_type_defs.h:139
double imag
Definition blis_type_defs.h:139
float imag
Definition blis_type_defs.h:134
float real
Definition blis_type_defs.h:134

References bl1_casum(), bl1_dasum(), bl1_sasum(), bl1_zasum(), FLA_Asum_check(), FLA_Check_error_level(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_vector_dim(), FLA_Obj_vector_inc(), FLA_Set(), FLA_ZERO, dcomplex::imag, scomplex::imag, dcomplex::real, and scomplex::real.

Referenced by FLA_Asum().

◆ FLA_Axpy()

FLA_Error FLA_Axpy ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B )
16{
17 FLA_Error r_val;
18
19#ifdef FLA_ENABLE_BLAS1_FRONT_END_CNTL_TREES
20 // Check parameters.
21 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
22 FLA_Axpy_check( alpha, A, B );
23
24 // Invoke FLA_Axpy_internal() with flat control tree that simply calls
25 // external wrapper.
26 r_val = FLA_Axpy_internal( alpha, A, B, fla_axpy_cntl_blas );
27
28#else
29 r_val = FLA_Axpy_external( alpha, A, B );
30#endif
31
32 return r_val;
33}
fla_axpy_t * fla_axpy_cntl_blas
Definition FLA_Axpy_cntl_init.c:13
FLA_Error FLA_Axpy_internal(FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_axpy_t *cntl)
Definition FLA_Axpy_internal.c:16
FLA_Error FLA_Axpy_check(FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
Definition FLA_Axpy_check.c:13
FLA_Error FLA_Axpy_external(FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
Definition FLA_Axpy_external.c:13

References FLA_Axpy_check(), fla_axpy_cntl_blas, FLA_Axpy_external(), FLA_Axpy_internal(), and FLA_Check_error_level().

Referenced by FLA_Bidiag_UT_u_step_unb_var3(), FLA_Bidiag_UT_u_step_unb_var4(), FLA_Bidiag_UT_u_step_unb_var5(), FLA_Fill_with_random_dist(), FLA_Hess_UT_step_unb_var2(), FLA_Hess_UT_step_unb_var3(), FLA_Hess_UT_step_unb_var4(), FLA_QR_UT_piv_colnorm(), FLA_Tridiag_UT_l_step_unb_var1(), FLA_Tridiag_UT_l_step_unb_var2(), and FLA_Tridiag_UT_l_step_unb_var3().

◆ FLA_Axpy_check()

FLA_Error FLA_Axpy_check ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B )
14{
15 FLA_Error e_val;
16
17 e_val = FLA_Check_floating_object( A );
18 FLA_Check_error_code( e_val );
19
21 FLA_Check_error_code( e_val );
22
24 FLA_Check_error_code( e_val );
25
26 e_val = FLA_Check_consistent_object_datatype( A, alpha );
27 FLA_Check_error_code( e_val );
28
29 if ( FLA_Obj_is_vector( A ) && FLA_Obj_is_vector( B ) )
30 {
31 e_val = FLA_Check_equal_vector_dims( A, B );
32 FLA_Check_error_code( e_val );
33 }
34 else
35 {
36 e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, B );
37 FLA_Check_error_code( e_val );
38 }
39
40 return FLA_SUCCESS;
41}
FLA_Error FLA_Check_conformal_dims(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition FLA_Check.c:393
FLA_Bool FLA_Obj_is_vector(FLA_Obj A)
Definition FLA_Query.c:388
FLA_Error FLA_Check_consistent_object_datatype(FLA_Obj A, FLA_Obj B)
Definition FLA_Check.c:339
FLA_Error FLA_Check_equal_vector_dims(FLA_Obj x, FLA_Obj y)
Definition FLA_Check.c:477
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_consistent_object_datatype(), FLA_Check_equal_vector_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), and FLA_Obj_is_vector().

Referenced by FLA_Axpy(), FLA_Axpy_external(), FLA_Axpy_external_gpu(), and FLASH_Axpy().

◆ FLA_Axpy_external()

FLA_Error FLA_Axpy_external ( FLA_Obj alpha,
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;
19 trans1_t blis_trans;
20
21 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
22 FLA_Axpy_check( alpha, A, B );
23
24 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
25
26 datatype = FLA_Obj_datatype( A );
27
28 rs_A = FLA_Obj_row_stride( A );
29 cs_A = FLA_Obj_col_stride( A );
30
31 m_B = FLA_Obj_length( B );
32 n_B = FLA_Obj_width( B );
33 rs_B = FLA_Obj_row_stride( B );
34 cs_B = FLA_Obj_col_stride( B );
35
36 if ( FLA_Obj_is_conformal_to( FLA_NO_TRANSPOSE, A, B ) )
37 FLA_Param_map_flame_to_blis_trans( FLA_NO_TRANSPOSE, &blis_trans );
38 else // if ( FLA_Obj_is_conformal_to( FLA_TRANSPOSE, A, B ) )
39 FLA_Param_map_flame_to_blis_trans( FLA_TRANSPOSE, &blis_trans );
40
41 switch ( datatype ){
42
43 case FLA_FLOAT:
44 {
45 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
46 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
47 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
48
49 bl1_saxpymt( blis_trans,
50 m_B,
51 n_B,
52 buff_alpha,
53 buff_A, rs_A, cs_A,
54 buff_B, rs_B, cs_B );
55
56 break;
57 }
58
59 case FLA_DOUBLE:
60 {
61 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
62 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
63 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
64
65 bl1_daxpymt( blis_trans,
66 m_B,
67 n_B,
68 buff_alpha,
69 buff_A, rs_A, cs_A,
70 buff_B, rs_B, cs_B );
71
72 break;
73 }
74
75 case FLA_COMPLEX:
76 {
77 scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha );
78 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
79 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
80
81 bl1_caxpymt( blis_trans,
82 m_B,
83 n_B,
84 buff_alpha,
85 buff_A, rs_A, cs_A,
86 buff_B, rs_B, cs_B );
87
88 break;
89 }
90
91 case FLA_DOUBLE_COMPLEX:
92 {
93 dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
94 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
95 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
96
97 bl1_zaxpymt( blis_trans,
98 m_B,
99 n_B,
100 buff_alpha,
101 buff_A, rs_A, cs_A,
102 buff_B, rs_B, cs_B );
103
104 break;
105 }
106
107 }
108
109 return FLA_SUCCESS;
110}
FLA_Bool FLA_Obj_is_conformal_to(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition FLA_Query.c:438
dim_t FLA_Obj_width(FLA_Obj obj)
Definition FLA_Query.c:123
dim_t FLA_Obj_row_stride(FLA_Obj obj)
Definition FLA_Query.c:167
dim_t FLA_Obj_length(FLA_Obj obj)
Definition FLA_Query.c:116
void FLA_Param_map_flame_to_blis_trans(FLA_Trans trans, trans1_t *blis_trans)
Definition FLA_Param.c:245
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition FLA_Query.c:174
void bl1_zaxpymt(trans1_t trans, int m, int n, dcomplex *alpha, dcomplex *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
Definition bl1_axpymt.c:248
void bl1_daxpymt(trans1_t trans, int m, int n, double *alpha, double *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
Definition bl1_axpymt.c:81
void bl1_saxpymt(trans1_t trans, int m, int n, float *alpha, float *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
Definition bl1_axpymt.c:13
void bl1_caxpymt(trans1_t trans, int m, int n, scomplex *alpha, scomplex *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
Definition bl1_axpymt.c:149
trans1_t
Definition blis_type_defs.h:53

References bl1_caxpymt(), bl1_daxpymt(), bl1_saxpymt(), bl1_zaxpymt(), FLA_Axpy_check(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_is_conformal_to(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), and FLA_Param_map_flame_to_blis_trans().

Referenced by FLA_Apply_H2_UT_l_unb_var1(), FLA_Apply_H2_UT_piv_row(), FLA_Apply_H2_UT_r_unb_var1(), FLA_Apply_HUD_UT_lh_unb_var1(), FLA_Axpy(), FLA_Axpy_task(), FLA_Eig_gest_il_unb_var1(), FLA_Eig_gest_il_unb_var2(), FLA_Eig_gest_il_unb_var3(), FLA_Eig_gest_il_unb_var4(), FLA_Eig_gest_il_unb_var5(), FLA_Eig_gest_iu_unb_var1(), FLA_Eig_gest_iu_unb_var2(), FLA_Eig_gest_iu_unb_var3(), FLA_Eig_gest_iu_unb_var4(), FLA_Eig_gest_iu_unb_var5(), FLA_Eig_gest_nl_unb_var1(), FLA_Eig_gest_nl_unb_var2(), FLA_Eig_gest_nl_unb_var4(), FLA_Eig_gest_nl_unb_var5(), FLA_Eig_gest_nu_unb_var1(), FLA_Eig_gest_nu_unb_var2(), FLA_Eig_gest_nu_unb_var4(), FLA_Eig_gest_nu_unb_var5(), FLA_Trmvsx_external(), FLA_Trsvsx_external(), and FLASH_Axpy_hierarchy().

◆ FLA_Axpy_external_gpu()

FLA_Error FLA_Axpy_external_gpu ( FLA_Obj alpha,
FLA_Obj A,
void * A_gpu,
FLA_Obj B,
void * B_gpu )
18{
19 FLA_Datatype datatype;
20 int m_B, n_B;
21 int ldim_A, inc_A;
22 int ldim_B, inc_B;
23 int i;
24
25 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
26 FLA_Axpy_check( alpha, A, B );
27
28 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
29
30 datatype = FLA_Obj_datatype( A );
31
32 ldim_A = FLA_Obj_length( A );
33 inc_A = 1;
34
35 m_B = FLA_Obj_length( B );
36 n_B = FLA_Obj_width( B );
37 ldim_B = FLA_Obj_length( B );
38 inc_B = 1;
39
40 switch ( datatype ){
41
42 case FLA_FLOAT:
43 {
44 float* buff_alpha = ( float* ) FLA_FLOAT_PTR( alpha );
45 float* buff_A_gpu = ( float* ) A_gpu;
46 float* buff_B_gpu = ( float* ) B_gpu;
47
48 for ( i = 0; i < n_B; i++ )
49 cublasSaxpy( m_B,
50 *buff_alpha,
51 buff_A_gpu + i * ldim_A, inc_A,
52 buff_B_gpu + i * ldim_B, inc_B );
53
54 break;
55 }
56
57 case FLA_DOUBLE:
58 {
59 double* buff_alpha = ( double* ) FLA_DOUBLE_PTR( alpha );
60 double* buff_A_gpu = ( double* ) A_gpu;
61 double* buff_B_gpu = ( double* ) B_gpu;
62
63 for ( i = 0; i < n_B; i++ )
64 cublasDaxpy( m_B,
65 *buff_alpha,
66 buff_A_gpu + i * ldim_A, inc_A,
67 buff_B_gpu + i * ldim_B, inc_B );
68
69 break;
70 }
71
72 case FLA_COMPLEX:
73 {
74 cuComplex* buff_alpha = ( cuComplex* ) FLA_COMPLEX_PTR( alpha );
75 cuComplex* buff_A_gpu = ( cuComplex* ) A_gpu;
76 cuComplex* buff_B_gpu = ( cuComplex* ) B_gpu;
77
78 for ( i = 0; i < n_B; i++ )
79 cublasCaxpy( m_B,
80 *buff_alpha,
81 buff_A_gpu + i * ldim_A, inc_A,
82 buff_B_gpu + i * ldim_B, inc_B );
83
84 break;
85 }
86
87 case FLA_DOUBLE_COMPLEX:
88 {
89 cuDoubleComplex* buff_alpha = ( cuDoubleComplex* ) FLA_DOUBLE_COMPLEX_PTR( alpha );
90 cuDoubleComplex* buff_A_gpu = ( cuDoubleComplex* ) A_gpu;
91 cuDoubleComplex* buff_B_gpu = ( cuDoubleComplex* ) B_gpu;
92
93 for ( i = 0; i < n_B; i++ )
94 cublasZaxpy( m_B,
95 *buff_alpha,
96 buff_A_gpu + i * ldim_A, inc_A,
97 buff_B_gpu + i * ldim_B, inc_B );
98
99 break;
100 }
101
102 }
103
104 return FLA_SUCCESS;
105}
int i
Definition bl1_axmyv2.c:145

References FLA_Axpy_check(), FLA_Check_error_level(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_width(), and i.

Referenced by FLASH_Queue_exec_task_gpu().

◆ FLA_Axpy_internal_check()

FLA_Error FLA_Axpy_internal_check ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_axpy_t * cntl )
14{
15 FLA_Error e_val;
16
17 // Abort if the control structure is NULL.
18 e_val = FLA_Check_null_pointer( ( void* ) cntl );
19 FLA_Check_error_code( e_val );
20
21 // Verify that the object element types are identical.
23 FLA_Check_error_code( e_val );
24
25 // Verify conformality between all the objects. This check works regardless
26 // of whether the element type is FLA_MATRIX or FLA_SCALAR because the
27 // element length and width are used instead of scalar length and width.
28 e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, B );
29 FLA_Check_error_code( e_val );
30
31 return FLA_SUCCESS;
32}
FLA_Error FLA_Check_null_pointer(void *ptr)
Definition FLA_Check.c:518
FLA_Error FLA_Check_identical_object_elemtype(FLA_Obj A, FLA_Obj B)
Definition FLA_Check.c:987

References FLA_Check_conformal_dims(), FLA_Check_identical_object_elemtype(), and FLA_Check_null_pointer().

Referenced by FLA_Axpy_internal().

◆ FLA_Axpy_task()

FLA_Error FLA_Axpy_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_axpy_t * cntl )
14{
15 return FLA_Axpy_external( alpha, A, B );
16}

References FLA_Axpy_external().

Referenced by FLA_Axpy_internal(), FLASH_Queue_exec_task(), and FLASH_Queue_exec_task_gpu().

◆ FLA_Axpyrt()

FLA_Error FLA_Axpyrt ( FLA_Uplo uplo,
FLA_Trans trans,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B )
14{
15 return FLA_Axpyrt_external( uplo, trans, alpha, A, B );
16}
FLA_Error FLA_Axpyrt_external(FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
Definition FLA_Axpyrt_external.c:13

References FLA_Axpyrt_external().

◆ FLA_Axpyrt_check()

FLA_Error FLA_Axpyrt_check ( FLA_Uplo uplo,
FLA_Trans trans,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B )
14{
15 FLA_Error e_val;
16
17 e_val = FLA_Check_valid_trans( uplo );
18 FLA_Check_error_code( e_val );
19
20 e_val = FLA_Check_valid_trans( trans );
21 FLA_Check_error_code( e_val );
22
23 e_val = FLA_Check_floating_object( A );
24 FLA_Check_error_code( e_val );
25
27 FLA_Check_error_code( e_val );
28
30 FLA_Check_error_code( e_val );
31
32 e_val = FLA_Check_consistent_object_datatype( A, alpha );
33 FLA_Check_error_code( e_val );
34
35 e_val = FLA_Check_if_scalar( alpha );
36 FLA_Check_error_code( e_val );
37
38 e_val = FLA_Check_conformal_dims( trans, A, B );
39 FLA_Check_error_code( e_val );
40
41 return FLA_SUCCESS;
42}
FLA_Error FLA_Check_valid_trans(FLA_Trans trans)
Definition FLA_Check.c:87

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

Referenced by FLA_Axpyrt_external().

◆ FLA_Axpyrt_external()

FLA_Error FLA_Axpyrt_external ( FLA_Uplo uplo,
FLA_Trans trans,
FLA_Obj alpha,
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;
19 uplo1_t blis_uplo;
20 trans1_t blis_trans;
21
22 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
23 FLA_Axpyrt_check( uplo, trans, alpha, A, B );
24
25 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
26
27 datatype = FLA_Obj_datatype( A );
28
29 rs_A = FLA_Obj_row_stride( A );
30 cs_A = FLA_Obj_col_stride( A );
31
32 m_B = FLA_Obj_length( B );
33 n_B = FLA_Obj_width( B );
34 rs_B = FLA_Obj_row_stride( B );
35 cs_B = FLA_Obj_col_stride( B );
36
37 FLA_Param_map_flame_to_blis_uplo( uplo, &blis_uplo );
38 FLA_Param_map_flame_to_blis_trans( trans, &blis_trans );
39
40 switch ( datatype ){
41
42 case FLA_FLOAT:
43 {
44 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
45 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
46 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
47
48 bl1_saxpymrt( blis_uplo,
49 blis_trans,
50 m_B,
51 n_B,
52 buff_alpha,
53 buff_A, rs_A, cs_A,
54 buff_B, rs_B, cs_B );
55
56 break;
57 }
58
59 case FLA_DOUBLE:
60 {
61 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
62 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
63 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
64
65 bl1_daxpymrt( blis_uplo,
66 blis_trans,
67 m_B,
68 n_B,
69 buff_alpha,
70 buff_A, rs_A, cs_A,
71 buff_B, rs_B, cs_B );
72
73 break;
74 }
75
76 case FLA_COMPLEX:
77 {
78 scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha );
79 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
80 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
81
82 bl1_caxpymrt( blis_uplo,
83 blis_trans,
84 m_B,
85 n_B,
86 buff_alpha,
87 buff_A, rs_A, cs_A,
88 buff_B, rs_B, cs_B );
89
90 break;
91 }
92
93 case FLA_DOUBLE_COMPLEX:
94 {
95 dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
96 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
97 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
98
99 bl1_zaxpymrt( blis_uplo,
100 blis_trans,
101 m_B,
102 n_B,
103 buff_alpha,
104 buff_A, rs_A, cs_A,
105 buff_B, rs_B, cs_B );
106
107 break;
108 }
109
110 }
111
112 return FLA_SUCCESS;
113}
FLA_Error FLA_Axpyrt_check(FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
Definition FLA_Axpyrt_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_zaxpymrt(uplo1_t uplo, trans1_t trans, int m, int n, dcomplex *alpha, dcomplex *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
Definition bl1_axpymrt.c:334
void bl1_daxpymrt(uplo1_t uplo, trans1_t trans, int m, int n, double *alpha, double *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
Definition bl1_axpymrt.c:120
void bl1_saxpymrt(uplo1_t uplo, trans1_t trans, int m, int n, float *alpha, float *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
Definition bl1_axpymrt.c:13
void bl1_caxpymrt(uplo1_t uplo, trans1_t trans, int m, int n, scomplex *alpha, scomplex *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
Definition bl1_axpymrt.c:227
uplo1_t
Definition blis_type_defs.h:61

References bl1_caxpymrt(), bl1_daxpymrt(), bl1_saxpymrt(), bl1_zaxpymrt(), FLA_Axpyrt_check(), 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(), and FLA_Param_map_flame_to_blis_uplo().

Referenced by FLA_Axpyrt().

◆ FLA_Axpys()

FLA_Error FLA_Axpys ( FLA_Obj alpha0,
FLA_Obj alpha1,
FLA_Obj A,
FLA_Obj beta,
FLA_Obj B )
14{
15 return FLA_Axpys_external( alpha0, alpha1, A, beta, B );
16}
FLA_Error FLA_Axpys_external(FLA_Obj alpha0, FLA_Obj alpha1, FLA_Obj A, FLA_Obj beta, FLA_Obj B)
Definition FLA_Axpys_external.c:13
double *restrict alpha1
Definition bl1_axpyv2bdotaxpy.c:198

References alpha1, and FLA_Axpys_external().

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

◆ FLA_Axpys_check()

FLA_Error FLA_Axpys_check ( FLA_Obj alpha0,
FLA_Obj alpha1,
FLA_Obj A,
FLA_Obj beta,
FLA_Obj B )
14{
15 FLA_Error e_val;
16
17 e_val = FLA_Check_floating_object( A );
18 FLA_Check_error_code( e_val );
19
21 FLA_Check_error_code( e_val );
22
24 FLA_Check_error_code( e_val );
25
26 e_val = FLA_Check_consistent_object_datatype( A, alpha0 );
27 FLA_Check_error_code( e_val );
28
30 FLA_Check_error_code( e_val );
31
32 e_val = FLA_Check_consistent_object_datatype( A, beta );
33 FLA_Check_error_code( e_val );
34
35 e_val = FLA_Check_if_scalar( alpha0 );
36 FLA_Check_error_code( e_val );
37
38 e_val = FLA_Check_if_scalar( alpha1 );
39 FLA_Check_error_code( e_val );
40
41 e_val = FLA_Check_if_scalar( beta );
42 FLA_Check_error_code( e_val );
43
44 e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, B );
45 FLA_Check_error_code( e_val );
46
47 return FLA_SUCCESS;
48}

References alpha1, FLA_Check_conformal_dims(), FLA_Check_consistent_object_datatype(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_scalar(), and FLA_Check_nonconstant_object().

Referenced by FLA_Axpys_external().

◆ FLA_Axpys_external()

FLA_Error FLA_Axpys_external ( FLA_Obj alpha0,
FLA_Obj alpha1,
FLA_Obj A,
FLA_Obj beta,
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;
19 trans1_t blis_trans;
20
21 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
22 FLA_Axpys_check( alpha0, alpha1, A, beta, B );
23
24 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
25
26 datatype = FLA_Obj_datatype( A );
27
28 rs_A = FLA_Obj_row_stride( A );
29 cs_A = FLA_Obj_col_stride( A );
30
31 m_B = FLA_Obj_length( B );
32 n_B = FLA_Obj_width( B );
33 rs_B = FLA_Obj_row_stride( B );
34 cs_B = FLA_Obj_col_stride( B );
35
36 FLA_Param_map_flame_to_blis_trans( FLA_NO_TRANSPOSE, &blis_trans );
37
38 switch ( datatype ){
39
40 case FLA_FLOAT:
41 {
42 float *buff_alpha0 = ( float * ) FLA_FLOAT_PTR( alpha0 );
43 float *buff_alpha1 = ( float * ) FLA_FLOAT_PTR( alpha1 );
44 float *buff_beta = ( float * ) FLA_FLOAT_PTR( beta );
45 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
46 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
47
48 bl1_saxpysmt( blis_trans,
49 m_B,
50 n_B,
51 buff_alpha0,
52 buff_alpha1,
53 buff_A, rs_A, cs_A,
54 buff_beta,
55 buff_B, rs_B, cs_B );
56
57 break;
58 }
59
60 case FLA_DOUBLE:
61 {
62 double *buff_alpha0 = ( double * ) FLA_DOUBLE_PTR( alpha0 );
63 double *buff_alpha1 = ( double * ) FLA_DOUBLE_PTR( alpha1 );
64 double *buff_beta = ( double * ) FLA_DOUBLE_PTR( beta );
65 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
66 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
67
68 bl1_daxpysmt( blis_trans,
69 m_B,
70 n_B,
71 buff_alpha0,
72 buff_alpha1,
73 buff_A, rs_A, cs_A,
74 buff_beta,
75 buff_B, rs_B, cs_B );
76
77 break;
78 }
79
80 case FLA_COMPLEX:
81 {
82 scomplex *buff_alpha0 = ( scomplex * ) FLA_COMPLEX_PTR( alpha0 );
83 scomplex *buff_alpha1 = ( scomplex * ) FLA_COMPLEX_PTR( alpha1 );
84 scomplex *buff_beta = ( scomplex * ) FLA_COMPLEX_PTR( beta );
85 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
86 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
87
88 bl1_caxpysmt( blis_trans,
89 m_B,
90 n_B,
91 buff_alpha0,
92 buff_alpha1,
93 buff_A, rs_A, cs_A,
94 buff_beta,
95 buff_B, rs_B, cs_B );
96
97 break;
98 }
99
100 case FLA_DOUBLE_COMPLEX:
101 {
102 dcomplex *buff_alpha0 = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha0 );
103 dcomplex *buff_alpha1 = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha1 );
104 dcomplex *buff_beta = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( beta );
105 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
106 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
107
108 bl1_zaxpysmt( blis_trans,
109 m_B,
110 n_B,
111 buff_alpha0,
112 buff_alpha1,
113 buff_A, rs_A, cs_A,
114 buff_beta,
115 buff_B, rs_B, cs_B );
116
117 break;
118 }
119
120 }
121
122 return FLA_SUCCESS;
123}
FLA_Error FLA_Axpys_check(FLA_Obj alpha0, FLA_Obj alpha1, FLA_Obj A, FLA_Obj beta, FLA_Obj B)
Definition FLA_Axpys_check.c:13
void bl1_zaxpysmt(trans1_t trans, int m, int n, dcomplex *alpha0, dcomplex *alpha1, dcomplex *a, int a_rs, int a_cs, dcomplex *beta, dcomplex *b, int b_rs, int b_cs)
Definition bl1_axpysmt.c:273
void bl1_saxpysmt(trans1_t trans, int m, int n, float *alpha0, float *alpha1, float *a, int a_rs, int a_cs, float *beta, float *b, int b_rs, int b_cs)
Definition bl1_axpysmt.c:13
void bl1_caxpysmt(trans1_t trans, int m, int n, scomplex *alpha0, scomplex *alpha1, scomplex *a, int a_rs, int a_cs, scomplex *beta, scomplex *b, int b_rs, int b_cs)
Definition bl1_axpysmt.c:163
void bl1_daxpysmt(trans1_t trans, int m, int n, double *alpha0, double *alpha1, double *a, int a_rs, int a_cs, double *beta, double *b, int b_rs, int b_cs)
Definition bl1_axpysmt.c:88

References alpha1, bl1_caxpysmt(), bl1_daxpysmt(), bl1_saxpysmt(), bl1_zaxpysmt(), FLA_Axpys_check(), 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(), and FLA_Param_map_flame_to_blis_trans().

Referenced by FLA_Axpys(), FLA_Hemm_ll_unb_var1(), FLA_Hemm_ll_unb_var2(), FLA_Hemm_ll_unb_var3(), FLA_Hemm_ll_unb_var4(), FLA_Hemm_ll_unb_var5(), FLA_Hemm_ll_unb_var6(), FLA_Hemm_ll_unb_var7(), FLA_Hemm_ll_unb_var8(), FLA_Hemm_lu_unb_var1(), FLA_Hemm_lu_unb_var2(), FLA_Hemm_lu_unb_var3(), FLA_Hemm_lu_unb_var4(), FLA_Hemm_lu_unb_var5(), FLA_Hemm_lu_unb_var6(), FLA_Hemm_lu_unb_var7(), FLA_Hemm_lu_unb_var8(), FLA_Hemm_rl_unb_var1(), FLA_Hemm_rl_unb_var2(), FLA_Hemm_rl_unb_var3(), FLA_Hemm_rl_unb_var4(), FLA_Hemm_rl_unb_var5(), FLA_Hemm_rl_unb_var6(), FLA_Hemm_rl_unb_var7(), FLA_Hemm_rl_unb_var8(), FLA_Hemm_ru_unb_var1(), FLA_Hemm_ru_unb_var2(), FLA_Hemm_ru_unb_var3(), FLA_Hemm_ru_unb_var4(), FLA_Hemm_ru_unb_var5(), FLA_Hemm_ru_unb_var6(), FLA_Hemm_ru_unb_var7(), FLA_Hemm_ru_unb_var8(), FLA_Symm_ll_unb_var1(), FLA_Symm_ll_unb_var2(), FLA_Symm_ll_unb_var3(), FLA_Symm_ll_unb_var4(), FLA_Symm_ll_unb_var5(), FLA_Symm_ll_unb_var6(), FLA_Symm_ll_unb_var7(), FLA_Symm_ll_unb_var8(), FLA_Symm_lu_unb_var1(), FLA_Symm_lu_unb_var2(), FLA_Symm_lu_unb_var3(), FLA_Symm_lu_unb_var4(), FLA_Symm_lu_unb_var5(), FLA_Symm_lu_unb_var6(), FLA_Symm_lu_unb_var7(), FLA_Symm_lu_unb_var8(), FLA_Symm_rl_unb_var1(), FLA_Symm_rl_unb_var2(), FLA_Symm_rl_unb_var3(), FLA_Symm_rl_unb_var4(), FLA_Symm_rl_unb_var5(), FLA_Symm_rl_unb_var6(), FLA_Symm_rl_unb_var7(), FLA_Symm_rl_unb_var8(), FLA_Symm_ru_unb_var1(), FLA_Symm_ru_unb_var2(), FLA_Symm_ru_unb_var3(), FLA_Symm_ru_unb_var4(), FLA_Symm_ru_unb_var5(), FLA_Symm_ru_unb_var6(), FLA_Symm_ru_unb_var7(), and FLA_Symm_ru_unb_var8().

◆ FLA_Axpyt()

FLA_Error FLA_Axpyt ( FLA_Trans trans,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B )
16{
17 FLA_Error r_val;
18
19#ifdef FLA_ENABLE_BLAS1_FRONT_END_CNTL_TREES
20 // Check parameters.
21 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
22 FLA_Axpyt_check( trans, alpha, A, B );
23
24 // Invoke FLA_Axpyt_internal() with flat control tree that simply calls
25 // external wrapper.
26 r_val = FLA_Axpyt_internal( trans, alpha, A, B, fla_axpyt_cntl_blas );
27
28#else
29 r_val = FLA_Axpyt_external( trans, alpha, A, B );
30#endif
31
32 return r_val;
33}
fla_axpyt_t * fla_axpyt_cntl_blas
Definition FLA_Axpyt_cntl_init.c:13
FLA_Error FLA_Axpyt_internal(FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_axpyt_t *cntl)
Definition FLA_Axpyt_internal.c:16
FLA_Error FLA_Axpyt_check(FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
Definition FLA_Axpyt_check.c:13
FLA_Error FLA_Axpyt_external(FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
Definition FLA_Axpyt_external.c:13

References FLA_Axpyt_check(), fla_axpyt_cntl_blas, FLA_Axpyt_external(), FLA_Axpyt_internal(), and FLA_Check_error_level().

Referenced by FLA_Bidiag_UT_u_step_unb_var2(), FLA_Bidiag_UT_u_step_unb_var3(), FLA_Bidiag_UT_u_step_unb_var4(), FLA_Bidiag_UT_u_step_unb_var5(), FLA_Hess_UT_step_unb_var2(), FLA_Hess_UT_step_unb_var3(), FLA_Hess_UT_step_unb_var4(), FLA_Hess_UT_step_unb_var5(), and FLA_Tridiag_UT_l_step_unb_var2().

◆ FLA_Axpyt_c_task()

FLA_Error FLA_Axpyt_c_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_axpyt_t * cntl )
29{
30 return FLA_Axpyt_external( FLA_CONJ_NO_TRANSPOSE, alpha, A, B );
31}

References FLA_Axpyt_external().

Referenced by FLA_Axpyt_c().

◆ FLA_Axpyt_check()

FLA_Error FLA_Axpyt_check ( FLA_Trans trans,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B )
14{
15 FLA_Error e_val;
16
17 e_val = FLA_Check_valid_trans( trans );
18 FLA_Check_error_code( e_val );
19
20 e_val = FLA_Check_floating_object( A );
21 FLA_Check_error_code( e_val );
22
24 FLA_Check_error_code( e_val );
25
27 FLA_Check_error_code( e_val );
28
29 e_val = FLA_Check_consistent_object_datatype( A, alpha );
30 FLA_Check_error_code( e_val );
31
32 e_val = FLA_Check_if_scalar( alpha );
33 FLA_Check_error_code( e_val );
34
35 e_val = FLA_Check_conformal_dims( trans, A, B );
36 FLA_Check_error_code( e_val );
37
38 return FLA_SUCCESS;
39}

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

Referenced by FLA_Axpyt(), FLA_Axpyt_external(), and FLASH_Axpyt().

◆ FLA_Axpyt_external()

FLA_Error FLA_Axpyt_external ( FLA_Trans trans,
FLA_Obj alpha,
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;
19 trans1_t blis_trans;
20
21 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
22 FLA_Axpyt_check( trans, alpha, A, B );
23
24 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
25
26 datatype = FLA_Obj_datatype( A );
27
28 rs_A = FLA_Obj_row_stride( A );
29 cs_A = FLA_Obj_col_stride( A );
30
31 m_B = FLA_Obj_length( B );
32 n_B = FLA_Obj_width( B );
33 rs_B = FLA_Obj_row_stride( B );
34 cs_B = FLA_Obj_col_stride( B );
35
36 FLA_Param_map_flame_to_blis_trans( trans, &blis_trans );
37
38 switch ( datatype ){
39
40 case FLA_FLOAT:
41 {
42 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
43 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
44 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
45
46 bl1_saxpymt( blis_trans,
47 m_B,
48 n_B,
49 buff_alpha,
50 buff_A, rs_A, cs_A,
51 buff_B, rs_B, cs_B );
52
53 break;
54 }
55
56 case FLA_DOUBLE:
57 {
58 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
59 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
60 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
61
62 bl1_daxpymt( blis_trans,
63 m_B,
64 n_B,
65 buff_alpha,
66 buff_A, rs_A, cs_A,
67 buff_B, rs_B, cs_B );
68
69 break;
70 }
71
72 case FLA_COMPLEX:
73 {
74 scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha );
75 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
76 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
77
78 bl1_caxpymt( blis_trans,
79 m_B,
80 n_B,
81 buff_alpha,
82 buff_A, rs_A, cs_A,
83 buff_B, rs_B, cs_B );
84
85 break;
86 }
87
88 case FLA_DOUBLE_COMPLEX:
89 {
90 dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
91 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
92 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
93
94 bl1_zaxpymt( blis_trans,
95 m_B,
96 n_B,
97 buff_alpha,
98 buff_A, rs_A, cs_A,
99 buff_B, rs_B, cs_B );
100
101 break;
102 }
103
104 }
105
106 return FLA_SUCCESS;
107}

References bl1_caxpymt(), bl1_daxpymt(), bl1_saxpymt(), bl1_zaxpymt(), FLA_Axpyt_check(), 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(), and FLA_Param_map_flame_to_blis_trans().

Referenced by FLA_Axpy_buffer_to_object(), FLA_Axpy_object_to_buffer(), FLA_Axpyt(), FLA_Axpyt_c_task(), FLA_Axpyt_h_task(), FLA_Axpyt_n_task(), FLA_Axpyt_t_task(), and FLA_Axpyt_task().

◆ FLA_Axpyt_h_task()

FLA_Error FLA_Axpyt_h_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_axpyt_t * cntl )
34{
35 return FLA_Axpyt_external( FLA_CONJ_TRANSPOSE, alpha, A, B );
36}

References FLA_Axpyt_external().

Referenced by FLA_Axpyt_h().

◆ FLA_Axpyt_internal_check()

FLA_Error FLA_Axpyt_internal_check ( FLA_Trans trans,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_axpyt_t * cntl )
14{
15 FLA_Error e_val;
16
17 // Abort if the control structure is NULL.
18 e_val = FLA_Check_null_pointer( ( void* ) cntl );
19 FLA_Check_error_code( e_val );
20
21 // Verify that the object element types are identical.
23 FLA_Check_error_code( e_val );
24
25 // Verify conformality between all the objects. This check works regardless
26 // of whether the element type is FLA_MATRIX or FLA_SCALAR because the
27 // element length and width are used instead of scalar length and width.
28 e_val = FLA_Check_conformal_dims( trans, A, B );
29 FLA_Check_error_code( e_val );
30
31 return FLA_SUCCESS;
32}

References FLA_Check_conformal_dims(), FLA_Check_identical_object_elemtype(), and FLA_Check_null_pointer().

Referenced by FLA_Axpyt_internal().

◆ FLA_Axpyt_n_task()

FLA_Error FLA_Axpyt_n_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_axpyt_t * cntl )
19{
20 return FLA_Axpyt_external( FLA_NO_TRANSPOSE, alpha, A, B );
21}

References FLA_Axpyt_external().

Referenced by FLA_Axpyt_n().

◆ FLA_Axpyt_t_task()

FLA_Error FLA_Axpyt_t_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_axpyt_t * cntl )
24{
25 return FLA_Axpyt_external( FLA_TRANSPOSE, alpha, A, B );
26}

References FLA_Axpyt_external().

Referenced by FLA_Axpyt_t().

◆ FLA_Axpyt_task()

FLA_Error FLA_Axpyt_task ( FLA_Trans trans,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_axpyt_t * cntl )
14{
15 return FLA_Axpyt_external( trans, alpha, A, B );
16}

References FLA_Axpyt_external().

Referenced by FLASH_Queue_exec_task().

◆ FLA_Copy()

FLA_Error FLA_Copy ( FLA_Obj A,
FLA_Obj B )
16{
17 FLA_Error r_val;
18
19#ifdef FLA_ENABLE_BLAS1_FRONT_END_CNTL_TREES
20 // Check parameters.
21 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
22 FLA_Copy_check( A, B );
23
24 // Invoke FLA_Copy_internal() with flat control tree that simply calls
25 // external wrapper.
27
28#else
29 r_val = FLA_Copy_external( A, B );
30#endif
31
32 return r_val;
33}
fla_copy_t * fla_copy_cntl_blas
Definition FLA_Copy_cntl_init.c:13
FLA_Error FLA_Copy_internal(FLA_Obj A, FLA_Obj B, fla_copy_t *cntl)
Definition FLA_Copy_internal.c:16
FLA_Error FLA_Copy_check(FLA_Obj A, FLA_Obj B)
Definition FLA_Copy_check.c:13
FLA_Error FLA_Copy_external(FLA_Obj A, FLA_Obj B)
Definition FLA_Copy_external.c:13

References FLA_Check_error_level(), FLA_Copy_check(), fla_copy_cntl_blas, FLA_Copy_external(), and FLA_Copy_internal().

Referenced by FLA_Bidiag_UT_u_blf_var4(), FLA_Bidiag_UT_u_blk_var4(), FLA_Bidiag_UT_u_blk_var5(), FLA_Bidiag_UT_u_step_unb_var2(), FLA_Bidiag_UT_u_step_unb_var3(), 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_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_compute_scaling(), FLA_Hevd_lv_unb_var1(), FLA_Hevd_lv_unb_var2(), FLA_Sort(), FLA_Svd_compute_scaling(), FLA_Svd_ext_u_unb_var1(), FLA_Svd_uv_unb_var1(), FLA_Svd_uv_unb_var2(), FLA_Tevd_external(), FLA_Tridiag_UT_l_step_unb_var1(), FLA_Tridiag_UT_l_step_unb_var2(), and FLA_Tridiag_UT_l_step_unb_var3().

◆ FLA_Copy_check()

FLA_Error FLA_Copy_check ( FLA_Obj A,
FLA_Obj B )
14{
15 FLA_Error e_val;
16
18 FLA_Check_error_code( e_val );
19
21 FLA_Check_error_code( e_val );
22
23 if ( FLA_Obj_is_vector( A ) && FLA_Obj_is_vector( B ) )
24 {
25 e_val = FLA_Check_equal_vector_dims( A, B );
26 FLA_Check_error_code( e_val );
27 }
28 else
29 {
30 e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, B );
31 FLA_Check_error_code( e_val );
32 }
33
34 return FLA_SUCCESS;
35}
FLA_Error FLA_Check_valid_object_datatype(FLA_Obj A)
Definition FLA_Check.c:171

References FLA_Check_conformal_dims(), FLA_Check_equal_vector_dims(), FLA_Check_nonconstant_object(), FLA_Check_valid_object_datatype(), and FLA_Obj_is_vector().

Referenced by FLA_Copy(), FLA_Copy_external(), FLA_Copy_external_gpu(), and FLASH_Copy().

◆ FLA_Copy_external()

FLA_Error FLA_Copy_external ( FLA_Obj A,
FLA_Obj B )
14{
15 FLA_Datatype dt_A;
16 FLA_Datatype dt_B;
17 int m_B, n_B;
18 int rs_A, cs_A;
19 int rs_B, cs_B;
20 trans1_t blis_trans;
21
22 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
23 FLA_Copy_check( A, B );
24
25 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
26
27 dt_A = FLA_Obj_datatype( A );
28 dt_B = FLA_Obj_datatype( B );
29
30 rs_A = FLA_Obj_row_stride( A );
31 cs_A = FLA_Obj_col_stride( A );
32
33 m_B = FLA_Obj_length( B );
34 n_B = FLA_Obj_width( B );
35 rs_B = FLA_Obj_row_stride( B );
36 cs_B = FLA_Obj_col_stride( B );
37
38 if ( FLA_Obj_is_conformal_to( FLA_NO_TRANSPOSE, A, B ) )
39 FLA_Param_map_flame_to_blis_trans( FLA_NO_TRANSPOSE, &blis_trans );
40 else // if ( FLA_Obj_is_conformal_to( FLA_TRANSPOSE, A, B ) )
41 FLA_Param_map_flame_to_blis_trans( FLA_TRANSPOSE, &blis_trans );
42
43 // If A is of type FLA_CONSTANT, then we have to proceed based on the
44 // datatype of B.
45 if ( dt_A == FLA_CONSTANT )
46 {
47 if ( dt_B == FLA_FLOAT )
48 {
49 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
50 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
51
52 bl1_scopymt( blis_trans,
53 m_B,
54 n_B,
55 buff_A, rs_A, cs_A,
56 buff_B, rs_B, cs_B );
57 }
58 else if ( dt_B == FLA_DOUBLE )
59 {
60 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
61 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
62
63 bl1_dcopymt( blis_trans,
64 m_B,
65 n_B,
66 buff_A, rs_A, cs_A,
67 buff_B, rs_B, cs_B );
68 }
69 else if ( dt_B == FLA_COMPLEX )
70 {
71 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
72 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
73
74 bl1_ccopymt( blis_trans,
75 m_B,
76 n_B,
77 buff_A, rs_A, cs_A,
78 buff_B, rs_B, cs_B );
79 }
80 else if ( dt_B == FLA_DOUBLE_COMPLEX )
81 {
82 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
83 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
84
85 bl1_zcopymt( blis_trans,
86 m_B,
87 n_B,
88 buff_A, rs_A, cs_A,
89 buff_B, rs_B, cs_B );
90 }
91 }
92 else if ( dt_A == FLA_INT )
93 {
94 int* buff_A = ( int * ) FLA_INT_PTR( A );
95 int* buff_B = ( int * ) FLA_INT_PTR( B );
96
97 bl1_icopymt( blis_trans,
98 m_B,
99 n_B,
100 buff_A, rs_A, cs_A,
101 buff_B, rs_B, cs_B );
102 }
103 else if ( dt_A == FLA_FLOAT )
104 {
105 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
106
107 if ( dt_B == FLA_FLOAT )
108 {
109 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
110
111 bl1_scopymt( blis_trans,
112 m_B,
113 n_B,
114 buff_A, rs_A, cs_A,
115 buff_B, rs_B, cs_B );
116 }
117 else if ( dt_B == FLA_DOUBLE )
118 {
119 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
120
121 bl1_sdcopymt( blis_trans,
122 m_B,
123 n_B,
124 buff_A, rs_A, cs_A,
125 buff_B, rs_B, cs_B );
126 }
127 else if ( dt_B == FLA_COMPLEX )
128 {
129 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
130
131 bl1_sccopymt( blis_trans,
132 m_B,
133 n_B,
134 buff_A, rs_A, cs_A,
135 buff_B, rs_B, cs_B );
136 }
137 else if ( dt_B == FLA_DOUBLE_COMPLEX )
138 {
139 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
140
141 bl1_szcopymt( blis_trans,
142 m_B,
143 n_B,
144 buff_A, rs_A, cs_A,
145 buff_B, rs_B, cs_B );
146 }
147 }
148 else if ( dt_A == FLA_DOUBLE )
149 {
150 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
151
152 if ( dt_B == FLA_FLOAT )
153 {
154 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
155
156 bl1_dscopymt( blis_trans,
157 m_B,
158 n_B,
159 buff_A, rs_A, cs_A,
160 buff_B, rs_B, cs_B );
161 }
162 else if ( dt_B == FLA_DOUBLE )
163 {
164 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
165
166 bl1_dcopymt( blis_trans,
167 m_B,
168 n_B,
169 buff_A, rs_A, cs_A,
170 buff_B, rs_B, cs_B );
171 }
172 else if ( dt_B == FLA_COMPLEX )
173 {
174 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
175
176 bl1_dccopymt( blis_trans,
177 m_B,
178 n_B,
179 buff_A, rs_A, cs_A,
180 buff_B, rs_B, cs_B );
181 }
182 else if ( dt_B == FLA_DOUBLE_COMPLEX )
183 {
184 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
185
186 bl1_dzcopymt( blis_trans,
187 m_B,
188 n_B,
189 buff_A, rs_A, cs_A,
190 buff_B, rs_B, cs_B );
191 }
192 }
193 else if ( dt_A == FLA_COMPLEX )
194 {
195 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
196
197 if ( dt_B == FLA_FLOAT )
198 {
199 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
200
201 bl1_cscopymt( blis_trans,
202 m_B,
203 n_B,
204 buff_A, rs_A, cs_A,
205 buff_B, rs_B, cs_B );
206 }
207 else if ( dt_B == FLA_DOUBLE )
208 {
209 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
210
211 bl1_cdcopymt( blis_trans,
212 m_B,
213 n_B,
214 buff_A, rs_A, cs_A,
215 buff_B, rs_B, cs_B );
216 }
217 else if ( dt_B == FLA_COMPLEX )
218 {
219 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
220
221 bl1_ccopymt( blis_trans,
222 m_B,
223 n_B,
224 buff_A, rs_A, cs_A,
225 buff_B, rs_B, cs_B );
226 }
227 else if ( dt_B == FLA_DOUBLE_COMPLEX )
228 {
229 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
230
231 bl1_czcopymt( blis_trans,
232 m_B,
233 n_B,
234 buff_A, rs_A, cs_A,
235 buff_B, rs_B, cs_B );
236 }
237 }
238 else if ( dt_A == FLA_DOUBLE_COMPLEX )
239 {
240 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
241
242 if ( dt_B == FLA_FLOAT )
243 {
244 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
245
246 bl1_zscopymt( blis_trans,
247 m_B,
248 n_B,
249 buff_A, rs_A, cs_A,
250 buff_B, rs_B, cs_B );
251 }
252 else if ( dt_B == FLA_DOUBLE )
253 {
254 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
255
256 bl1_zdcopymt( blis_trans,
257 m_B,
258 n_B,
259 buff_A, rs_A, cs_A,
260 buff_B, rs_B, cs_B );
261 }
262 else if ( dt_B == FLA_COMPLEX )
263 {
264 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
265
266 bl1_zccopymt( blis_trans,
267 m_B,
268 n_B,
269 buff_A, rs_A, cs_A,
270 buff_B, rs_B, cs_B );
271 }
272 else if ( dt_B == FLA_DOUBLE_COMPLEX )
273 {
274 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
275
276 bl1_zcopymt( blis_trans,
277 m_B,
278 n_B,
279 buff_A, rs_A, cs_A,
280 buff_B, rs_B, cs_B );
281 }
282 }
283
284 return FLA_SUCCESS;
285}
void bl1_zccopymt(trans1_t trans, int m, int n, dcomplex *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
Definition bl1_copymt.c:1300
void bl1_dccopymt(trans1_t trans, int m, int n, double *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
Definition bl1_copymt.c:898
void bl1_czcopymt(trans1_t trans, int m, int n, scomplex *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
Definition bl1_copymt.c:1234
void bl1_dcopymt(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_copymt.c:148
void bl1_zscopymt(trans1_t trans, int m, int n, dcomplex *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
Definition bl1_copymt.c:762
void bl1_ccopymt(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_copymt.c:215
void bl1_cdcopymt(trans1_t trans, int m, int n, scomplex *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
Definition bl1_copymt.c:964
void bl1_szcopymt(trans1_t trans, int m, int n, float *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
Definition bl1_copymt.c:696
void bl1_zdcopymt(trans1_t trans, int m, int n, dcomplex *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
Definition bl1_copymt.c:1098
void bl1_dzcopymt(trans1_t trans, int m, int n, double *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
Definition bl1_copymt.c:1032
void bl1_sccopymt(trans1_t trans, int m, int n, float *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
Definition bl1_copymt.c:562
void bl1_sdcopymt(trans1_t trans, int m, int n, float *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
Definition bl1_copymt.c:428
void bl1_dscopymt(trans1_t trans, int m, int n, double *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
Definition bl1_copymt.c:494
void bl1_icopymt(trans1_t trans, int m, int n, int *a, int a_rs, int a_cs, int *b, int b_rs, int b_cs)
Definition bl1_copymt.c:13
void bl1_zcopymt(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_copymt.c:286
void bl1_scopymt(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_copymt.c:81
void bl1_cscopymt(trans1_t trans, int m, int n, scomplex *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
Definition bl1_copymt.c:628

References bl1_ccopymt(), bl1_cdcopymt(), bl1_cscopymt(), bl1_czcopymt(), bl1_dccopymt(), bl1_dcopymt(), bl1_dscopymt(), bl1_dzcopymt(), bl1_icopymt(), bl1_sccopymt(), bl1_scopymt(), bl1_sdcopymt(), bl1_szcopymt(), bl1_zccopymt(), bl1_zcopymt(), bl1_zdcopymt(), bl1_zscopymt(), FLA_Check_error_level(), FLA_Copy_check(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_is_conformal_to(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), and FLA_Param_map_flame_to_blis_trans().

Referenced by FLA_Accum_T_UT_fc_unb_var1(), FLA_Accum_T_UT_fr_unb_var1(), FLA_Apply_H2_UT_l_unb_var1(), FLA_Apply_H2_UT_piv_row(), FLA_Apply_H2_UT_r_unb_var1(), FLA_Apply_HUD_UT_lh_unb_var1(), FLA_Bidiag_UT_recover_tau_submatrix(), FLA_CAQR2_UT_unb_var1(), FLA_Chol_solve(), FLA_Copy(), FLA_Copy_task(), FLA_Eig_gest_il_unb_var3(), FLA_Eig_gest_il_unb_var4(), FLA_Eig_gest_il_unb_var5(), FLA_Eig_gest_iu_unb_var3(), FLA_Eig_gest_iu_unb_var4(), FLA_Eig_gest_iu_unb_var5(), FLA_Eig_gest_nl_unb_var4(), FLA_Eig_gest_nl_unb_var5(), FLA_Eig_gest_nu_unb_var4(), FLA_Eig_gest_nu_unb_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_Hess_UT_recover_tau_submatrix(), FLA_LQ_UT_solve(), FLA_LU_nopiv_solve(), FLA_LU_piv_copy_task(), FLA_LU_piv_solve(), FLA_QR_UT_recover_tau_submatrix(), FLA_QR_UT_solve(), FLA_SA_LU_unb(), FLA_Tridiag_UT_l_blf_var3(), FLA_Tridiag_UT_l_blk_var3(), FLA_Tridiag_UT_recover_tau_submatrix(), FLA_Trmvsx_external(), FLA_Trsvsx_external(), FLA_UDdate_UT_solve(), and FLASH_Copy_hierarchy().

◆ FLA_Copy_external_gpu()

FLA_Error FLA_Copy_external_gpu ( FLA_Obj A,
void * A_gpu,
FLA_Obj B,
void * B_gpu )
18{
19 FLA_Datatype datatype;
20 int m_B, n_B;
21 int ldim_A, inc_A;
22 int ldim_B, inc_B;
23 int i;
24
25 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
26 FLA_Copy_check( A, B );
27
28 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
29
30 // It is important that we get the datatype of B and not A, since A could
31 // be an FLA_CONSTANT.
32 datatype = FLA_Obj_datatype( B );
33
34 ldim_A = FLA_Obj_length( A );
35 inc_A = 1;
36
37 m_B = FLA_Obj_length( B );
38 n_B = FLA_Obj_width( B );
39 ldim_B = FLA_Obj_length( B );
40 inc_B = 1;
41
42 switch ( datatype ){
43
44 case FLA_INT:
45 case FLA_FLOAT:
46 {
47 float* buff_A_gpu = ( float* ) A_gpu;
48 float* buff_B_gpu = ( float* ) B_gpu;
49
50 for ( i = 0; i < n_B; i++ )
51 cublasScopy( m_B,
52 buff_A_gpu + i * ldim_A, inc_A,
53 buff_B_gpu + i * ldim_B, inc_B );
54
55 break;
56 }
57
58 case FLA_DOUBLE:
59 {
60 double* buff_A_gpu = ( double* ) A_gpu;
61 double* buff_B_gpu = ( double* ) B_gpu;
62
63 for ( i = 0; i < n_B; i++ )
64 cublasDcopy( m_B,
65 buff_A_gpu + i * ldim_A, inc_A,
66 buff_B_gpu + i * ldim_B, inc_B );
67
68 break;
69 }
70
71 case FLA_COMPLEX:
72 {
73 cuComplex* buff_A_gpu = ( cuComplex* ) A_gpu;
74 cuComplex* buff_B_gpu = ( cuComplex* ) B_gpu;
75
76 for ( i = 0; i < n_B; i++ )
77 cublasCcopy( m_B,
78 buff_A_gpu + i * ldim_A, inc_A,
79 buff_B_gpu + i * ldim_B, inc_B );
80
81 break;
82 }
83
84 case FLA_DOUBLE_COMPLEX:
85 {
86 cuDoubleComplex* buff_A_gpu = ( cuDoubleComplex* ) A_gpu;
87 cuDoubleComplex* buff_B_gpu = ( cuDoubleComplex* ) B_gpu;
88
89 for ( i = 0; i < n_B; i++ )
90 cublasZcopy( m_B,
91 buff_A_gpu + i * ldim_A, inc_A,
92 buff_B_gpu + i * ldim_B, inc_B );
93
94 break;
95 }
96
97 }
98
99 return FLA_SUCCESS;
100}

References FLA_Check_error_level(), FLA_Copy_check(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_width(), and i.

Referenced by FLASH_Queue_exec_task_gpu().

◆ FLA_Copy_internal_check()

FLA_Error FLA_Copy_internal_check ( FLA_Obj A,
FLA_Obj B,
fla_copy_t * cntl )
14{
15 FLA_Error e_val;
16
17 // Abort if the control structure is NULL.
18 e_val = FLA_Check_null_pointer( ( void* ) cntl );
19 FLA_Check_error_code( e_val );
20
21 // Verify that the object element types are identical.
23 FLA_Check_error_code( e_val );
24
25 // Verify conformality between all the objects. This check works regardless
26 // of whether the element type is FLA_MATRIX or FLA_SCALAR because the
27 // element length and width are used instead of scalar length and width.
28 e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, B );
29 FLA_Check_error_code( e_val );
30
31 return FLA_SUCCESS;
32}

References FLA_Check_conformal_dims(), FLA_Check_identical_object_elemtype(), and FLA_Check_null_pointer().

Referenced by FLA_Copy_internal().

◆ FLA_Copy_task()

FLA_Error FLA_Copy_task ( FLA_Obj A,
FLA_Obj B,
fla_copy_t * cntl )

◆ FLA_Copyr()

FLA_Error FLA_Copyr ( FLA_Uplo uplo,
FLA_Obj A,
FLA_Obj B )
16{
17 FLA_Error r_val;
18
19#ifdef FLA_ENABLE_BLAS1_FRONT_END_CNTL_TREES
20 // Check parameters.
21 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
22 FLA_Copyr_uheck( uplo, A, B );
23
24 // Invoke FLA_Copyr_internal() with flat control tree that simply calls
25 // external wrapper.
26 r_val = FLA_Copyr_internal( uplo, A, B, fla_copyr_cntl_blas );
27
28#else
29 r_val = FLA_Copyr_external( uplo, A, B );
30#endif
31
32 return r_val;
33}
fla_copyr_t * fla_copyr_cntl_blas
Definition FLA_Copyr_cntl_init.c:13
FLA_Error FLA_Copyr_internal(FLA_Uplo uplo, FLA_Obj A, FLA_Obj B, fla_copyr_t *cntl)
Definition FLA_Copyr_internal.c:16
FLA_Error FLA_Copyr_external(FLA_Uplo uplo, FLA_Obj A, FLA_Obj B)
Definition FLA_Copyr_external.c:13

References FLA_Check_error_level(), fla_copyr_cntl_blas, FLA_Copyr_external(), and FLA_Copyr_internal().

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

◆ FLA_Copyr_check()

FLA_Error FLA_Copyr_check ( FLA_Uplo uplo,
FLA_Obj A,
FLA_Obj B )
14{
15 FLA_Error e_val;
16
17 e_val = FLA_Check_valid_uplo( uplo );
18 FLA_Check_error_code( e_val );
19
21 FLA_Check_error_code( e_val );
22
24 FLA_Check_error_code( e_val );
25
26 e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, B );
27 FLA_Check_error_code( e_val );
28
29 return FLA_SUCCESS;
30}
FLA_Error FLA_Check_valid_uplo(FLA_Uplo uplo)
Definition FLA_Check.c:76

References FLA_Check_conformal_dims(), FLA_Check_nonconstant_object(), FLA_Check_valid_object_datatype(), and FLA_Check_valid_uplo().

Referenced by FLA_Copyr_external(), and FLASH_Copyr().

◆ FLA_Copyr_external()

FLA_Error FLA_Copyr_external ( FLA_Uplo uplo,
FLA_Obj A,
FLA_Obj B )
14{
15 FLA_Datatype dt_A;
16 FLA_Datatype dt_B;
17 int m_B, n_B;
18 int rs_A, cs_A;
19 int rs_B, cs_B;
20 uplo1_t blis_uplo;
21
22 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
23 FLA_Copyr_check( uplo, A, B );
24
25 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
26
27 dt_A = FLA_Obj_datatype( A );
28 dt_B = FLA_Obj_datatype( B );
29
30 rs_A = FLA_Obj_row_stride( A );
31 cs_A = FLA_Obj_col_stride( A );
32
33 m_B = FLA_Obj_length( B );
34 n_B = FLA_Obj_width( B );
35 rs_B = FLA_Obj_row_stride( B );
36 cs_B = FLA_Obj_col_stride( B );
37
38 FLA_Param_map_flame_to_blis_uplo( uplo, &blis_uplo );
39
40 // If A is of type FLA_CONSTANT, then we have to proceed based on the
41 // datatype of B.
42 if ( dt_A == FLA_CONSTANT )
43 {
44 if ( dt_B == FLA_FLOAT )
45 {
46 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
47 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
48
49 bl1_scopymr( blis_uplo,
50 m_B,
51 n_B,
52 buff_A, rs_A, cs_A,
53 buff_B, rs_B, cs_B );
54 }
55 else if ( dt_B == FLA_DOUBLE )
56 {
57 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
58 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
59
60 bl1_dcopymr( blis_uplo,
61 m_B,
62 n_B,
63 buff_A, rs_A, cs_A,
64 buff_B, rs_B, cs_B );
65 }
66 else if ( dt_B == FLA_COMPLEX )
67 {
68 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
69 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
70
71 bl1_ccopymr( blis_uplo,
72 m_B,
73 n_B,
74 buff_A, rs_A, cs_A,
75 buff_B, rs_B, cs_B );
76 }
77 else if ( dt_B == FLA_DOUBLE_COMPLEX )
78 {
79 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
80 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
81
82 bl1_zcopymr( blis_uplo,
83 m_B,
84 n_B,
85 buff_A, rs_A, cs_A,
86 buff_B, rs_B, cs_B );
87 }
88 }
89/*
90 else if ( dt_A == FLA_INT )
91 {
92 int* buff_A = ( int * ) FLA_INT_PTR( A );
93 int* buff_B = ( int * ) FLA_INT_PTR( B );
94
95 bl1_icopymr( blis_uplo,
96 m_B,
97 n_B,
98 buff_A, rs_A, cs_A,
99 buff_B, rs_B, cs_B );
100 }
101*/
102 else if ( dt_A == FLA_FLOAT )
103 {
104 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
105
106 if ( dt_B == FLA_FLOAT )
107 {
108 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
109
110 bl1_scopymr( blis_uplo,
111 m_B,
112 n_B,
113 buff_A, rs_A, cs_A,
114 buff_B, rs_B, cs_B );
115 }
116 else if ( dt_B == FLA_DOUBLE )
117 {
118 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
119
120 bl1_sdcopymr( blis_uplo,
121 m_B,
122 n_B,
123 buff_A, rs_A, cs_A,
124 buff_B, rs_B, cs_B );
125 }
126 else if ( dt_B == FLA_COMPLEX )
127 {
128 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
129
130 bl1_sccopymr( blis_uplo,
131 m_B,
132 n_B,
133 buff_A, rs_A, cs_A,
134 buff_B, rs_B, cs_B );
135 }
136 else if ( dt_B == FLA_DOUBLE_COMPLEX )
137 {
138 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
139
140 bl1_szcopymr( blis_uplo,
141 m_B,
142 n_B,
143 buff_A, rs_A, cs_A,
144 buff_B, rs_B, cs_B );
145 }
146 }
147 else if ( dt_A == FLA_DOUBLE )
148 {
149 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
150
151 if ( dt_B == FLA_FLOAT )
152 {
153 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
154
155 bl1_dscopymr( blis_uplo,
156 m_B,
157 n_B,
158 buff_A, rs_A, cs_A,
159 buff_B, rs_B, cs_B );
160 }
161 else if ( dt_B == FLA_DOUBLE )
162 {
163 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
164
165 bl1_dcopymr( blis_uplo,
166 m_B,
167 n_B,
168 buff_A, rs_A, cs_A,
169 buff_B, rs_B, cs_B );
170 }
171 else if ( dt_B == FLA_COMPLEX )
172 {
173 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
174
175 bl1_dccopymr( blis_uplo,
176 m_B,
177 n_B,
178 buff_A, rs_A, cs_A,
179 buff_B, rs_B, cs_B );
180 }
181 else if ( dt_B == FLA_DOUBLE_COMPLEX )
182 {
183 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
184
185 bl1_dzcopymr( blis_uplo,
186 m_B,
187 n_B,
188 buff_A, rs_A, cs_A,
189 buff_B, rs_B, cs_B );
190 }
191 }
192 else if ( dt_A == FLA_COMPLEX )
193 {
194 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
195
196 if ( dt_B == FLA_FLOAT )
197 {
198 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
199
200 bl1_cscopymr( blis_uplo,
201 m_B,
202 n_B,
203 buff_A, rs_A, cs_A,
204 buff_B, rs_B, cs_B );
205 }
206 else if ( dt_B == FLA_DOUBLE )
207 {
208 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
209
210 bl1_cdcopymr( blis_uplo,
211 m_B,
212 n_B,
213 buff_A, rs_A, cs_A,
214 buff_B, rs_B, cs_B );
215 }
216 else if ( dt_B == FLA_COMPLEX )
217 {
218 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
219
220 bl1_ccopymr( blis_uplo,
221 m_B,
222 n_B,
223 buff_A, rs_A, cs_A,
224 buff_B, rs_B, cs_B );
225 }
226 else if ( dt_B == FLA_DOUBLE_COMPLEX )
227 {
228 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
229
230 bl1_czcopymr( blis_uplo,
231 m_B,
232 n_B,
233 buff_A, rs_A, cs_A,
234 buff_B, rs_B, cs_B );
235 }
236 }
237 else if ( dt_A == FLA_DOUBLE_COMPLEX )
238 {
239 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
240
241 if ( dt_B == FLA_FLOAT )
242 {
243 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
244
245 bl1_zscopymr( blis_uplo,
246 m_B,
247 n_B,
248 buff_A, rs_A, cs_A,
249 buff_B, rs_B, cs_B );
250 }
251 else if ( dt_B == FLA_DOUBLE )
252 {
253 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
254
255 bl1_zdcopymr( blis_uplo,
256 m_B,
257 n_B,
258 buff_A, rs_A, cs_A,
259 buff_B, rs_B, cs_B );
260 }
261 else if ( dt_B == FLA_COMPLEX )
262 {
263 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
264
265 bl1_zccopymr( blis_uplo,
266 m_B,
267 n_B,
268 buff_A, rs_A, cs_A,
269 buff_B, rs_B, cs_B );
270 }
271 else if ( dt_B == FLA_DOUBLE_COMPLEX )
272 {
273 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
274
275 bl1_zcopymr( blis_uplo,
276 m_B,
277 n_B,
278 buff_A, rs_A, cs_A,
279 buff_B, rs_B, cs_B );
280 }
281 }
282
283 return FLA_SUCCESS;
284}
FLA_Error FLA_Copyr_check(FLA_Uplo uplo, FLA_Obj A, FLA_Obj B)
Definition FLA_Copyr_check.c:13
void bl1_szcopymr(uplo1_t uplo, int m, int n, float *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
Definition bl1_copymr.c:594
void bl1_zccopymr(uplo1_t uplo, int m, int n, dcomplex *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
Definition bl1_copymr.c:1180
void bl1_zscopymr(uplo1_t uplo, int m, int n, dcomplex *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
Definition bl1_copymr.c:658
void bl1_cscopymr(uplo1_t uplo, int m, int n, scomplex *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
Definition bl1_copymr.c:528
void bl1_ccopymr(uplo1_t uplo, int m, int n, scomplex *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
Definition bl1_copymr.c:139
void bl1_zdcopymr(uplo1_t uplo, int m, int n, dcomplex *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
Definition bl1_copymr.c:984
void bl1_dscopymr(uplo1_t uplo, int m, int n, double *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
Definition bl1_copymr.c:398
void bl1_dcopymr(uplo1_t uplo, int m, int n, double *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
Definition bl1_copymr.c:76
void bl1_cdcopymr(uplo1_t uplo, int m, int n, scomplex *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
Definition bl1_copymr.c:854
void bl1_dzcopymr(uplo1_t uplo, int m, int n, double *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
Definition bl1_copymr.c:920
void bl1_dccopymr(uplo1_t uplo, int m, int n, double *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
Definition bl1_copymr.c:790
void bl1_sccopymr(uplo1_t uplo, int m, int n, float *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
Definition bl1_copymr.c:464
void bl1_zcopymr(uplo1_t uplo, int m, int n, dcomplex *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
Definition bl1_copymr.c:202
void bl1_czcopymr(uplo1_t uplo, int m, int n, scomplex *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
Definition bl1_copymr.c:1116
void bl1_sdcopymr(uplo1_t uplo, int m, int n, float *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
Definition bl1_copymr.c:334
void bl1_scopymr(uplo1_t uplo, int m, int n, float *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
Definition bl1_copymr.c:13

References bl1_ccopymr(), bl1_cdcopymr(), bl1_cscopymr(), bl1_czcopymr(), bl1_dccopymr(), bl1_dcopymr(), bl1_dscopymr(), bl1_dzcopymr(), bl1_sccopymr(), bl1_scopymr(), bl1_sdcopymr(), bl1_szcopymr(), bl1_zccopymr(), bl1_zcopymr(), bl1_zdcopymr(), bl1_zscopymr(), FLA_Check_error_level(), FLA_Copyr_check(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), and FLA_Param_map_flame_to_blis_uplo().

Referenced by FLA_Copyr(), FLA_Copyr_l_task(), FLA_Copyr_task(), FLA_Copyr_u_task(), and FLA_QR_UT_copy_task().

◆ FLA_Copyr_internal_check()

FLA_Error FLA_Copyr_internal_check ( FLA_Uplo uplo,
FLA_Obj A,
FLA_Obj B,
fla_copyr_t * cntl )
14{
15 FLA_Error e_val;
16
17 // Abort if the control structure is NULL.
18 e_val = FLA_Check_null_pointer( ( void* ) cntl );
19 FLA_Check_error_code( e_val );
20
21 // Verify that the object element types are identical.
23 FLA_Check_error_code( e_val );
24
25 // Verify conformality between all the objects. This check works regardless
26 // of whether the element type is FLA_MATRIX or FLA_SCALAR because the
27 // element length and width are used instead of scalar length and width.
28 e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, B );
29 FLA_Check_error_code( e_val );
30
31 return FLA_SUCCESS;
32}

References FLA_Check_conformal_dims(), FLA_Check_identical_object_elemtype(), and FLA_Check_null_pointer().

Referenced by FLA_Copyr_internal().

◆ FLA_Copyr_l_task()

FLA_Error FLA_Copyr_l_task ( FLA_Obj A,
FLA_Obj B,
fla_copyr_t * cntl )
19{
20 return FLA_Copyr_external( FLA_LOWER_TRIANGULAR, A, B );
21}

References FLA_Copyr_external().

Referenced by FLA_Copyr_l().

◆ FLA_Copyr_task()

FLA_Error FLA_Copyr_task ( FLA_Uplo uplo,
FLA_Obj A,
FLA_Obj B,
fla_copyr_t * cntl )
14{
15 return FLA_Copyr_external( uplo, A, B );
16}

References FLA_Copyr_external().

Referenced by FLASH_Queue_exec_task().

◆ FLA_Copyr_u_task()

FLA_Error FLA_Copyr_u_task ( FLA_Obj A,
FLA_Obj B,
fla_copyr_t * cntl )
24{
25 return FLA_Copyr_external( FLA_UPPER_TRIANGULAR, A, B );
26}

References FLA_Copyr_external().

Referenced by FLA_Copyr_u().

◆ FLA_Copyrt()

FLA_Error FLA_Copyrt ( FLA_Uplo uplo,
FLA_Trans trans,
FLA_Obj A,
FLA_Obj B )
14{
15 return FLA_Copyrt_external( uplo, trans, A, B );
16}
FLA_Error FLA_Copyrt_external(FLA_Uplo uplo, FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition FLA_Copyrt_external.c:13

References FLA_Copyrt_external().

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

◆ FLA_Copyrt_check()

FLA_Error FLA_Copyrt_check ( FLA_Uplo uplo,
FLA_Trans trans,
FLA_Obj A,
FLA_Obj B )
14{
15 FLA_Error e_val;
16
17 e_val = FLA_Check_valid_uplo( uplo );
18 FLA_Check_error_code( e_val );
19
20 e_val = FLA_Check_valid_trans( trans );
21 FLA_Check_error_code( e_val );
22
24 FLA_Check_error_code( e_val );
25
27 FLA_Check_error_code( e_val );
28
29 e_val = FLA_Check_conformal_dims( trans, A, B );
30 FLA_Check_error_code( e_val );
31
32 return FLA_SUCCESS;
33}

References FLA_Check_conformal_dims(), FLA_Check_nonconstant_object(), FLA_Check_valid_object_datatype(), FLA_Check_valid_trans(), and FLA_Check_valid_uplo().

Referenced by FLA_Copyrt_external().

◆ FLA_Copyrt_external()

FLA_Error FLA_Copyrt_external ( FLA_Uplo uplo,
FLA_Trans trans,
FLA_Obj A,
FLA_Obj B )
14{
15 FLA_Datatype dt_A;
16 FLA_Datatype dt_B;
17 int m_B, n_B;
18 int rs_A, cs_A;
19 int rs_B, cs_B;
20 uplo1_t blis_uplo;
21 trans1_t blis_trans;
22
23 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
24 FLA_Copyrt_check( uplo, trans, A, B );
25
26 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
27
28 dt_A = FLA_Obj_datatype( A );
29 dt_B = FLA_Obj_datatype( B );
30
31 rs_A = FLA_Obj_row_stride( A );
32 cs_A = FLA_Obj_col_stride( A );
33
34 m_B = FLA_Obj_length( B );
35 n_B = FLA_Obj_width( B );
36 rs_B = FLA_Obj_row_stride( B );
37 cs_B = FLA_Obj_col_stride( B );
38
39 FLA_Param_map_flame_to_blis_uplo( uplo, &blis_uplo );
40 FLA_Param_map_flame_to_blis_trans( trans, &blis_trans );
41
42 // If A is of type FLA_CONSTANT, then we have to proceed based on the
43 // datatype of B.
44 if ( dt_A == FLA_CONSTANT )
45 {
46 if ( dt_B == FLA_FLOAT )
47 {
48 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
49 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
50
51 bl1_scopymrt( blis_uplo,
52 blis_trans,
53 m_B,
54 n_B,
55 buff_A, rs_A, cs_A,
56 buff_B, rs_B, cs_B );
57 }
58 else if ( dt_B == FLA_DOUBLE )
59 {
60 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
61 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
62
63 bl1_dcopymrt( blis_uplo,
64 blis_trans,
65 m_B,
66 n_B,
67 buff_A, rs_A, cs_A,
68 buff_B, rs_B, cs_B );
69 }
70 else if ( dt_B == FLA_COMPLEX )
71 {
72 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
73 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
74
75 bl1_ccopymrt( blis_uplo,
76 blis_trans,
77 m_B,
78 n_B,
79 buff_A, rs_A, cs_A,
80 buff_B, rs_B, cs_B );
81 }
82 else if ( dt_B == FLA_DOUBLE_COMPLEX )
83 {
84 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
85 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
86
87 bl1_zcopymrt( blis_uplo,
88 blis_trans,
89 m_B,
90 n_B,
91 buff_A, rs_A, cs_A,
92 buff_B, rs_B, cs_B );
93 }
94 }
95/*
96 else if ( dt_A == FLA_INT )
97 {
98 int* buff_A = ( int * ) FLA_INT_PTR( A );
99 int* buff_B = ( int * ) FLA_INT_PTR( B );
100
101 bl1_icopymrt( blis_uplo,
102 blis_trans,
103 m_B,
104 n_B,
105 buff_A, rs_A, cs_A,
106 buff_B, rs_B, cs_B );
107 }
108*/
109 else if ( dt_A == FLA_FLOAT )
110 {
111 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
112
113 if ( dt_B == FLA_FLOAT )
114 {
115 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
116
117 bl1_scopymrt( blis_uplo,
118 blis_trans,
119 m_B,
120 n_B,
121 buff_A, rs_A, cs_A,
122 buff_B, rs_B, cs_B );
123 }
124 else if ( dt_B == FLA_DOUBLE )
125 {
126 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
127
128 bl1_sdcopymrt( blis_uplo,
129 blis_trans,
130 m_B,
131 n_B,
132 buff_A, rs_A, cs_A,
133 buff_B, rs_B, cs_B );
134 }
135 else if ( dt_B == FLA_COMPLEX )
136 {
137 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
138
139 bl1_sccopymrt( blis_uplo,
140 blis_trans,
141 m_B,
142 n_B,
143 buff_A, rs_A, cs_A,
144 buff_B, rs_B, cs_B );
145 }
146 else if ( dt_B == FLA_DOUBLE_COMPLEX )
147 {
148 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
149
150 bl1_szcopymrt( blis_uplo,
151 blis_trans,
152 m_B,
153 n_B,
154 buff_A, rs_A, cs_A,
155 buff_B, rs_B, cs_B );
156 }
157 }
158 else if ( dt_A == FLA_DOUBLE )
159 {
160 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
161
162 if ( dt_B == FLA_FLOAT )
163 {
164 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
165
166 bl1_dscopymrt( blis_uplo,
167 blis_trans,
168 m_B,
169 n_B,
170 buff_A, rs_A, cs_A,
171 buff_B, rs_B, cs_B );
172 }
173 else if ( dt_B == FLA_DOUBLE )
174 {
175 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
176
177 bl1_dcopymrt( blis_uplo,
178 blis_trans,
179 m_B,
180 n_B,
181 buff_A, rs_A, cs_A,
182 buff_B, rs_B, cs_B );
183 }
184 else if ( dt_B == FLA_COMPLEX )
185 {
186 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
187
188 bl1_dccopymrt( blis_uplo,
189 blis_trans,
190 m_B,
191 n_B,
192 buff_A, rs_A, cs_A,
193 buff_B, rs_B, cs_B );
194 }
195 else if ( dt_B == FLA_DOUBLE_COMPLEX )
196 {
197 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
198
199 bl1_dzcopymrt( blis_uplo,
200 blis_trans,
201 m_B,
202 n_B,
203 buff_A, rs_A, cs_A,
204 buff_B, rs_B, cs_B );
205 }
206 }
207 else if ( dt_A == FLA_COMPLEX )
208 {
209 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
210
211 if ( dt_B == FLA_FLOAT )
212 {
213 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
214
215 bl1_cscopymrt( blis_uplo,
216 blis_trans,
217 m_B,
218 n_B,
219 buff_A, rs_A, cs_A,
220 buff_B, rs_B, cs_B );
221 }
222 else if ( dt_B == FLA_DOUBLE )
223 {
224 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
225
226 bl1_cdcopymrt( blis_uplo,
227 blis_trans,
228 m_B,
229 n_B,
230 buff_A, rs_A, cs_A,
231 buff_B, rs_B, cs_B );
232 }
233 else if ( dt_B == FLA_COMPLEX )
234 {
235 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
236
237 bl1_ccopymrt( blis_uplo,
238 blis_trans,
239 m_B,
240 n_B,
241 buff_A, rs_A, cs_A,
242 buff_B, rs_B, cs_B );
243 }
244 else if ( dt_B == FLA_DOUBLE_COMPLEX )
245 {
246 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
247
248 bl1_czcopymrt( blis_uplo,
249 blis_trans,
250 m_B,
251 n_B,
252 buff_A, rs_A, cs_A,
253 buff_B, rs_B, cs_B );
254 }
255 }
256 else if ( dt_A == FLA_DOUBLE_COMPLEX )
257 {
258 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
259
260 if ( dt_B == FLA_FLOAT )
261 {
262 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
263
264 bl1_zscopymrt( blis_uplo,
265 blis_trans,
266 m_B,
267 n_B,
268 buff_A, rs_A, cs_A,
269 buff_B, rs_B, cs_B );
270 }
271 else if ( dt_B == FLA_DOUBLE )
272 {
273 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
274
275 bl1_zdcopymrt( blis_uplo,
276 blis_trans,
277 m_B,
278 n_B,
279 buff_A, rs_A, cs_A,
280 buff_B, rs_B, cs_B );
281 }
282 else if ( dt_B == FLA_COMPLEX )
283 {
284 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
285
286 bl1_zccopymrt( blis_uplo,
287 blis_trans,
288 m_B,
289 n_B,
290 buff_A, rs_A, cs_A,
291 buff_B, rs_B, cs_B );
292 }
293 else if ( dt_B == FLA_DOUBLE_COMPLEX )
294 {
295 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
296
297 bl1_zcopymrt( blis_uplo,
298 blis_trans,
299 m_B,
300 n_B,
301 buff_A, rs_A, cs_A,
302 buff_B, rs_B, cs_B );
303 }
304 }
305
306 return FLA_SUCCESS;
307}
FLA_Error FLA_Copyrt_check(FLA_Uplo uplo, FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition FLA_Copyrt_check.c:13
void bl1_ccopymrt(uplo1_t uplo, 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_copymrt.c:223
void bl1_zcopymrt(uplo1_t uplo, 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_copymrt.c:328
void bl1_cscopymrt(uplo1_t uplo, trans1_t trans, int m, int n, scomplex *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
Definition bl1_copymrt.c:1284
void bl1_scopymrt(uplo1_t uplo, 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_copymrt.c:13
void bl1_zccopymrt(uplo1_t uplo, trans1_t trans, int m, int n, dcomplex *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
Definition bl1_copymrt.c:1920
void bl1_szcopymrt(uplo1_t uplo, trans1_t trans, int m, int n, float *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
Definition bl1_copymrt.c:754
void bl1_zscopymrt(uplo1_t uplo, trans1_t trans, int m, int n, dcomplex *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
Definition bl1_copymrt.c:1708
void bl1_zdcopymrt(uplo1_t uplo, trans1_t trans, int m, int n, dcomplex *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
Definition bl1_copymrt.c:1814
void bl1_czcopymrt(uplo1_t uplo, trans1_t trans, int m, int n, scomplex *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
Definition bl1_copymrt.c:1602
void bl1_sccopymrt(uplo1_t uplo, trans1_t trans, int m, int n, float *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
Definition bl1_copymrt.c:648
void bl1_dscopymrt(uplo1_t uplo, trans1_t trans, int m, int n, double *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
Definition bl1_copymrt.c:860
void bl1_cdcopymrt(uplo1_t uplo, trans1_t trans, int m, int n, scomplex *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
Definition bl1_copymrt.c:1390
void bl1_dcopymrt(uplo1_t uplo, 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_copymrt.c:118
void bl1_sdcopymrt(uplo1_t uplo, trans1_t trans, int m, int n, float *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
Definition bl1_copymrt.c:542
void bl1_dzcopymrt(uplo1_t uplo, trans1_t trans, int m, int n, double *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
Definition bl1_copymrt.c:1178
void bl1_dccopymrt(uplo1_t uplo, trans1_t trans, int m, int n, double *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
Definition bl1_copymrt.c:1072

References bl1_ccopymrt(), bl1_cdcopymrt(), bl1_cscopymrt(), bl1_czcopymrt(), bl1_dccopymrt(), bl1_dcopymrt(), bl1_dscopymrt(), bl1_dzcopymrt(), bl1_sccopymrt(), bl1_scopymrt(), bl1_sdcopymrt(), bl1_szcopymrt(), bl1_zccopymrt(), bl1_zcopymrt(), bl1_zdcopymrt(), bl1_zscopymrt(), FLA_Check_error_level(), FLA_Copyrt_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 FLA_Param_map_flame_to_blis_uplo().

Referenced by FLA_Copyrt().

◆ FLA_Copyt()

FLA_Error FLA_Copyt ( FLA_Trans trans,
FLA_Obj A,
FLA_Obj B )
16{
17 FLA_Error r_val;
18
19#ifdef FLA_ENABLE_BLAS1_FRONT_END_CNTL_TREES
20 // Check parameters.
21 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
22 FLA_Copyt_check( trans, A, B );
23
24 // Invoke FLA_Copyt_internal() with flat control tree that simply calls
25 // external wrapper.
26 r_val = FLA_Copyt_internal( trans, A, B, fla_copyt_cntl_blas );
27
28#else
29 r_val = FLA_Copyt_external( trans, A, B );
30#endif
31
32 return r_val;
33}
fla_copyt_t * fla_copyt_cntl_blas
Definition FLA_Copyt_cntl_init.c:13
FLA_Error FLA_Copyt_internal(FLA_Trans trans, FLA_Obj A, FLA_Obj B, fla_copyt_t *cntl)
Definition FLA_Copyt_internal.c:16
FLA_Error FLA_Copyt_check(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition FLA_Copyt_check.c:13
FLA_Error FLA_Copyt_external(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition FLA_Copyt_external.c:13

References FLA_Check_error_level(), FLA_Copyt_check(), fla_copyt_cntl_blas, FLA_Copyt_external(), and FLA_Copyt_internal().

Referenced by FLA_Bidiag_UT_l_realify_unb(), 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_var3(), FLA_Bidiag_UT_u_step_unb_var4(), FLA_Bidiag_UT_u_step_unb_var5(), 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_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(), FLA_Tridiag_UT_l_realify_unb(), FLA_Tridiag_UT_l_step_unb_var2(), and FLA_Tridiag_UT_u_realify_unb().

◆ FLA_Copyt_c_task()

FLA_Error FLA_Copyt_c_task ( FLA_Obj A,
FLA_Obj B,
fla_copyt_t * cntl )
29{
30 return FLA_Copyt_external( FLA_CONJ_NO_TRANSPOSE, A, B );
31}

References FLA_Copyt_external().

Referenced by FLA_Copyt_c().

◆ FLA_Copyt_check()

FLA_Error FLA_Copyt_check ( FLA_Trans trans,
FLA_Obj A,
FLA_Obj B )
14{
15 FLA_Error e_val;
16
17 e_val = FLA_Check_valid_trans( trans );
18 FLA_Check_error_code( e_val );
19
21 FLA_Check_error_code( e_val );
22
24 FLA_Check_error_code( e_val );
25
26 e_val = FLA_Check_conformal_dims( trans, A, B );
27 FLA_Check_error_code( e_val );
28
29 return FLA_SUCCESS;
30}

References FLA_Check_conformal_dims(), FLA_Check_nonconstant_object(), FLA_Check_valid_object_datatype(), and FLA_Check_valid_trans().

Referenced by FLA_Copyt(), FLA_Copyt_external(), and FLASH_Copyt().

◆ FLA_Copyt_external()

FLA_Error FLA_Copyt_external ( FLA_Trans trans,
FLA_Obj A,
FLA_Obj B )
14{
15 FLA_Datatype dt_A;
16 FLA_Datatype dt_B;
17 int m_B, n_B;
18 int rs_A, cs_A;
19 int rs_B, cs_B;
20 trans1_t blis_trans;
21
22 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
23 FLA_Copyt_check( trans, A, B );
24
25 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
26
27 dt_A = FLA_Obj_datatype( A );
28 dt_B = FLA_Obj_datatype( B );
29
30 rs_A = FLA_Obj_row_stride( A );
31 cs_A = FLA_Obj_col_stride( A );
32
33 m_B = FLA_Obj_length( B );
34 n_B = FLA_Obj_width( B );
35 rs_B = FLA_Obj_row_stride( B );
36 cs_B = FLA_Obj_col_stride( B );
37
38 FLA_Param_map_flame_to_blis_trans( trans, &blis_trans );
39
40 // If A is of type FLA_CONSTANT, then we have to proceed based on the
41 // datatype of B.
42 if ( dt_A == FLA_CONSTANT )
43 {
44 if ( dt_B == FLA_FLOAT )
45 {
46 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
47 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
48
49 bl1_scopymt( blis_trans,
50 m_B,
51 n_B,
52 buff_A, rs_A, cs_A,
53 buff_B, rs_B, cs_B );
54 }
55 else if ( dt_B == FLA_DOUBLE )
56 {
57 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
58 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
59
60 bl1_dcopymt( blis_trans,
61 m_B,
62 n_B,
63 buff_A, rs_A, cs_A,
64 buff_B, rs_B, cs_B );
65 }
66 else if ( dt_B == FLA_COMPLEX )
67 {
68 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
69 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
70
71 bl1_ccopymt( blis_trans,
72 m_B,
73 n_B,
74 buff_A, rs_A, cs_A,
75 buff_B, rs_B, cs_B );
76 }
77 else if ( dt_B == FLA_DOUBLE_COMPLEX )
78 {
79 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
80 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
81
82 bl1_zcopymt( blis_trans,
83 m_B,
84 n_B,
85 buff_A, rs_A, cs_A,
86 buff_B, rs_B, cs_B );
87 }
88 }
89 else if ( dt_A == FLA_INT )
90 {
91 int* buff_A = ( int * ) FLA_INT_PTR( A );
92 int* buff_B = ( int * ) FLA_INT_PTR( B );
93
94 bl1_icopymt( blis_trans,
95 m_B,
96 n_B,
97 buff_A, rs_A, cs_A,
98 buff_B, rs_B, cs_B );
99 }
100 else if ( dt_A == FLA_FLOAT )
101 {
102 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
103
104 if ( dt_B == FLA_FLOAT )
105 {
106 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
107
108 bl1_scopymt( blis_trans,
109 m_B,
110 n_B,
111 buff_A, rs_A, cs_A,
112 buff_B, rs_B, cs_B );
113 }
114 else if ( dt_B == FLA_DOUBLE )
115 {
116 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
117
118 bl1_sdcopymt( blis_trans,
119 m_B,
120 n_B,
121 buff_A, rs_A, cs_A,
122 buff_B, rs_B, cs_B );
123 }
124 else if ( dt_B == FLA_COMPLEX )
125 {
126 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
127
128 bl1_sccopymt( blis_trans,
129 m_B,
130 n_B,
131 buff_A, rs_A, cs_A,
132 buff_B, rs_B, cs_B );
133 }
134 else if ( dt_B == FLA_DOUBLE_COMPLEX )
135 {
136 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
137
138 bl1_szcopymt( blis_trans,
139 m_B,
140 n_B,
141 buff_A, rs_A, cs_A,
142 buff_B, rs_B, cs_B );
143 }
144 }
145 else if ( dt_A == FLA_DOUBLE )
146 {
147 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
148
149 if ( dt_B == FLA_FLOAT )
150 {
151 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
152
153 bl1_dscopymt( blis_trans,
154 m_B,
155 n_B,
156 buff_A, rs_A, cs_A,
157 buff_B, rs_B, cs_B );
158 }
159 else if ( dt_B == FLA_DOUBLE )
160 {
161 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
162
163 bl1_dcopymt( blis_trans,
164 m_B,
165 n_B,
166 buff_A, rs_A, cs_A,
167 buff_B, rs_B, cs_B );
168 }
169 else if ( dt_B == FLA_COMPLEX )
170 {
171 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
172
173 bl1_dccopymt( blis_trans,
174 m_B,
175 n_B,
176 buff_A, rs_A, cs_A,
177 buff_B, rs_B, cs_B );
178 }
179 else if ( dt_B == FLA_DOUBLE_COMPLEX )
180 {
181 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
182
183 bl1_dzcopymt( blis_trans,
184 m_B,
185 n_B,
186 buff_A, rs_A, cs_A,
187 buff_B, rs_B, cs_B );
188 }
189 }
190 else if ( dt_A == FLA_COMPLEX )
191 {
192 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
193
194 if ( dt_B == FLA_FLOAT )
195 {
196 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
197
198 bl1_cscopymt( blis_trans,
199 m_B,
200 n_B,
201 buff_A, rs_A, cs_A,
202 buff_B, rs_B, cs_B );
203 }
204 else if ( dt_B == FLA_DOUBLE )
205 {
206 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
207
208 bl1_cdcopymt( blis_trans,
209 m_B,
210 n_B,
211 buff_A, rs_A, cs_A,
212 buff_B, rs_B, cs_B );
213 }
214 else if ( dt_B == FLA_COMPLEX )
215 {
216 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
217
218 bl1_ccopymt( blis_trans,
219 m_B,
220 n_B,
221 buff_A, rs_A, cs_A,
222 buff_B, rs_B, cs_B );
223 }
224 else if ( dt_B == FLA_DOUBLE_COMPLEX )
225 {
226 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
227
228 bl1_czcopymt( blis_trans,
229 m_B,
230 n_B,
231 buff_A, rs_A, cs_A,
232 buff_B, rs_B, cs_B );
233 }
234 }
235 else if ( dt_A == FLA_DOUBLE_COMPLEX )
236 {
237 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
238
239 if ( dt_B == FLA_FLOAT )
240 {
241 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
242
243 bl1_zscopymt( blis_trans,
244 m_B,
245 n_B,
246 buff_A, rs_A, cs_A,
247 buff_B, rs_B, cs_B );
248 }
249 else if ( dt_B == FLA_DOUBLE )
250 {
251 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
252
253 bl1_zdcopymt( blis_trans,
254 m_B,
255 n_B,
256 buff_A, rs_A, cs_A,
257 buff_B, rs_B, cs_B );
258 }
259 else if ( dt_B == FLA_COMPLEX )
260 {
261 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
262
263 bl1_zccopymt( blis_trans,
264 m_B,
265 n_B,
266 buff_A, rs_A, cs_A,
267 buff_B, rs_B, cs_B );
268 }
269 else if ( dt_B == FLA_DOUBLE_COMPLEX )
270 {
271 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
272
273 bl1_zcopymt( blis_trans,
274 m_B,
275 n_B,
276 buff_A, rs_A, cs_A,
277 buff_B, rs_B, cs_B );
278 }
279 }
280
281 return FLA_SUCCESS;
282}

References bl1_ccopymt(), bl1_cdcopymt(), bl1_cscopymt(), bl1_czcopymt(), bl1_dccopymt(), bl1_dcopymt(), bl1_dscopymt(), bl1_dzcopymt(), bl1_icopymt(), bl1_sccopymt(), bl1_scopymt(), bl1_sdcopymt(), bl1_szcopymt(), bl1_zccopymt(), bl1_zcopymt(), bl1_zdcopymt(), bl1_zscopymt(), FLA_Check_error_level(), FLA_Copyt_check(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), and FLA_Param_map_flame_to_blis_trans().

Referenced by FLA_Accum_T_UT_fc_unb_var1(), FLA_Accum_T_UT_fr_unb_var1(), FLA_Copy_buffer_to_object(), FLA_Copy_object_to_buffer(), FLA_Copyt(), FLA_Copyt_c_task(), FLA_Copyt_h_task(), FLA_Copyt_n_task(), FLA_Copyt_t_task(), FLA_Copyt_task(), FLA_Hess_UT_blk_var5(), FLA_LQ_UT_blk_var2(), FLA_LQ_UT_unb_var2(), FLA_Obj_create_copy_of(), FLA_QR_UT_blk_var2(), FLA_QR_UT_piv_unb_var1(), FLA_QR_UT_piv_unb_var2(), and FLA_QR_UT_unb_var2().

◆ FLA_Copyt_h_task()

FLA_Error FLA_Copyt_h_task ( FLA_Obj A,
FLA_Obj B,
fla_copyt_t * cntl )
34{
35 return FLA_Copyt_external( FLA_CONJ_TRANSPOSE, A, B );
36}

References FLA_Copyt_external().

Referenced by FLA_Copyt_h().

◆ FLA_Copyt_internal_check()

FLA_Error FLA_Copyt_internal_check ( FLA_Trans trans,
FLA_Obj A,
FLA_Obj B,
fla_copyt_t * cntl )
14{
15 FLA_Error e_val;
16
17 // Abort if the control structure is NULL.
18 e_val = FLA_Check_null_pointer( ( void* ) cntl );
19 FLA_Check_error_code( e_val );
20
21 // Verify that the object element types are identical.
23 FLA_Check_error_code( e_val );
24
25 // Verify conformality between all the objects. This check works regardless
26 // of whether the element type is FLA_MATRIX or FLA_SCALAR because the
27 // element length and width are used instead of scalar length and width.
28 e_val = FLA_Check_conformal_dims( trans, A, B );
29 FLA_Check_error_code( e_val );
30
31 return FLA_SUCCESS;
32}

References FLA_Check_conformal_dims(), FLA_Check_identical_object_elemtype(), and FLA_Check_null_pointer().

Referenced by FLA_Copyt_internal().

◆ FLA_Copyt_n_task()

FLA_Error FLA_Copyt_n_task ( FLA_Obj A,
FLA_Obj B,
fla_copyt_t * cntl )
19{
20 return FLA_Copyt_external( FLA_NO_TRANSPOSE, A, B );
21}

References FLA_Copyt_external().

Referenced by FLA_Copyt_n().

◆ FLA_Copyt_t_task()

FLA_Error FLA_Copyt_t_task ( FLA_Obj A,
FLA_Obj B,
fla_copyt_t * cntl )
24{
25 return FLA_Copyt_external( FLA_TRANSPOSE, A, B );
26}

References FLA_Copyt_external().

Referenced by FLA_Copyt_t().

◆ FLA_Copyt_task()

FLA_Error FLA_Copyt_task ( FLA_Trans trans,
FLA_Obj A,
FLA_Obj B,
fla_copyt_t * cntl )
14{
15 return FLA_Copyt_external( trans, A, B );
16}

References FLA_Copyt_external().

Referenced by FLASH_Queue_exec_task().

◆ FLA_Dot()

FLA_Error FLA_Dot ( FLA_Obj x,
FLA_Obj y,
FLA_Obj rho )
14{
15 return FLA_Dot_external( x, y, rho );
16}
FLA_Error FLA_Dot_external(FLA_Obj x, FLA_Obj y, FLA_Obj rho)
Definition FLA_Dot_external.c:13
* rho
Definition bl1_axpyv2bdotaxpy.c:322

References FLA_Dot_external(), and rho.

Referenced by FLA_Hess_UT_step_unb_var2(), FLA_Hess_UT_step_unb_var3(), FLA_Hess_UT_step_unb_var4(), FLA_Hess_UT_step_unb_var5(), and FLA_QR_UT_piv_colnorm().

◆ FLA_Dot2cs()

FLA_Error FLA_Dot2cs ( FLA_Conj conj,
FLA_Obj alpha,
FLA_Obj x,
FLA_Obj y,
FLA_Obj beta,
FLA_Obj rho )
14{
15 return FLA_Dot2cs_external( conj, alpha, x, y, beta, rho );
16}
FLA_Error FLA_Dot2cs_external(FLA_Conj conj, FLA_Obj alpha, FLA_Obj x, FLA_Obj y, FLA_Obj beta, FLA_Obj rho)
Definition FLA_Dot2cs_external.c:13

References FLA_Dot2cs_external(), and rho.

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

◆ FLA_Dot2cs_check()

FLA_Error FLA_Dot2cs_check ( FLA_Conj conj,
FLA_Obj alpha,
FLA_Obj x,
FLA_Obj y,
FLA_Obj beta,
FLA_Obj rho )
14{
15 FLA_Error e_val;
16
17 e_val = FLA_Check_valid_conj( conj );
18 FLA_Check_error_code( e_val );
19
20 e_val = FLA_Check_floating_object( x );
21 FLA_Check_error_code( e_val );
22
24 FLA_Check_error_code( e_val );
25
27 FLA_Check_error_code( e_val );
28
30 FLA_Check_error_code( e_val );
31
32 e_val = FLA_Check_consistent_object_datatype( x, alpha );
33 FLA_Check_error_code( e_val );
34
35 e_val = FLA_Check_consistent_object_datatype( x, beta );
36 FLA_Check_error_code( e_val );
37
38 e_val = FLA_Check_if_vector( x );
39 FLA_Check_error_code( e_val );
40
41 e_val = FLA_Check_if_vector( y );
42 FLA_Check_error_code( e_val );
43
44 e_val = FLA_Check_if_scalar( alpha );
45 FLA_Check_error_code( e_val );
46
47 e_val = FLA_Check_if_scalar( beta );
48 FLA_Check_error_code( e_val );
49
50 e_val = FLA_Check_if_scalar( rho );
51 FLA_Check_error_code( e_val );
52
53 e_val = FLA_Check_equal_vector_dims( x, y );
54 FLA_Check_error_code( e_val );
55
56 return FLA_SUCCESS;
57}
FLA_Error FLA_Check_valid_conj(FLA_Conj conj)
Definition FLA_Check.c:112

References FLA_Check_consistent_object_datatype(), FLA_Check_equal_vector_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_scalar(), FLA_Check_if_vector(), FLA_Check_nonconstant_object(), FLA_Check_valid_conj(), and rho.

Referenced by FLA_Dot2cs_external().

◆ FLA_Dot2cs_external()

FLA_Error FLA_Dot2cs_external ( FLA_Conj conj,
FLA_Obj alpha,
FLA_Obj x,
FLA_Obj y,
FLA_Obj beta,
FLA_Obj rho )
14{
15 FLA_Datatype datatype;
16 int num_elem;
17 int inc_x;
18 int inc_y;
19 conj1_t blis_conj;
20
21 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
22 FLA_Dot2cs_check( conj, alpha, x, y, beta, rho );
23
24 if ( FLA_Obj_has_zero_dim( x ) )
25 {
26 FLA_Scal_external( beta, rho );
27 return FLA_SUCCESS;
28 }
29
30 datatype = FLA_Obj_datatype( x );
31
32 inc_x = FLA_Obj_vector_inc( x );
33 inc_y = FLA_Obj_vector_inc( y );
34 num_elem = FLA_Obj_vector_dim( x );
35
36 FLA_Param_map_flame_to_blis_conj( conj, &blis_conj );
37
38 switch ( datatype ){
39
40 case FLA_FLOAT:
41 {
42 float *buff_x = ( float * ) FLA_FLOAT_PTR( x );
43 float *buff_y = ( float * ) FLA_FLOAT_PTR( y );
44 float *buff_rho = ( float * ) FLA_FLOAT_PTR( rho );
45 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
46 float *buff_beta = ( float * ) FLA_FLOAT_PTR( beta );
47
48 bl1_sdot2s( blis_conj,
49 num_elem,
50 buff_alpha,
51 buff_x, inc_x,
52 buff_y, inc_y,
53 buff_beta,
54 buff_rho );
55
56 break;
57 }
58
59 case FLA_DOUBLE:
60 {
61 double *buff_x = ( double * ) FLA_DOUBLE_PTR( x );
62 double *buff_y = ( double * ) FLA_DOUBLE_PTR( y );
63 double *buff_rho = ( double * ) FLA_DOUBLE_PTR( rho );
64 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
65 double *buff_beta = ( double * ) FLA_DOUBLE_PTR( beta );
66
67 bl1_ddot2s( blis_conj,
68 num_elem,
69 buff_alpha,
70 buff_x, inc_x,
71 buff_y, inc_y,
72 buff_beta,
73 buff_rho );
74
75 break;
76 }
77
78 case FLA_COMPLEX:
79 {
80 scomplex *buff_x = ( scomplex * ) FLA_COMPLEX_PTR( x );
81 scomplex *buff_y = ( scomplex * ) FLA_COMPLEX_PTR( y );
82 scomplex *buff_rho = ( scomplex * ) FLA_COMPLEX_PTR( rho );
83 scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha );
84 scomplex *buff_beta = ( scomplex * ) FLA_COMPLEX_PTR( beta );
85
86 bl1_cdot2s( blis_conj,
87 num_elem,
88 buff_alpha,
89 buff_x, inc_x,
90 buff_y, inc_y,
91 buff_beta,
92 buff_rho );
93
94 break;
95 }
96
97 case FLA_DOUBLE_COMPLEX:
98 {
99 dcomplex *buff_x = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( x );
100 dcomplex *buff_y = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( y );
101 dcomplex *buff_rho = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( rho );
102 dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
103 dcomplex *buff_beta = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( beta );
104
105 bl1_zdot2s( blis_conj,
106 num_elem,
107 buff_alpha,
108 buff_x, inc_x,
109 buff_y, inc_y,
110 buff_beta,
111 buff_rho );
112
113 break;
114 }
115
116 }
117
118 return FLA_SUCCESS;
119}
FLA_Error FLA_Dot2cs_check(FLA_Conj conj, FLA_Obj alpha, FLA_Obj x, FLA_Obj y, FLA_Obj beta, FLA_Obj rho)
Definition FLA_Dot2cs_check.c:13
FLA_Error FLA_Scal_external(FLA_Obj alpha, FLA_Obj A)
Definition FLA_Scal_external.c:13
void FLA_Param_map_flame_to_blis_conj(FLA_Conj conj, conj1_t *blis_conj)
Definition FLA_Param.c:269
void bl1_cdot2s(conj1_t conj, int n, scomplex *alpha, scomplex *x, int incx, scomplex *y, int incy, scomplex *beta, scomplex *rho)
Definition bl1_dot2s.c:39
void bl1_ddot2s(conj1_t conj, int n, double *alpha, double *x, int incx, double *y, int incy, double *beta, double *rho)
Definition bl1_dot2s.c:26
void bl1_zdot2s(conj1_t conj, int n, dcomplex *alpha, dcomplex *x, int incx, dcomplex *y, int incy, dcomplex *beta, dcomplex *rho)
Definition bl1_dot2s.c:70
void bl1_sdot2s(conj1_t conj, int n, float *alpha, float *x, int incx, float *y, int incy, float *beta, float *rho)
Definition bl1_dot2s.c:13
conj1_t
Definition blis_type_defs.h:80

References bl1_cdot2s(), bl1_ddot2s(), bl1_sdot2s(), bl1_zdot2s(), FLA_Check_error_level(), FLA_Dot2cs_check(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_vector_dim(), FLA_Obj_vector_inc(), FLA_Param_map_flame_to_blis_conj(), FLA_Scal_external(), and rho.

Referenced by FLA_Dot2cs(), FLA_Eig_gest_il_unb_var1(), FLA_Eig_gest_il_unb_var2(), FLA_Eig_gest_il_unb_var3(), FLA_Eig_gest_iu_unb_var1(), FLA_Eig_gest_iu_unb_var2(), FLA_Eig_gest_iu_unb_var3(), FLA_Eig_gest_nl_unb_var1(), FLA_Eig_gest_nl_unb_var2(), FLA_Eig_gest_nu_unb_var1(), FLA_Eig_gest_nu_unb_var2(), FLA_Her2k_lh_unb_var1(), FLA_Her2k_lh_unb_var2(), FLA_Her2k_lh_unb_var3(), FLA_Her2k_lh_unb_var4(), FLA_Her2k_lh_unb_var5(), FLA_Her2k_lh_unb_var6(), FLA_Her2k_lh_unb_var7(), FLA_Her2k_lh_unb_var8(), FLA_Her2k_ln_unb_var1(), FLA_Her2k_ln_unb_var2(), FLA_Her2k_ln_unb_var3(), FLA_Her2k_ln_unb_var4(), FLA_Her2k_ln_unb_var5(), FLA_Her2k_ln_unb_var6(), FLA_Her2k_ln_unb_var7(), FLA_Her2k_ln_unb_var8(), FLA_Her2k_uh_unb_var1(), FLA_Her2k_uh_unb_var2(), FLA_Her2k_uh_unb_var3(), FLA_Her2k_uh_unb_var4(), FLA_Her2k_uh_unb_var5(), FLA_Her2k_uh_unb_var6(), FLA_Her2k_uh_unb_var7(), FLA_Her2k_uh_unb_var8(), FLA_Her2k_un_unb_var1(), FLA_Her2k_un_unb_var2(), FLA_Her2k_un_unb_var3(), FLA_Her2k_un_unb_var4(), FLA_Her2k_un_unb_var5(), FLA_Her2k_un_unb_var6(), FLA_Her2k_un_unb_var7(), and FLA_Her2k_un_unb_var8().

◆ FLA_Dot2s()

FLA_Error FLA_Dot2s ( FLA_Obj alpha,
FLA_Obj x,
FLA_Obj y,
FLA_Obj beta,
FLA_Obj rho )
14{
15 return FLA_Dot2s_external( alpha, x, y, beta, rho );
16}
FLA_Error FLA_Dot2s_external(FLA_Obj alpha, FLA_Obj x, FLA_Obj y, FLA_Obj beta, FLA_Obj rho)
Definition FLA_Dot2s_external.c:13

References FLA_Dot2s_external(), and rho.

◆ FLA_Dot2s_check()

FLA_Error FLA_Dot2s_check ( FLA_Obj alpha,
FLA_Obj x,
FLA_Obj y,
FLA_Obj beta,
FLA_Obj rho )
14{
15 FLA_Error e_val;
16
17 e_val = FLA_Check_floating_object( x );
18 FLA_Check_error_code( e_val );
19
21 FLA_Check_error_code( e_val );
22
24 FLA_Check_error_code( e_val );
25
27 FLA_Check_error_code( e_val );
28
29 e_val = FLA_Check_consistent_object_datatype( x, alpha );
30 FLA_Check_error_code( e_val );
31
32 e_val = FLA_Check_consistent_object_datatype( x, beta );
33 FLA_Check_error_code( e_val );
34
35 e_val = FLA_Check_if_vector( x );
36 FLA_Check_error_code( e_val );
37
38 e_val = FLA_Check_if_vector( y );
39 FLA_Check_error_code( e_val );
40
41 e_val = FLA_Check_if_scalar( alpha );
42 FLA_Check_error_code( e_val );
43
44 e_val = FLA_Check_if_scalar( beta );
45 FLA_Check_error_code( e_val );
46
47 e_val = FLA_Check_if_scalar( rho );
48 FLA_Check_error_code( e_val );
49
50 e_val = FLA_Check_equal_vector_dims( x, y );
51 FLA_Check_error_code( e_val );
52
53 return FLA_SUCCESS;
54}

References FLA_Check_consistent_object_datatype(), FLA_Check_equal_vector_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_scalar(), FLA_Check_if_vector(), FLA_Check_nonconstant_object(), and rho.

Referenced by FLA_Dot2s_external().

◆ FLA_Dot2s_external()

FLA_Error FLA_Dot2s_external ( FLA_Obj alpha,
FLA_Obj x,
FLA_Obj y,
FLA_Obj beta,
FLA_Obj rho )
14{
15 FLA_Datatype datatype;
16 int num_elem;
17 int inc_x;
18 int inc_y;
19 conj1_t blis_conj;
20
21 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
22 FLA_Dot2s_check( alpha, x, y, beta, rho );
23
24 if ( FLA_Obj_has_zero_dim( x ) )
25 {
26 FLA_Scal_external( beta, rho );
27 return FLA_SUCCESS;
28 }
29
30 datatype = FLA_Obj_datatype( x );
31
32 inc_x = FLA_Obj_vector_inc( x );
33 inc_y = FLA_Obj_vector_inc( y );
34 num_elem = FLA_Obj_vector_dim( x );
35
36 FLA_Param_map_flame_to_blis_conj( FLA_NO_CONJUGATE, &blis_conj );
37
38 switch ( datatype ){
39
40 case FLA_FLOAT:
41 {
42 float *buff_x = ( float * ) FLA_FLOAT_PTR( x );
43 float *buff_y = ( float * ) FLA_FLOAT_PTR( y );
44 float *buff_rho = ( float * ) FLA_FLOAT_PTR( rho );
45 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
46 float *buff_beta = ( float * ) FLA_FLOAT_PTR( beta );
47
48 bl1_sdot2s( blis_conj,
49 num_elem,
50 buff_alpha,
51 buff_x, inc_x,
52 buff_y, inc_y,
53 buff_beta,
54 buff_rho );
55
56 break;
57 }
58
59 case FLA_DOUBLE:
60 {
61 double *buff_x = ( double * ) FLA_DOUBLE_PTR( x );
62 double *buff_y = ( double * ) FLA_DOUBLE_PTR( y );
63 double *buff_rho = ( double * ) FLA_DOUBLE_PTR( rho );
64 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
65 double *buff_beta = ( double * ) FLA_DOUBLE_PTR( beta );
66
67 bl1_ddot2s( blis_conj,
68 num_elem,
69 buff_alpha,
70 buff_x, inc_x,
71 buff_y, inc_y,
72 buff_beta,
73 buff_rho );
74
75 break;
76 }
77
78 case FLA_COMPLEX:
79 {
80 scomplex *buff_x = ( scomplex * ) FLA_COMPLEX_PTR( x );
81 scomplex *buff_y = ( scomplex * ) FLA_COMPLEX_PTR( y );
82 scomplex *buff_rho = ( scomplex * ) FLA_COMPLEX_PTR( rho );
83 scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha );
84 scomplex *buff_beta = ( scomplex * ) FLA_COMPLEX_PTR( beta );
85
86 bl1_cdot2s( blis_conj,
87 num_elem,
88 buff_alpha,
89 buff_x, inc_x,
90 buff_y, inc_y,
91 buff_beta,
92 buff_rho );
93
94 break;
95 }
96
97 case FLA_DOUBLE_COMPLEX:
98 {
99 dcomplex *buff_x = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( x );
100 dcomplex *buff_y = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( y );
101 dcomplex *buff_rho = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( rho );
102 dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
103 dcomplex *buff_beta = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( beta );
104
105 bl1_zdot2s( blis_conj,
106 num_elem,
107 buff_alpha,
108 buff_x, inc_x,
109 buff_y, inc_y,
110 buff_beta,
111 buff_rho );
112
113 break;
114 }
115
116 }
117
118 return FLA_SUCCESS;
119}
FLA_Error FLA_Dot2s_check(FLA_Obj alpha, FLA_Obj x, FLA_Obj y, FLA_Obj beta, FLA_Obj rho)
Definition FLA_Dot2s_check.c:13

References bl1_cdot2s(), bl1_ddot2s(), bl1_sdot2s(), bl1_zdot2s(), FLA_Check_error_level(), FLA_Dot2s_check(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_vector_dim(), FLA_Obj_vector_inc(), FLA_Param_map_flame_to_blis_conj(), FLA_Scal_external(), and rho.

Referenced by FLA_Dot2s(), FLA_Syr2k_ln_unb_var1(), FLA_Syr2k_ln_unb_var2(), FLA_Syr2k_ln_unb_var3(), FLA_Syr2k_ln_unb_var4(), FLA_Syr2k_ln_unb_var5(), FLA_Syr2k_ln_unb_var6(), FLA_Syr2k_ln_unb_var7(), FLA_Syr2k_ln_unb_var8(), FLA_Syr2k_lt_unb_var1(), FLA_Syr2k_lt_unb_var2(), FLA_Syr2k_lt_unb_var3(), FLA_Syr2k_lt_unb_var4(), FLA_Syr2k_lt_unb_var5(), FLA_Syr2k_lt_unb_var6(), FLA_Syr2k_lt_unb_var7(), FLA_Syr2k_lt_unb_var8(), FLA_Syr2k_un_unb_var1(), FLA_Syr2k_un_unb_var2(), FLA_Syr2k_un_unb_var3(), FLA_Syr2k_un_unb_var4(), FLA_Syr2k_un_unb_var5(), FLA_Syr2k_un_unb_var6(), FLA_Syr2k_un_unb_var7(), FLA_Syr2k_un_unb_var8(), FLA_Syr2k_ut_unb_var1(), FLA_Syr2k_ut_unb_var2(), FLA_Syr2k_ut_unb_var3(), FLA_Syr2k_ut_unb_var4(), FLA_Syr2k_ut_unb_var5(), FLA_Syr2k_ut_unb_var6(), FLA_Syr2k_ut_unb_var7(), and FLA_Syr2k_ut_unb_var8().

◆ FLA_Dot_check()

FLA_Error FLA_Dot_check ( FLA_Obj x,
FLA_Obj y,
FLA_Obj rho )
14{
15 FLA_Error e_val;
16
17 e_val = FLA_Check_floating_object( x );
18 FLA_Check_error_code( e_val );
19
21 FLA_Check_error_code( e_val );
22
24 FLA_Check_error_code( e_val );
25
27 FLA_Check_error_code( e_val );
28
29 e_val = FLA_Check_if_vector( x );
30 FLA_Check_error_code( e_val );
31
32 e_val = FLA_Check_if_vector( y );
33 FLA_Check_error_code( e_val );
34
35 e_val = FLA_Check_equal_vector_dims( x, y );
36 FLA_Check_error_code( e_val );
37
38 return FLA_SUCCESS;
39}

References FLA_Check_equal_vector_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_vector(), FLA_Check_nonconstant_object(), and rho.

Referenced by FLA_Dot_external().

◆ FLA_Dot_external()

FLA_Error FLA_Dot_external ( FLA_Obj x,
FLA_Obj y,
FLA_Obj rho )
14{
15 FLA_Datatype datatype;
16 int num_elem;
17 int inc_x;
18 int inc_y;
19 conj1_t blis_conj;
20
21 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
22 FLA_Dot_check( x, y, rho );
23
24 if ( FLA_Obj_has_zero_dim( x ) ) return FLA_SUCCESS;
25
26 datatype = FLA_Obj_datatype( x );
27
28 inc_x = FLA_Obj_vector_inc( x );
29 inc_y = FLA_Obj_vector_inc( y );
30 num_elem = FLA_Obj_vector_dim( x );
31
32 FLA_Param_map_flame_to_blis_conj( FLA_NO_CONJUGATE, &blis_conj );
33
34 switch ( datatype ){
35
36 case FLA_FLOAT:
37 {
38 float *buff_x = ( float * ) FLA_FLOAT_PTR( x );
39 float *buff_y = ( float * ) FLA_FLOAT_PTR( y );
40 float *buff_rho = ( float * ) FLA_FLOAT_PTR( rho );
41
42 bl1_sdot( blis_conj,
43 num_elem,
44 buff_x, inc_x,
45 buff_y, inc_y,
46 buff_rho );
47
48 break;
49 }
50
51 case FLA_DOUBLE:
52 {
53 double *buff_x = ( double * ) FLA_DOUBLE_PTR( x );
54 double *buff_y = ( double * ) FLA_DOUBLE_PTR( y );
55 double *buff_rho = ( double * ) FLA_DOUBLE_PTR( rho );
56
57 bl1_ddot( blis_conj,
58 num_elem,
59 buff_x, inc_x,
60 buff_y, inc_y,
61 buff_rho );
62
63 break;
64 }
65
66 case FLA_COMPLEX:
67 {
68 scomplex *buff_x = ( scomplex * ) FLA_COMPLEX_PTR( x );
69 scomplex *buff_y = ( scomplex * ) FLA_COMPLEX_PTR( y );
70 scomplex *buff_rho = ( scomplex * ) FLA_COMPLEX_PTR( rho );
71
72 bl1_cdot( blis_conj,
73 num_elem,
74 buff_x, inc_x,
75 buff_y, inc_y,
76 buff_rho );
77
78 break;
79 }
80
81 case FLA_DOUBLE_COMPLEX:
82 {
83 dcomplex *buff_x = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( x );
84 dcomplex *buff_y = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( y );
85 dcomplex *buff_rho = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( rho );
86
87 bl1_zdot( blis_conj,
88 num_elem,
89 buff_x, inc_x,
90 buff_y, inc_y,
91 buff_rho );
92
93 break;
94 }
95
96 }
97
98 return FLA_SUCCESS;
99}
FLA_Error FLA_Dot_check(FLA_Obj x, FLA_Obj y, FLA_Obj rho)
Definition FLA_Dot_check.c:13
void bl1_cdot(conj1_t conj, int n, scomplex *x, int incx, scomplex *y, int incy, scomplex *rho)
Definition bl1_dot.c:39
void bl1_ddot(conj1_t conj, int n, double *x, int incx, double *y, int incy, double *rho)
Definition bl1_dot.c:26
void bl1_sdot(conj1_t conj, int n, float *x, int incx, float *y, int incy, float *rho)
Definition bl1_dot.c:13
void bl1_zdot(conj1_t conj, int n, dcomplex *x, int incx, dcomplex *y, int incy, dcomplex *rho)
Definition bl1_dot.c:65

References bl1_cdot(), bl1_ddot(), bl1_sdot(), bl1_zdot(), FLA_Check_error_level(), FLA_Dot_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 rho.

Referenced by FLA_Dot().

◆ FLA_Dotc()

◆ FLA_Dotc_check()

FLA_Error FLA_Dotc_check ( FLA_Conj conj,
FLA_Obj x,
FLA_Obj y,
FLA_Obj rho )
14{
15 FLA_Error e_val;
16
17 e_val = FLA_Check_valid_conj( conj );
18 FLA_Check_error_code( e_val );
19
20 e_val = FLA_Check_floating_object( x );
21 FLA_Check_error_code( e_val );
22
24 FLA_Check_error_code( e_val );
25
27 FLA_Check_error_code( e_val );
28
30 FLA_Check_error_code( e_val );
31
32 e_val = FLA_Check_if_vector( x );
33 FLA_Check_error_code( e_val );
34
35 e_val = FLA_Check_if_vector( y );
36 FLA_Check_error_code( e_val );
37
38 e_val = FLA_Check_equal_vector_dims( x, y );
39 FLA_Check_error_code( e_val );
40
41 return FLA_SUCCESS;
42}

References FLA_Check_equal_vector_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_vector(), FLA_Check_nonconstant_object(), FLA_Check_valid_conj(), and rho.

Referenced by FLA_Dotc_external().

◆ FLA_Dotc_external()

FLA_Error FLA_Dotc_external ( FLA_Conj conj,
FLA_Obj x,
FLA_Obj y,
FLA_Obj rho )
14{
15 FLA_Datatype datatype;
16 int num_elem;
17 int inc_x;
18 int inc_y;
19 conj1_t blis_conj;
20
21 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
22 FLA_Dotc_check( conj, x, y, rho );
23
24 if ( FLA_Obj_has_zero_dim( x ) ) return FLA_SUCCESS;
25
26 datatype = FLA_Obj_datatype( x );
27
28 inc_x = FLA_Obj_vector_inc( x );
29 inc_y = FLA_Obj_vector_inc( y );
30 num_elem = FLA_Obj_vector_dim( x );
31
32 FLA_Param_map_flame_to_blis_conj( conj, &blis_conj );
33
34 switch ( datatype ){
35
36 case FLA_FLOAT:
37 {
38 float *buff_x = ( float * ) FLA_FLOAT_PTR( x );
39 float *buff_y = ( float * ) FLA_FLOAT_PTR( y );
40 float *buff_rho = ( float * ) FLA_FLOAT_PTR( rho );
41
42 bl1_sdot( blis_conj,
43 num_elem,
44 buff_x, inc_x,
45 buff_y, inc_y,
46 buff_rho );
47
48 break;
49 }
50
51 case FLA_DOUBLE:
52 {
53 double *buff_x = ( double * ) FLA_DOUBLE_PTR( x );
54 double *buff_y = ( double * ) FLA_DOUBLE_PTR( y );
55 double *buff_rho = ( double * ) FLA_DOUBLE_PTR( rho );
56
57 bl1_ddot( blis_conj,
58 num_elem,
59 buff_x, inc_x,
60 buff_y, inc_y,
61 buff_rho );
62
63 break;
64 }
65
66 case FLA_COMPLEX:
67 {
68 scomplex *buff_x = ( scomplex * ) FLA_COMPLEX_PTR( x );
69 scomplex *buff_y = ( scomplex * ) FLA_COMPLEX_PTR( y );
70 scomplex *buff_rho = ( scomplex * ) FLA_COMPLEX_PTR( rho );
71
72 bl1_cdot( blis_conj,
73 num_elem,
74 buff_x, inc_x,
75 buff_y, inc_y,
76 buff_rho );
77
78 break;
79 }
80
81 case FLA_DOUBLE_COMPLEX:
82 {
83 dcomplex *buff_x = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( x );
84 dcomplex *buff_y = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( y );
85 dcomplex *buff_rho = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( rho );
86
87 bl1_zdot( blis_conj,
88 num_elem,
89 buff_x, inc_x,
90 buff_y, inc_y,
91 buff_rho );
92
93 break;
94 }
95
96 }
97
98 return FLA_SUCCESS;
99}
FLA_Error FLA_Dotc_check(FLA_Conj conj, FLA_Obj x, FLA_Obj y, FLA_Obj rho)
Definition FLA_Dotc_check.c:13

References bl1_cdot(), bl1_ddot(), bl1_sdot(), bl1_zdot(), FLA_Check_error_level(), FLA_Dotc_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 rho.

Referenced by FLA_Dotc().

◆ FLA_Dotcs()

FLA_Error FLA_Dotcs ( FLA_Conj conj,
FLA_Obj alpha,
FLA_Obj x,
FLA_Obj y,
FLA_Obj beta,
FLA_Obj rho )
14{
15 return FLA_Dotcs_external( conj, alpha, x, y, beta, rho );
16}
FLA_Error FLA_Dotcs_external(FLA_Conj conj, FLA_Obj alpha, FLA_Obj x, FLA_Obj y, FLA_Obj beta, FLA_Obj rho)
Definition FLA_Dotcs_external.c:13

References FLA_Dotcs_external(), and rho.

◆ FLA_Dotcs_check()

FLA_Error FLA_Dotcs_check ( FLA_Conj conj,
FLA_Obj alpha,
FLA_Obj x,
FLA_Obj y,
FLA_Obj beta,
FLA_Obj rho )
14{
15 FLA_Error e_val;
16
17 e_val = FLA_Check_valid_conj( conj );
18 FLA_Check_error_code( e_val );
19
20 e_val = FLA_Check_floating_object( x );
21 FLA_Check_error_code( e_val );
22
24 FLA_Check_error_code( e_val );
25
27 FLA_Check_error_code( e_val );
28
30 FLA_Check_error_code( e_val );
31
32 e_val = FLA_Check_consistent_object_datatype( x, alpha );
33 FLA_Check_error_code( e_val );
34
35 e_val = FLA_Check_consistent_object_datatype( x, beta );
36 FLA_Check_error_code( e_val );
37
38 e_val = FLA_Check_if_vector( x );
39 FLA_Check_error_code( e_val );
40
41 e_val = FLA_Check_if_vector( y );
42 FLA_Check_error_code( e_val );
43
44 e_val = FLA_Check_if_scalar( alpha );
45 FLA_Check_error_code( e_val );
46
47 e_val = FLA_Check_if_scalar( beta );
48 FLA_Check_error_code( e_val );
49
50 e_val = FLA_Check_if_scalar( rho );
51 FLA_Check_error_code( e_val );
52
53 e_val = FLA_Check_equal_vector_dims( x, y );
54 FLA_Check_error_code( e_val );
55
56 return FLA_SUCCESS;
57}

References FLA_Check_consistent_object_datatype(), FLA_Check_equal_vector_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_scalar(), FLA_Check_if_vector(), FLA_Check_nonconstant_object(), FLA_Check_valid_conj(), and rho.

Referenced by FLA_Dotcs_external().

◆ FLA_Dotcs_external()

FLA_Error FLA_Dotcs_external ( FLA_Conj conj,
FLA_Obj alpha,
FLA_Obj x,
FLA_Obj y,
FLA_Obj beta,
FLA_Obj rho )
14{
15 FLA_Datatype datatype;
16 int num_elem;
17 int inc_x;
18 int inc_y;
19 conj1_t blis_conj;
20
21 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
22 FLA_Dotcs_check( conj, alpha, x, y, beta, rho );
23
24 if ( FLA_Obj_has_zero_dim( x ) )
25 {
26 FLA_Scal_external( beta, rho );
27 return FLA_SUCCESS;
28 }
29
30 datatype = FLA_Obj_datatype( x );
31
32 inc_x = FLA_Obj_vector_inc( x );
33 inc_y = FLA_Obj_vector_inc( y );
34 num_elem = FLA_Obj_vector_dim( x );
35
36 FLA_Param_map_flame_to_blis_conj( conj, &blis_conj );
37
38 switch ( datatype ){
39
40 case FLA_FLOAT:
41 {
42 float *buff_x = ( float * ) FLA_FLOAT_PTR( x );
43 float *buff_y = ( float * ) FLA_FLOAT_PTR( y );
44 float *buff_rho = ( float * ) FLA_FLOAT_PTR( rho );
45 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
46 float *buff_beta = ( float * ) FLA_FLOAT_PTR( beta );
47
48 bl1_sdots( blis_conj,
49 num_elem,
50 buff_alpha,
51 buff_x, inc_x,
52 buff_y, inc_y,
53 buff_beta,
54 buff_rho );
55
56 break;
57 }
58
59 case FLA_DOUBLE:
60 {
61 double *buff_x = ( double * ) FLA_DOUBLE_PTR( x );
62 double *buff_y = ( double * ) FLA_DOUBLE_PTR( y );
63 double *buff_rho = ( double * ) FLA_DOUBLE_PTR( rho );
64 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
65 double *buff_beta = ( double * ) FLA_DOUBLE_PTR( beta );
66
67 bl1_ddots( blis_conj,
68 num_elem,
69 buff_alpha,
70 buff_x, inc_x,
71 buff_y, inc_y,
72 buff_beta,
73 buff_rho );
74
75 break;
76 }
77
78 case FLA_COMPLEX:
79 {
80 scomplex *buff_x = ( scomplex * ) FLA_COMPLEX_PTR( x );
81 scomplex *buff_y = ( scomplex * ) FLA_COMPLEX_PTR( y );
82 scomplex *buff_rho = ( scomplex * ) FLA_COMPLEX_PTR( rho );
83 scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha );
84 scomplex *buff_beta = ( scomplex * ) FLA_COMPLEX_PTR( beta );
85
86 bl1_cdots( blis_conj,
87 num_elem,
88 buff_alpha,
89 buff_x, inc_x,
90 buff_y, inc_y,
91 buff_beta,
92 buff_rho );
93
94 break;
95 }
96
97 case FLA_DOUBLE_COMPLEX:
98 {
99 dcomplex *buff_x = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( x );
100 dcomplex *buff_y = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( y );
101 dcomplex *buff_rho = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( rho );
102 dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
103 dcomplex *buff_beta = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( beta );
104
105 bl1_zdots( blis_conj,
106 num_elem,
107 buff_alpha,
108 buff_x, inc_x,
109 buff_y, inc_y,
110 buff_beta,
111 buff_rho );
112
113 break;
114 }
115
116 }
117
118 return FLA_SUCCESS;
119}
FLA_Error FLA_Dotcs_check(FLA_Conj conj, FLA_Obj alpha, FLA_Obj x, FLA_Obj y, FLA_Obj beta, FLA_Obj rho)
Definition FLA_Dotcs_check.c:13
void bl1_zdots(conj1_t conj, int n, dcomplex *alpha, dcomplex *x, int incx, dcomplex *y, int incy, dcomplex *beta, dcomplex *rho)
Definition bl1_dots.c:56
void bl1_sdots(conj1_t conj, int n, float *alpha, float *x, int incx, float *y, int incy, float *beta, float *rho)
Definition bl1_dots.c:13
void bl1_ddots(conj1_t conj, int n, double *alpha, double *x, int incx, double *y, int incy, double *beta, double *rho)
Definition bl1_dots.c:26
void bl1_cdots(conj1_t conj, int n, scomplex *alpha, scomplex *x, int incx, scomplex *y, int incy, scomplex *beta, scomplex *rho)
Definition bl1_dots.c:39

References bl1_cdots(), bl1_ddots(), bl1_sdots(), bl1_zdots(), FLA_Check_error_level(), FLA_Dotcs_check(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_vector_dim(), FLA_Obj_vector_inc(), FLA_Param_map_flame_to_blis_conj(), FLA_Scal_external(), and rho.

Referenced by FLA_Chol_l_unb_var1(), FLA_Chol_l_unb_var2(), FLA_Chol_u_unb_var1(), FLA_Chol_u_unb_var2(), FLA_Dotcs(), FLA_Herk_lh_unb_var1(), FLA_Herk_lh_unb_var2(), FLA_Herk_lh_unb_var3(), FLA_Herk_lh_unb_var4(), FLA_Herk_ln_unb_var1(), FLA_Herk_ln_unb_var2(), FLA_Herk_ln_unb_var3(), FLA_Herk_ln_unb_var4(), FLA_Herk_uh_unb_var1(), FLA_Herk_uh_unb_var2(), FLA_Herk_uh_unb_var3(), FLA_Herk_uh_unb_var4(), FLA_Herk_un_unb_var1(), FLA_Herk_un_unb_var2(), FLA_Herk_un_unb_var3(), FLA_Herk_un_unb_var4(), FLA_Ttmm_l_unb_var2(), FLA_Ttmm_l_unb_var3(), FLA_Ttmm_u_unb_var2(), and FLA_Ttmm_u_unb_var3().

◆ FLA_Dots()

FLA_Error FLA_Dots ( FLA_Obj alpha,
FLA_Obj x,
FLA_Obj y,
FLA_Obj beta,
FLA_Obj rho )
14{
15 return FLA_Dots_external( alpha, x, y, beta, rho );
16}
FLA_Error FLA_Dots_external(FLA_Obj alpha, FLA_Obj x, FLA_Obj y, FLA_Obj beta, FLA_Obj rho)
Definition FLA_Dots_external.c:13

References FLA_Dots_external(), and rho.

Referenced by FLA_Hess_UT_step_unb_var5().

◆ FLA_Dots_check()

FLA_Error FLA_Dots_check ( FLA_Obj alpha,
FLA_Obj x,
FLA_Obj y,
FLA_Obj beta,
FLA_Obj rho )
14{
15 FLA_Error e_val;
16
17 e_val = FLA_Check_floating_object( x );
18 FLA_Check_error_code( e_val );
19
21 FLA_Check_error_code( e_val );
22
24 FLA_Check_error_code( e_val );
25
27 FLA_Check_error_code( e_val );
28
29 e_val = FLA_Check_consistent_object_datatype( x, alpha );
30 FLA_Check_error_code( e_val );
31
32 e_val = FLA_Check_consistent_object_datatype( x, beta );
33 FLA_Check_error_code( e_val );
34
35 e_val = FLA_Check_if_vector( x );
36 FLA_Check_error_code( e_val );
37
38 e_val = FLA_Check_if_vector( y );
39 FLA_Check_error_code( e_val );
40
41 e_val = FLA_Check_if_scalar( alpha );
42 FLA_Check_error_code( e_val );
43
44 e_val = FLA_Check_if_scalar( beta );
45 FLA_Check_error_code( e_val );
46
47 e_val = FLA_Check_if_scalar( rho );
48 FLA_Check_error_code( e_val );
49
50 e_val = FLA_Check_equal_vector_dims( x, y );
51 FLA_Check_error_code( e_val );
52
53 return FLA_SUCCESS;
54}

References FLA_Check_consistent_object_datatype(), FLA_Check_equal_vector_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_scalar(), FLA_Check_if_vector(), FLA_Check_nonconstant_object(), and rho.

Referenced by FLA_Dots_external().

◆ FLA_Dots_external()

FLA_Error FLA_Dots_external ( FLA_Obj alpha,
FLA_Obj x,
FLA_Obj y,
FLA_Obj beta,
FLA_Obj rho )
14{
15 FLA_Datatype datatype;
16 int num_elem;
17 int inc_x;
18 int inc_y;
19 conj1_t blis_conj;
20
21 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
22 FLA_Dots_check( alpha, x, y, beta, rho );
23
24 if ( FLA_Obj_has_zero_dim( x ) )
25 {
26 FLA_Scal_external( beta, rho );
27 return FLA_SUCCESS;
28 }
29
30 datatype = FLA_Obj_datatype( x );
31
32 inc_x = FLA_Obj_vector_inc( x );
33 inc_y = FLA_Obj_vector_inc( y );
34 num_elem = FLA_Obj_vector_dim( x );
35
36 FLA_Param_map_flame_to_blis_conj( FLA_NO_CONJUGATE, &blis_conj );
37
38 switch ( datatype ){
39
40 case FLA_FLOAT:
41 {
42 float *buff_x = ( float * ) FLA_FLOAT_PTR( x );
43 float *buff_y = ( float * ) FLA_FLOAT_PTR( y );
44 float *buff_rho = ( float * ) FLA_FLOAT_PTR( rho );
45 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
46 float *buff_beta = ( float * ) FLA_FLOAT_PTR( beta );
47
48 bl1_sdots( blis_conj,
49 num_elem,
50 buff_alpha,
51 buff_x, inc_x,
52 buff_y, inc_y,
53 buff_beta,
54 buff_rho );
55
56 break;
57 }
58
59 case FLA_DOUBLE:
60 {
61 double *buff_x = ( double * ) FLA_DOUBLE_PTR( x );
62 double *buff_y = ( double * ) FLA_DOUBLE_PTR( y );
63 double *buff_rho = ( double * ) FLA_DOUBLE_PTR( rho );
64 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
65 double *buff_beta = ( double * ) FLA_DOUBLE_PTR( beta );
66
67 bl1_ddots( blis_conj,
68 num_elem,
69 buff_alpha,
70 buff_x, inc_x,
71 buff_y, inc_y,
72 buff_beta,
73 buff_rho );
74
75 break;
76 }
77
78 case FLA_COMPLEX:
79 {
80 scomplex *buff_x = ( scomplex * ) FLA_COMPLEX_PTR( x );
81 scomplex *buff_y = ( scomplex * ) FLA_COMPLEX_PTR( y );
82 scomplex *buff_rho = ( scomplex * ) FLA_COMPLEX_PTR( rho );
83 scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha );
84 scomplex *buff_beta = ( scomplex * ) FLA_COMPLEX_PTR( beta );
85
86 bl1_cdots( blis_conj,
87 num_elem,
88 buff_alpha,
89 buff_x, inc_x,
90 buff_y, inc_y,
91 buff_beta,
92 buff_rho );
93
94 break;
95 }
96
97 case FLA_DOUBLE_COMPLEX:
98 {
99 dcomplex *buff_x = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( x );
100 dcomplex *buff_y = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( y );
101 dcomplex *buff_rho = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( rho );
102 dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
103 dcomplex *buff_beta = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( beta );
104
105 bl1_zdots( blis_conj,
106 num_elem,
107 buff_alpha,
108 buff_x, inc_x,
109 buff_y, inc_y,
110 buff_beta,
111 buff_rho );
112
113 break;
114 }
115
116 }
117
118 return FLA_SUCCESS;
119}
FLA_Error FLA_Dots_check(FLA_Obj alpha, FLA_Obj x, FLA_Obj y, FLA_Obj beta, FLA_Obj rho)
Definition FLA_Dots_check.c:13

References bl1_cdots(), bl1_ddots(), bl1_sdots(), bl1_zdots(), FLA_Check_error_level(), FLA_Dots_check(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_vector_dim(), FLA_Obj_vector_inc(), FLA_Param_map_flame_to_blis_conj(), FLA_Scal_external(), and rho.

Referenced by FLA_Dots(), FLA_LU_nopiv_unb_var1(), FLA_LU_nopiv_unb_var2(), FLA_LU_nopiv_unb_var3(), FLA_LU_nopiv_unb_var4(), FLA_LU_piv_unb_var3(), FLA_LU_piv_unb_var3b(), FLA_LU_piv_unb_var4(), FLA_Syrk_ln_unb_var1(), FLA_Syrk_ln_unb_var2(), FLA_Syrk_ln_unb_var3(), FLA_Syrk_ln_unb_var4(), FLA_Syrk_lt_unb_var1(), FLA_Syrk_lt_unb_var2(), FLA_Syrk_lt_unb_var3(), FLA_Syrk_lt_unb_var4(), FLA_Syrk_un_unb_var1(), FLA_Syrk_un_unb_var2(), FLA_Syrk_un_unb_var3(), FLA_Syrk_un_unb_var4(), FLA_Syrk_ut_unb_var1(), FLA_Syrk_ut_unb_var2(), FLA_Syrk_ut_unb_var3(), and FLA_Syrk_ut_unb_var4().

◆ FLA_Inv_scal()

◆ FLA_Inv_scal_check()

FLA_Error FLA_Inv_scal_check ( FLA_Obj alpha,
FLA_Obj A )
14{
15 FLA_Error e_val;
16
17 e_val = FLA_Check_floating_object( A );
18 FLA_Check_error_code( e_val );
19
21 FLA_Check_error_code( e_val );
22
23 if ( FLA_Obj_is_real( A ) )
24 {
25 e_val = FLA_Check_consistent_object_datatype( A, alpha );
26 FLA_Check_error_code( e_val );
27 }
28 else
29 {
30 e_val = FLA_Check_identical_object_precision( A, alpha );
31 FLA_Check_error_code( e_val );
32 }
33
34 e_val = FLA_Check_if_scalar( alpha );
35 FLA_Check_error_code( e_val );
36
37 e_val = FLA_Check_divide_by_zero( alpha );
38 FLA_Check_error_code( e_val );
39
40 return FLA_SUCCESS;
41}
FLA_Bool FLA_Obj_is_real(FLA_Obj A)
Definition FLA_Query.c:307
FLA_Error FLA_Check_divide_by_zero(FLA_Obj alpha)
Definition FLA_Check.c:977

References FLA_Check_consistent_object_datatype(), FLA_Check_divide_by_zero(), FLA_Check_floating_object(), FLA_Check_identical_object_precision(), FLA_Check_if_scalar(), FLA_Check_nonconstant_object(), and FLA_Obj_is_real().

Referenced by FLA_Inv_scal_external().

◆ FLA_Inv_scal_external()

FLA_Error FLA_Inv_scal_external ( FLA_Obj alpha,
FLA_Obj A )
14{
15 FLA_Datatype datatype, dt_alpha;
16 int m_A, n_A;
17 int rs_A, cs_A;
18 conj1_t blis_conj;
19
20 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
21 FLA_Inv_scal_check( alpha, A );
22
23 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
24
25 if ( FLA_Obj_equals( alpha, FLA_ONE ) ) return FLA_SUCCESS;
26
27 datatype = FLA_Obj_datatype( A );
28
29 m_A = FLA_Obj_length( A );
30 n_A = FLA_Obj_width( A );
31 rs_A = FLA_Obj_row_stride( A );
32 cs_A = FLA_Obj_col_stride( A );
33
34 if ( FLA_Obj_is_constant( alpha ) )
35 dt_alpha = datatype;
36 else
37 dt_alpha = FLA_Obj_datatype( alpha );
38
39 FLA_Param_map_flame_to_blis_conj( FLA_NO_CONJUGATE, &blis_conj );
40
41 switch ( datatype ){
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
48 bl1_sinvscalm( blis_conj,
49 m_A,
50 n_A,
51 buff_alpha,
52 buff_A, rs_A, cs_A );
53
54 break;
55 }
56
57 case FLA_DOUBLE:
58 {
59 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
60 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
61
62 bl1_dinvscalm( blis_conj,
63 m_A,
64 n_A,
65 buff_alpha,
66 buff_A, rs_A, cs_A );
67
68 break;
69 }
70
71 case FLA_COMPLEX:
72 {
73 if ( dt_alpha == FLA_COMPLEX )
74 {
75 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
76 scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha );
77
78 bl1_cinvscalm( blis_conj,
79 m_A,
80 n_A,
81 buff_alpha,
82 buff_A, rs_A, cs_A );
83 }
84 else if ( dt_alpha == FLA_FLOAT )
85 {
86 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
87 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
88
89 bl1_csinvscalm( blis_conj,
90 m_A,
91 n_A,
92 buff_alpha,
93 buff_A, rs_A, cs_A );
94 }
95
96 break;
97 }
98
99 case FLA_DOUBLE_COMPLEX:
100 {
101 if ( dt_alpha == FLA_DOUBLE_COMPLEX )
102 {
103 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
104 dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
105
106 bl1_zinvscalm( blis_conj,
107 m_A,
108 n_A,
109 buff_alpha,
110 buff_A, rs_A, cs_A );
111 }
112 else if ( dt_alpha == FLA_DOUBLE )
113 {
114 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
115 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
116
117 bl1_zdinvscalm( blis_conj,
118 m_A,
119 n_A,
120 buff_alpha,
121 buff_A, rs_A, cs_A );
122 }
123
124 break;
125 }
126
127 }
128
129 return FLA_SUCCESS;
130}
FLA_Error FLA_Inv_scal_check(FLA_Obj alpha, FLA_Obj A)
Definition FLA_Inv_scal_check.c:13
FLA_Obj FLA_ONE
Definition FLA_Init.c:18
FLA_Bool FLA_Obj_is_constant(FLA_Obj A)
Definition FLA_Query.c:290
FLA_Bool FLA_Obj_equals(FLA_Obj A, FLA_Obj B)
Definition FLA_Query.c:507
void bl1_sinvscalm(conj1_t conj, int m, int n, float *alpha, float *a, int a_rs, int a_cs)
Definition bl1_invscalm.c:13
void bl1_csinvscalm(conj1_t conj, int m, int n, float *alpha, scomplex *a, int a_rs, int a_cs)
Definition bl1_invscalm.c:117
void bl1_zdinvscalm(conj1_t conj, int m, int n, double *alpha, dcomplex *a, int a_rs, int a_cs)
Definition bl1_invscalm.c:221
void bl1_dinvscalm(conj1_t conj, int m, int n, double *alpha, double *a, int a_rs, int a_cs)
Definition bl1_invscalm.c:65
void bl1_cinvscalm(conj1_t conj, int m, int n, scomplex *alpha, scomplex *a, int a_rs, int a_cs)
Definition bl1_invscalm.c:169
void bl1_zinvscalm(conj1_t conj, int m, int n, dcomplex *alpha, dcomplex *a, int a_rs, int a_cs)
Definition bl1_invscalm.c:273

References bl1_cinvscalm(), bl1_csinvscalm(), bl1_dinvscalm(), bl1_sinvscalm(), bl1_zdinvscalm(), bl1_zinvscalm(), FLA_Check_error_level(), FLA_Inv_scal_check(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_equals(), FLA_Obj_has_zero_dim(), FLA_Obj_is_constant(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_ONE, and FLA_Param_map_flame_to_blis_conj().

Referenced by FLA_Apply_H2_UT_r_unb_var1(), FLA_Chol_l_unb_var2(), FLA_Chol_l_unb_var3(), FLA_Chol_u_unb_var2(), FLA_Chol_u_unb_var3(), FLA_Eig_gest_il_unb_var1(), FLA_Eig_gest_il_unb_var2(), FLA_Eig_gest_il_unb_var3(), FLA_Eig_gest_il_unb_var4(), FLA_Eig_gest_il_unb_var5(), FLA_Eig_gest_iu_unb_var1(), FLA_Eig_gest_iu_unb_var2(), FLA_Eig_gest_iu_unb_var3(), FLA_Eig_gest_iu_unb_var4(), FLA_Eig_gest_iu_unb_var5(), FLA_Inv_scal(), FLA_LU_nopiv_unb_var3(), FLA_LU_nopiv_unb_var4(), FLA_LU_nopiv_unb_var5(), FLA_LU_piv_unb_var3(), FLA_LU_piv_unb_var3b(), FLA_LU_piv_unb_var4(), FLA_LU_piv_unb_var5(), FLA_Trinv_ln_unb_var1(), FLA_Trinv_ln_unb_var2(), FLA_Trinv_ln_unb_var3(), FLA_Trinv_un_unb_var1(), FLA_Trinv_un_unb_var2(), FLA_Trinv_un_unb_var3(), FLA_Trsm_lln_unb_var1(), FLA_Trsm_lln_unb_var2(), FLA_Trsm_llt_unb_var1(), FLA_Trsm_llt_unb_var2(), FLA_Trsm_lun_unb_var1(), FLA_Trsm_lun_unb_var2(), FLA_Trsm_lut_unb_var1(), FLA_Trsm_lut_unb_var2(), FLA_Trsm_rln_unb_var1(), FLA_Trsm_rln_unb_var2(), FLA_Trsm_rlt_unb_var1(), FLA_Trsm_rlt_unb_var2(), FLA_Trsm_run_unb_var1(), FLA_Trsm_run_unb_var2(), FLA_Trsm_rut_unb_var1(), and FLA_Trsm_rut_unb_var2().

◆ FLA_Inv_scalc()

◆ FLA_Inv_scalc_check()

FLA_Error FLA_Inv_scalc_check ( FLA_Conj conjalpha,
FLA_Obj alpha,
FLA_Obj A )
14{
15 FLA_Error e_val;
16
17 e_val = FLA_Check_valid_conj( conjalpha );
18 FLA_Check_error_code( e_val );
19
20 e_val = FLA_Check_floating_object( A );
21 FLA_Check_error_code( e_val );
22
24 FLA_Check_error_code( e_val );
25
26 if ( FLA_Obj_is_real( A ) )
27 {
28 e_val = FLA_Check_consistent_object_datatype( A, alpha );
29 FLA_Check_error_code( e_val );
30 }
31 else
32 {
33 e_val = FLA_Check_identical_object_precision( A, alpha );
34 FLA_Check_error_code( e_val );
35 }
36
37 e_val = FLA_Check_if_scalar( alpha );
38 FLA_Check_error_code( e_val );
39
40 e_val = FLA_Check_divide_by_zero( alpha );
41 FLA_Check_error_code( e_val );
42
43 return FLA_SUCCESS;
44}

References FLA_Check_consistent_object_datatype(), FLA_Check_divide_by_zero(), FLA_Check_floating_object(), FLA_Check_identical_object_precision(), FLA_Check_if_scalar(), FLA_Check_nonconstant_object(), FLA_Check_valid_conj(), and FLA_Obj_is_real().

Referenced by FLA_Inv_scalc_external().

◆ FLA_Inv_scalc_external()

FLA_Error FLA_Inv_scalc_external ( FLA_Conj conjalpha,
FLA_Obj alpha,
FLA_Obj A )
14{
15 FLA_Datatype datatype, dt_alpha;
16 int m_A, n_A;
17 int rs_A, cs_A;
18 conj1_t blis_conj;
19
20 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
21 FLA_Inv_scalc_check( conj, alpha, A );
22
23 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
24
25 if ( FLA_Obj_equals( alpha, FLA_ONE ) ) return FLA_SUCCESS;
26
27 datatype = FLA_Obj_datatype( A );
28
29 m_A = FLA_Obj_length( A );
30 n_A = FLA_Obj_width( A );
31 rs_A = FLA_Obj_row_stride( A );
32 cs_A = FLA_Obj_col_stride( A );
33
34 if ( FLA_Obj_is_constant( alpha ) )
35 dt_alpha = datatype;
36 else
37 dt_alpha = FLA_Obj_datatype( alpha );
38
39 FLA_Param_map_flame_to_blis_conj( conj, &blis_conj );
40
41 switch ( datatype ){
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
48 bl1_sinvscalm( blis_conj,
49 m_A,
50 n_A,
51 buff_alpha,
52 buff_A, rs_A, cs_A );
53
54 break;
55 }
56
57 case FLA_DOUBLE:
58 {
59 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
60 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
61
62 bl1_dinvscalm( blis_conj,
63 m_A,
64 n_A,
65 buff_alpha,
66 buff_A, rs_A, cs_A );
67
68 break;
69 }
70
71 case FLA_COMPLEX:
72 {
73 if ( dt_alpha == FLA_COMPLEX )
74 {
75 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
76 scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha );
77
78 bl1_cinvscalm( blis_conj,
79 m_A,
80 n_A,
81 buff_alpha,
82 buff_A, rs_A, cs_A );
83 }
84 else if ( dt_alpha == FLA_FLOAT )
85 {
86 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
87 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
88
89 bl1_csinvscalm( blis_conj,
90 m_A,
91 n_A,
92 buff_alpha,
93 buff_A, rs_A, cs_A );
94 }
95
96 break;
97 }
98
99 case FLA_DOUBLE_COMPLEX:
100 {
101 if ( dt_alpha == FLA_DOUBLE_COMPLEX )
102 {
103 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
104 dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
105
106 bl1_zinvscalm( blis_conj,
107 m_A,
108 n_A,
109 buff_alpha,
110 buff_A, rs_A, cs_A );
111 }
112 else if ( dt_alpha == FLA_DOUBLE )
113 {
114 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
115 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
116
117 bl1_zdinvscalm( blis_conj,
118 m_A,
119 n_A,
120 buff_alpha,
121 buff_A, rs_A, cs_A );
122 }
123
124 break;
125 }
126
127 }
128
129 return FLA_SUCCESS;
130}
FLA_Error FLA_Inv_scalc_check(FLA_Conj conjalpha, FLA_Obj alpha, FLA_Obj A)
Definition FLA_Inv_scalc_check.c:13

References bl1_cinvscalm(), bl1_csinvscalm(), bl1_dinvscalm(), bl1_sinvscalm(), bl1_zdinvscalm(), bl1_zinvscalm(), FLA_Check_error_level(), FLA_Inv_scalc_check(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_equals(), FLA_Obj_has_zero_dim(), FLA_Obj_is_constant(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_ONE, and FLA_Param_map_flame_to_blis_conj().

Referenced by FLA_Apply_H2_UT_l_unb_var1(), FLA_Apply_H2_UT_piv_row(), FLA_Apply_HUD_UT_lh_unb_var1(), FLA_Inv_scalc(), FLA_Trsm_llc_unb_var1(), FLA_Trsm_llc_unb_var2(), FLA_Trsm_llh_unb_var1(), FLA_Trsm_llh_unb_var2(), FLA_Trsm_luc_unb_var1(), FLA_Trsm_luc_unb_var2(), FLA_Trsm_luh_unb_var1(), FLA_Trsm_luh_unb_var2(), FLA_Trsm_rlc_unb_var1(), FLA_Trsm_rlc_unb_var2(), FLA_Trsm_rlh_unb_var1(), FLA_Trsm_rlh_unb_var2(), FLA_Trsm_ruc_unb_var1(), FLA_Trsm_ruc_unb_var2(), FLA_Trsm_ruh_unb_var1(), and FLA_Trsm_ruh_unb_var2().

◆ FLA_Nrm2()

FLA_Error FLA_Nrm2 ( FLA_Obj x,
FLA_Obj norm_x )
14{
15 return FLA_Nrm2_external( x, norm_x );
16}
FLA_Error FLA_Nrm2_external(FLA_Obj x, FLA_Obj nrm_x)
Definition FLA_Nrm2_external.c:13

References FLA_Nrm2_external().

◆ FLA_Nrm2_check()

FLA_Error FLA_Nrm2_check ( FLA_Obj x,
FLA_Obj nrm_x )
14{
15 FLA_Error e_val;
16
17 e_val = FLA_Check_floating_object( x );
18 FLA_Check_error_code( e_val );
19
21 FLA_Check_error_code( e_val );
22
23 e_val = FLA_Check_real_object( norm );
24 FLA_Check_error_code( e_val );
25
26 e_val = FLA_Check_nonconstant_object( norm );
27 FLA_Check_error_code( e_val );
28
29 e_val = FLA_Check_identical_object_precision( x, norm );
30 FLA_Check_error_code( e_val );
31
32 e_val = FLA_Check_if_scalar( norm );
33 FLA_Check_error_code( e_val );
34
35 e_val = FLA_Check_if_vector( x );
36 FLA_Check_error_code( e_val );
37
38 return FLA_SUCCESS;
39}
FLA_Error FLA_Check_real_object(FLA_Obj A)
Definition FLA_Check.c:258

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

Referenced by FLA_Nrm2_external().

◆ FLA_Nrm2_external()

FLA_Error FLA_Nrm2_external ( FLA_Obj x,
FLA_Obj nrm_x )
14{
15 FLA_Datatype datatype;
16 int num_elem;
17 int inc_x;
18
19 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
20 FLA_Nrm2_check( x, norm_x );
21
22 if ( FLA_Obj_has_zero_dim( x ) )
23 {
24 FLA_Set( FLA_ZERO, norm_x );
25 return FLA_SUCCESS;
26 }
27
28 datatype = FLA_Obj_datatype( x );
29
30 inc_x = FLA_Obj_vector_inc( x );
31 num_elem = FLA_Obj_vector_dim( x );
32
33
34 switch ( datatype ){
35
36 case FLA_FLOAT:
37 {
38 float *buff_x = ( float * ) FLA_FLOAT_PTR( x );
39 float *buff_norm_x = ( float * ) FLA_FLOAT_PTR( norm_x );
40
41 bl1_snrm2( num_elem,
42 buff_x, inc_x,
43 buff_norm_x );
44
45 break;
46 }
47
48 case FLA_DOUBLE:
49 {
50 double *buff_x = ( double * ) FLA_DOUBLE_PTR( x );
51 double *buff_norm_x = ( double * ) FLA_DOUBLE_PTR( norm_x );
52
53 bl1_dnrm2( num_elem,
54 buff_x, inc_x,
55 buff_norm_x );
56
57 break;
58 }
59
60 case FLA_COMPLEX:
61 {
62 scomplex *buff_x = ( scomplex * ) FLA_COMPLEX_PTR( x );
63 float *buff_norm_x = ( float * ) FLA_FLOAT_PTR( norm_x );
64
65 bl1_cnrm2( num_elem,
66 buff_x, inc_x,
67 buff_norm_x );
68
69 break;
70 }
71
72 case FLA_DOUBLE_COMPLEX:
73 {
74 dcomplex *buff_x = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( x );
75 double *buff_norm_x = ( double * ) FLA_DOUBLE_PTR( norm_x );
76
77 bl1_znrm2( num_elem,
78 buff_x, inc_x,
79 buff_norm_x );
80
81 break;
82 }
83
84 }
85
86 return FLA_SUCCESS;
87}
FLA_Error FLA_Nrm2_check(FLA_Obj x, FLA_Obj norm)
Definition FLA_Nrm2_check.c:13
void bl1_znrm2(int n, dcomplex *x, int incx, double *norm)
Definition bl1_nrm2.c:46
void bl1_snrm2(int n, float *x, int incx, float *norm)
Definition bl1_nrm2.c:13
void bl1_dnrm2(int n, double *x, int incx, double *norm)
Definition bl1_nrm2.c:24
void bl1_cnrm2(int n, scomplex *x, int incx, float *norm)
Definition bl1_nrm2.c:35

References bl1_cnrm2(), bl1_dnrm2(), bl1_snrm2(), bl1_znrm2(), FLA_Check_error_level(), FLA_Nrm2_check(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_vector_dim(), FLA_Obj_vector_inc(), FLA_Set(), and FLA_ZERO.

Referenced by FLA_Nrm2().

◆ FLA_Scal()

FLA_Error FLA_Scal ( FLA_Obj alpha,
FLA_Obj A )
16{
17 FLA_Error r_val;
18
19#ifdef FLA_ENABLE_BLAS1_FRONT_END_CNTL_TREES
20 // Check parameters.
21 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
22 FLA_Scal_check( alpha, A );
23
24 // Invoke FLA_Scal_internal() with flat control tree that simply calls
25 // external wrapper.
26 r_val = FLA_Scal_internal( alpha, A, fla_scal_cntl_blas );
27
28#else
29 r_val = FLA_Scal_external( alpha, A );
30#endif
31
32 return r_val;
33}
fla_scal_t * fla_scal_cntl_blas
Definition FLA_Scal_cntl_init.c:13
FLA_Error FLA_Scal_internal(FLA_Obj alpha, FLA_Obj A, fla_scal_t *cntl)
Definition FLA_Scal_internal.c:16
FLA_Error FLA_Scal_check(FLA_Obj alpha, FLA_Obj A)
Definition FLA_Scal_check.c:13

References FLA_Check_error_level(), FLA_Scal_check(), fla_scal_cntl_blas, FLA_Scal_external(), and FLA_Scal_internal().

Referenced by FLA_Bidiag_UT_u_step_unb_var2(), FLA_Bidiag_UT_u_step_unb_var3(), FLA_Bidiag_UT_u_step_unb_var4(), FLA_Bidiag_UT_u_step_unb_var5(), FLA_Fill_with_geometric_dist(), FLA_Fill_with_random_dist(), FLA_Hess_UT_step_unb_var2(), FLA_Hess_UT_step_unb_var3(), FLA_Hess_UT_step_unb_var4(), 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(), FLA_Negate(), FLA_Svd_ext_u_unb_var1(), FLA_Svd_uv_unb_var1(), FLA_Svd_uv_unb_var2(), FLA_Tridiag_UT_l_step_unb_var1(), FLA_Tridiag_UT_l_step_unb_var2(), and FLA_Tridiag_UT_l_step_unb_var3().

◆ FLA_Scal_check()

FLA_Error FLA_Scal_check ( FLA_Obj alpha,
FLA_Obj A )
14{
15 FLA_Error e_val;
16
17 e_val = FLA_Check_floating_object( A );
18 FLA_Check_error_code( e_val );
19
21 FLA_Check_error_code( e_val );
22
23 if ( FLA_Obj_is_real( A ) )
24 {
25 e_val = FLA_Check_consistent_object_datatype( A, alpha );
26 FLA_Check_error_code( e_val );
27 }
28 else
29 {
30 e_val = FLA_Check_identical_object_precision( A, alpha );
31 FLA_Check_error_code( e_val );
32 }
33
34 e_val = FLA_Check_if_scalar( alpha );
35 FLA_Check_error_code( e_val );
36
37 return FLA_SUCCESS;
38}

References FLA_Check_consistent_object_datatype(), FLA_Check_floating_object(), FLA_Check_identical_object_precision(), FLA_Check_if_scalar(), FLA_Check_nonconstant_object(), and FLA_Obj_is_real().

Referenced by FLA_Scal(), FLA_Scal_external(), FLA_Scal_external_gpu(), and FLASH_Scal().

◆ FLA_Scal_external()

FLA_Error FLA_Scal_external ( FLA_Obj alpha,
FLA_Obj A )
14{
15 FLA_Datatype datatype, dt_alpha;
16 int m_A, n_A;
17 int rs_A, cs_A;
18 conj1_t blis_conj;
19
20 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
21 FLA_Scal_check( alpha, A );
22
23 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
24
25 if ( FLA_Obj_equals( alpha, FLA_ONE ) )
26 {
27 return FLA_SUCCESS;
28 }
29 else if ( FLA_Obj_equals( alpha, FLA_ZERO ) )
30 {
31 FLA_Set( FLA_ZERO, A );
32 return FLA_SUCCESS;
33 }
34
35 datatype = FLA_Obj_datatype( A );
36
37 m_A = FLA_Obj_length( A );
38 n_A = FLA_Obj_width( A );
39 rs_A = FLA_Obj_row_stride( A );
40 cs_A = FLA_Obj_col_stride( A );
41
42 if ( FLA_Obj_is_constant( alpha ) )
43 dt_alpha = datatype;
44 else
45 dt_alpha = FLA_Obj_datatype( alpha );
46
47 FLA_Param_map_flame_to_blis_conj( FLA_NO_CONJUGATE, &blis_conj );
48
49 switch ( datatype ){
50
51 case FLA_FLOAT:
52 {
53 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
54 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
55
56 bl1_sscalm( blis_conj,
57 m_A,
58 n_A,
59 buff_alpha,
60 buff_A, rs_A, cs_A );
61
62 break;
63 }
64
65 case FLA_DOUBLE:
66 {
67 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
68 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
69
70 bl1_dscalm( blis_conj,
71 m_A,
72 n_A,
73 buff_alpha,
74 buff_A, rs_A, cs_A );
75
76 break;
77 }
78
79 case FLA_COMPLEX:
80 {
81 if ( dt_alpha == FLA_COMPLEX )
82 {
83 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
84 scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha );
85
86 bl1_cscalm( blis_conj,
87 m_A,
88 n_A,
89 buff_alpha,
90 buff_A, rs_A, cs_A );
91 }
92 else if ( dt_alpha == FLA_FLOAT )
93 {
94 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
95 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
96
97 bl1_csscalm( blis_conj,
98 m_A,
99 n_A,
100 buff_alpha,
101 buff_A, rs_A, cs_A );
102 }
103
104 break;
105 }
106
107 case FLA_DOUBLE_COMPLEX:
108 {
109 if ( dt_alpha == FLA_DOUBLE_COMPLEX )
110 {
111 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
112 dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
113
114 bl1_zscalm( blis_conj,
115 m_A,
116 n_A,
117 buff_alpha,
118 buff_A, rs_A, cs_A );
119 }
120 else if ( dt_alpha == FLA_DOUBLE )
121 {
122 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
123 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
124
125 bl1_zdscalm( blis_conj,
126 m_A,
127 n_A,
128 buff_alpha,
129 buff_A, rs_A, cs_A );
130 }
131
132 break;
133 }
134
135 }
136
137 return FLA_SUCCESS;
138}
void bl1_zscalm(conj1_t conj, int m, int n, dcomplex *alpha, dcomplex *a, int a_rs, int a_cs)
Definition bl1_scalm.c:273
void bl1_csscalm(conj1_t conj, int m, int n, float *alpha, scomplex *a, int a_rs, int a_cs)
Definition bl1_scalm.c:117
void bl1_zdscalm(conj1_t conj, int m, int n, double *alpha, dcomplex *a, int a_rs, int a_cs)
Definition bl1_scalm.c:221
void bl1_cscalm(conj1_t conj, int m, int n, scomplex *alpha, scomplex *a, int a_rs, int a_cs)
Definition bl1_scalm.c:169
void bl1_sscalm(conj1_t conj, int m, int n, float *alpha, float *a, int a_rs, int a_cs)
Definition bl1_scalm.c:13
void bl1_dscalm(conj1_t conj, int m, int n, double *alpha, double *a, int a_rs, int a_cs)
Definition bl1_scalm.c:65

References bl1_cscalm(), bl1_csscalm(), bl1_dscalm(), bl1_sscalm(), bl1_zdscalm(), bl1_zscalm(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_equals(), FLA_Obj_has_zero_dim(), FLA_Obj_is_constant(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_ONE, FLA_Param_map_flame_to_blis_conj(), FLA_Scal_check(), FLA_Set(), and FLA_ZERO.

Referenced by FLA_Dot2cs_external(), FLA_Dot2s_external(), FLA_Dotcs_external(), FLA_Dots_external(), FLA_Eig_gest_il_unb_var3(), FLA_Eig_gest_il_unb_var4(), FLA_Eig_gest_il_unb_var5(), FLA_Eig_gest_iu_unb_var3(), FLA_Eig_gest_iu_unb_var4(), FLA_Eig_gest_iu_unb_var5(), FLA_Eig_gest_nl_unb_var1(), FLA_Eig_gest_nl_unb_var2(), FLA_Eig_gest_nl_unb_var4(), FLA_Eig_gest_nl_unb_var5(), FLA_Eig_gest_nu_unb_var1(), FLA_Eig_gest_nu_unb_var2(), FLA_Eig_gest_nu_unb_var4(), FLA_Eig_gest_nu_unb_var5(), FLA_Gemm_cc_unb_var1(), FLA_Gemm_cc_unb_var2(), FLA_Gemm_cc_unb_var3(), FLA_Gemm_cc_unb_var4(), FLA_Gemm_cc_unb_var5(), FLA_Gemm_cc_unb_var6(), FLA_Gemm_ch_unb_var1(), FLA_Gemm_ch_unb_var2(), FLA_Gemm_ch_unb_var3(), FLA_Gemm_ch_unb_var4(), FLA_Gemm_ch_unb_var5(), FLA_Gemm_ch_unb_var6(), FLA_Gemm_cn_unb_var1(), FLA_Gemm_cn_unb_var2(), FLA_Gemm_cn_unb_var3(), FLA_Gemm_cn_unb_var4(), FLA_Gemm_cn_unb_var5(), FLA_Gemm_cn_unb_var6(), FLA_Gemm_ct_unb_var1(), FLA_Gemm_ct_unb_var2(), FLA_Gemm_ct_unb_var3(), FLA_Gemm_ct_unb_var4(), FLA_Gemm_ct_unb_var5(), FLA_Gemm_ct_unb_var6(), FLA_Gemm_external(), FLA_Gemm_hc_unb_var1(), FLA_Gemm_hc_unb_var2(), FLA_Gemm_hc_unb_var3(), FLA_Gemm_hc_unb_var4(), FLA_Gemm_hc_unb_var5(), FLA_Gemm_hc_unb_var6(), FLA_Gemm_hh_unb_var1(), FLA_Gemm_hh_unb_var2(), FLA_Gemm_hh_unb_var3(), FLA_Gemm_hh_unb_var4(), FLA_Gemm_hh_unb_var5(), FLA_Gemm_hh_unb_var6(), FLA_Gemm_hn_unb_var1(), FLA_Gemm_hn_unb_var2(), FLA_Gemm_hn_unb_var3(), FLA_Gemm_hn_unb_var4(), FLA_Gemm_hn_unb_var5(), FLA_Gemm_hn_unb_var6(), FLA_Gemm_ht_unb_var1(), FLA_Gemm_ht_unb_var2(), FLA_Gemm_ht_unb_var3(), FLA_Gemm_ht_unb_var4(), FLA_Gemm_ht_unb_var5(), FLA_Gemm_ht_unb_var6(), FLA_Gemm_nc_unb_var1(), FLA_Gemm_nc_unb_var2(), FLA_Gemm_nc_unb_var3(), FLA_Gemm_nc_unb_var4(), FLA_Gemm_nc_unb_var5(), FLA_Gemm_nc_unb_var6(), FLA_Gemm_nh_unb_var1(), FLA_Gemm_nh_unb_var2(), FLA_Gemm_nh_unb_var3(), FLA_Gemm_nh_unb_var4(), FLA_Gemm_nh_unb_var5(), FLA_Gemm_nh_unb_var6(), FLA_Gemm_nn_unb_var1(), FLA_Gemm_nn_unb_var2(), FLA_Gemm_nn_unb_var3(), FLA_Gemm_nn_unb_var4(), FLA_Gemm_nn_unb_var5(), FLA_Gemm_nn_unb_var6(), FLA_Gemm_nt_unb_var1(), FLA_Gemm_nt_unb_var2(), FLA_Gemm_nt_unb_var3(), FLA_Gemm_nt_unb_var4(), FLA_Gemm_nt_unb_var5(), FLA_Gemm_nt_unb_var6(), FLA_Gemm_tc_unb_var1(), FLA_Gemm_tc_unb_var2(), FLA_Gemm_tc_unb_var3(), FLA_Gemm_tc_unb_var4(), FLA_Gemm_tc_unb_var5(), FLA_Gemm_tc_unb_var6(), FLA_Gemm_th_unb_var1(), FLA_Gemm_th_unb_var2(), FLA_Gemm_th_unb_var3(), FLA_Gemm_th_unb_var4(), FLA_Gemm_th_unb_var5(), FLA_Gemm_th_unb_var6(), FLA_Gemm_tn_unb_var1(), FLA_Gemm_tn_unb_var2(), FLA_Gemm_tn_unb_var3(), FLA_Gemm_tn_unb_var4(), FLA_Gemm_tn_unb_var5(), FLA_Gemm_tn_unb_var6(), FLA_Gemm_tt_unb_var1(), FLA_Gemm_tt_unb_var2(), FLA_Gemm_tt_unb_var3(), FLA_Gemm_tt_unb_var4(), FLA_Gemm_tt_unb_var5(), FLA_Gemm_tt_unb_var6(), FLA_Gemv_external(), FLA_Gemvc_external(), FLA_Hemm_ll_unb_var1(), FLA_Hemm_ll_unb_var2(), FLA_Hemm_ll_unb_var3(), FLA_Hemm_ll_unb_var4(), FLA_Hemm_ll_unb_var5(), FLA_Hemm_ll_unb_var6(), FLA_Hemm_ll_unb_var7(), FLA_Hemm_ll_unb_var8(), FLA_Hemm_lu_unb_var1(), FLA_Hemm_lu_unb_var2(), FLA_Hemm_lu_unb_var3(), FLA_Hemm_lu_unb_var4(), FLA_Hemm_lu_unb_var5(), FLA_Hemm_lu_unb_var6(), FLA_Hemm_lu_unb_var7(), FLA_Hemm_lu_unb_var8(), FLA_Hemm_rl_unb_var1(), FLA_Hemm_rl_unb_var2(), FLA_Hemm_rl_unb_var3(), FLA_Hemm_rl_unb_var4(), FLA_Hemm_rl_unb_var5(), FLA_Hemm_rl_unb_var6(), FLA_Hemm_rl_unb_var7(), FLA_Hemm_rl_unb_var8(), FLA_Hemm_ru_unb_var1(), FLA_Hemm_ru_unb_var2(), FLA_Hemm_ru_unb_var3(), FLA_Hemm_ru_unb_var4(), FLA_Hemm_ru_unb_var5(), FLA_Hemm_ru_unb_var6(), FLA_Hemm_ru_unb_var7(), FLA_Hemm_ru_unb_var8(), FLA_Her2k_external(), FLA_Herk_external(), FLA_Scal(), FLA_Scal_task(), FLA_Symm_ll_unb_var1(), FLA_Symm_ll_unb_var2(), FLA_Symm_ll_unb_var3(), FLA_Symm_ll_unb_var4(), FLA_Symm_ll_unb_var5(), FLA_Symm_ll_unb_var6(), FLA_Symm_ll_unb_var7(), FLA_Symm_ll_unb_var8(), FLA_Symm_lu_unb_var1(), FLA_Symm_lu_unb_var2(), FLA_Symm_lu_unb_var3(), FLA_Symm_lu_unb_var4(), FLA_Symm_lu_unb_var5(), FLA_Symm_lu_unb_var6(), FLA_Symm_lu_unb_var7(), FLA_Symm_lu_unb_var8(), FLA_Symm_rl_unb_var1(), FLA_Symm_rl_unb_var2(), FLA_Symm_rl_unb_var3(), FLA_Symm_rl_unb_var4(), FLA_Symm_rl_unb_var5(), FLA_Symm_rl_unb_var6(), FLA_Symm_rl_unb_var7(), FLA_Symm_rl_unb_var8(), FLA_Symm_ru_unb_var1(), FLA_Symm_ru_unb_var2(), FLA_Symm_ru_unb_var3(), FLA_Symm_ru_unb_var4(), FLA_Symm_ru_unb_var5(), FLA_Symm_ru_unb_var6(), FLA_Symm_ru_unb_var7(), FLA_Symm_ru_unb_var8(), FLA_Syr2k_external(), FLA_Syrk_external(), FLA_Trinv_ln_unb_var1(), FLA_Trinv_ln_unb_var2(), FLA_Trinv_ln_unb_var3(), FLA_Trinv_ln_unb_var4(), FLA_Trinv_lu_unb_var1(), FLA_Trinv_lu_unb_var2(), FLA_Trinv_lu_unb_var3(), FLA_Trinv_lu_unb_var4(), FLA_Trinv_un_unb_var1(), FLA_Trinv_un_unb_var2(), FLA_Trinv_un_unb_var3(), FLA_Trinv_un_unb_var4(), FLA_Trinv_uu_unb_var1(), FLA_Trinv_uu_unb_var2(), FLA_Trinv_uu_unb_var3(), FLA_Trinv_uu_unb_var4(), FLA_Trmm_llc_unb_var1(), FLA_Trmm_llc_unb_var2(), FLA_Trmm_llc_unb_var3(), FLA_Trmm_llc_unb_var4(), FLA_Trmm_llh_unb_var1(), FLA_Trmm_llh_unb_var2(), FLA_Trmm_llh_unb_var3(), FLA_Trmm_llh_unb_var4(), FLA_Trmm_lln_unb_var1(), FLA_Trmm_lln_unb_var2(), FLA_Trmm_lln_unb_var3(), FLA_Trmm_lln_unb_var4(), FLA_Trmm_llt_unb_var1(), FLA_Trmm_llt_unb_var2(), FLA_Trmm_llt_unb_var3(), FLA_Trmm_llt_unb_var4(), FLA_Trmm_luc_unb_var1(), FLA_Trmm_luc_unb_var2(), FLA_Trmm_luc_unb_var3(), FLA_Trmm_luc_unb_var4(), FLA_Trmm_luh_unb_var1(), FLA_Trmm_luh_unb_var2(), FLA_Trmm_luh_unb_var3(), FLA_Trmm_luh_unb_var4(), FLA_Trmm_lun_unb_var1(), FLA_Trmm_lun_unb_var2(), FLA_Trmm_lun_unb_var3(), FLA_Trmm_lun_unb_var4(), FLA_Trmm_lut_unb_var1(), FLA_Trmm_lut_unb_var2(), FLA_Trmm_lut_unb_var3(), FLA_Trmm_lut_unb_var4(), FLA_Trmm_rlc_unb_var1(), FLA_Trmm_rlc_unb_var2(), FLA_Trmm_rlc_unb_var3(), FLA_Trmm_rlc_unb_var4(), FLA_Trmm_rlh_unb_var1(), FLA_Trmm_rlh_unb_var2(), FLA_Trmm_rlh_unb_var3(), FLA_Trmm_rlh_unb_var4(), FLA_Trmm_rln_unb_var1(), FLA_Trmm_rln_unb_var2(), FLA_Trmm_rln_unb_var3(), FLA_Trmm_rln_unb_var4(), FLA_Trmm_rlt_unb_var1(), FLA_Trmm_rlt_unb_var2(), FLA_Trmm_rlt_unb_var3(), FLA_Trmm_rlt_unb_var4(), FLA_Trmm_ruc_unb_var1(), FLA_Trmm_ruc_unb_var2(), FLA_Trmm_ruc_unb_var3(), FLA_Trmm_ruc_unb_var4(), FLA_Trmm_ruh_unb_var1(), FLA_Trmm_ruh_unb_var2(), FLA_Trmm_ruh_unb_var3(), FLA_Trmm_ruh_unb_var4(), FLA_Trmm_run_unb_var1(), FLA_Trmm_run_unb_var2(), FLA_Trmm_run_unb_var3(), FLA_Trmm_run_unb_var4(), FLA_Trmm_rut_unb_var1(), FLA_Trmm_rut_unb_var2(), FLA_Trmm_rut_unb_var3(), FLA_Trmm_rut_unb_var4(), FLA_Trmvsx_external(), FLA_Trsm_llc_unb_var1(), FLA_Trsm_llc_unb_var2(), FLA_Trsm_llc_unb_var3(), FLA_Trsm_llc_unb_var4(), FLA_Trsm_llh_unb_var1(), FLA_Trsm_llh_unb_var2(), FLA_Trsm_llh_unb_var3(), FLA_Trsm_llh_unb_var4(), FLA_Trsm_lln_unb_var1(), FLA_Trsm_lln_unb_var2(), FLA_Trsm_lln_unb_var3(), FLA_Trsm_lln_unb_var4(), FLA_Trsm_llt_unb_var1(), FLA_Trsm_llt_unb_var2(), FLA_Trsm_llt_unb_var3(), FLA_Trsm_llt_unb_var4(), FLA_Trsm_luc_unb_var1(), FLA_Trsm_luc_unb_var2(), FLA_Trsm_luc_unb_var3(), FLA_Trsm_luc_unb_var4(), FLA_Trsm_luh_unb_var1(), FLA_Trsm_luh_unb_var2(), FLA_Trsm_luh_unb_var3(), FLA_Trsm_luh_unb_var4(), FLA_Trsm_lun_unb_var1(), FLA_Trsm_lun_unb_var2(), FLA_Trsm_lun_unb_var3(), FLA_Trsm_lun_unb_var4(), FLA_Trsm_lut_unb_var1(), FLA_Trsm_lut_unb_var2(), FLA_Trsm_lut_unb_var3(), FLA_Trsm_lut_unb_var4(), FLA_Trsm_rlc_unb_var1(), FLA_Trsm_rlc_unb_var2(), FLA_Trsm_rlc_unb_var3(), FLA_Trsm_rlc_unb_var4(), FLA_Trsm_rlh_unb_var1(), FLA_Trsm_rlh_unb_var2(), FLA_Trsm_rlh_unb_var3(), FLA_Trsm_rlh_unb_var4(), FLA_Trsm_rln_unb_var1(), FLA_Trsm_rln_unb_var2(), FLA_Trsm_rln_unb_var3(), FLA_Trsm_rln_unb_var4(), FLA_Trsm_rlt_unb_var1(), FLA_Trsm_rlt_unb_var2(), FLA_Trsm_rlt_unb_var3(), FLA_Trsm_rlt_unb_var4(), FLA_Trsm_ruc_unb_var1(), FLA_Trsm_ruc_unb_var2(), FLA_Trsm_ruc_unb_var3(), FLA_Trsm_ruc_unb_var4(), FLA_Trsm_ruh_unb_var1(), FLA_Trsm_ruh_unb_var2(), FLA_Trsm_ruh_unb_var3(), FLA_Trsm_ruh_unb_var4(), FLA_Trsm_run_unb_var1(), FLA_Trsm_run_unb_var2(), FLA_Trsm_run_unb_var3(), FLA_Trsm_run_unb_var4(), FLA_Trsm_rut_unb_var1(), FLA_Trsm_rut_unb_var2(), FLA_Trsm_rut_unb_var3(), FLA_Trsm_rut_unb_var4(), FLA_Trsvsx_external(), FLA_Ttmm_l_unb_var1(), FLA_Ttmm_l_unb_var2(), FLA_Ttmm_u_unb_var1(), and FLA_Ttmm_u_unb_var2().

◆ FLA_Scal_external_gpu()

FLA_Error FLA_Scal_external_gpu ( FLA_Obj alpha,
FLA_Obj A,
void * A_gpu )
18{
19 FLA_Datatype datatype;
20 int m_A, n_A;
21 int ldim_A, inc_A;
22 int i;
23
24 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
25 FLA_Scal_check( alpha, A );
26
27 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
28
29 if ( FLA_Obj_equals( alpha, FLA_ONE ) )
30 {
31 return FLA_SUCCESS;
32 }
33
34 datatype = FLA_Obj_datatype( A );
35
36 m_A = FLA_Obj_length( A );
37 n_A = FLA_Obj_width( A );
38 ldim_A = FLA_Obj_length( A );
39 inc_A = 1;
40
41 switch ( datatype ){
42
43 case FLA_FLOAT:
44 {
45 float* buff_alpha = ( float* ) FLA_FLOAT_PTR( alpha );
46 float* buff_A_gpu = ( float* ) A_gpu;
47
48 for ( i = 0; i < n_A; i++ )
49 cublasSscal( m_A,
50 *buff_alpha,
51 buff_A_gpu + i * ldim_A, inc_A );
52
53 break;
54 }
55
56 case FLA_DOUBLE:
57 {
58 double* buff_alpha = ( double* ) FLA_DOUBLE_PTR( alpha );
59 double* buff_A_gpu = ( double* ) A_gpu;
60
61 for ( i = 0; i < n_A; i++ )
62 cublasDscal( m_A,
63 *buff_alpha,
64 buff_A_gpu + i * ldim_A, inc_A );
65
66 break;
67 }
68
69 case FLA_COMPLEX:
70 {
71 cuComplex* buff_alpha = ( cuComplex* ) FLA_COMPLEX_PTR( alpha );
72 cuComplex* buff_A_gpu = ( cuComplex* ) A_gpu;
73
74 for ( i = 0; i < n_A; i++ )
75 cublasCscal( m_A,
76 *buff_alpha,
77 buff_A_gpu + i * ldim_A, inc_A );
78
79 break;
80 }
81
82 case FLA_DOUBLE_COMPLEX:
83 {
84 cuDoubleComplex* buff_alpha = ( cuDoubleComplex* ) FLA_DOUBLE_COMPLEX_PTR( alpha );
85 cuDoubleComplex* buff_A_gpu = ( cuDoubleComplex* ) A_gpu;
86
87 for ( i = 0; i < n_A; i++ )
88 cublasZscal( m_A,
89 *buff_alpha,
90 buff_A_gpu + i * ldim_A, inc_A );
91
92 break;
93 }
94
95 }
96
97 return FLA_SUCCESS;
98}

References FLA_Check_error_level(), FLA_Obj_datatype(), FLA_Obj_equals(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_width(), FLA_ONE, FLA_Scal_check(), and i.

Referenced by FLA_Gemm_external_gpu(), and FLASH_Queue_exec_task_gpu().

◆ FLA_Scal_internal_check()

FLA_Error FLA_Scal_internal_check ( FLA_Obj alpha,
FLA_Obj A,
fla_scal_t * cntl )
14{
15 FLA_Error e_val;
16
17 // Abort if the control structure is NULL.
18 e_val = FLA_Check_null_pointer( ( void* ) cntl );
19 FLA_Check_error_code( e_val );
20
21 return FLA_SUCCESS;
22}

References FLA_Check_null_pointer().

Referenced by FLA_Scal_internal().

◆ FLA_Scal_task()

FLA_Error FLA_Scal_task ( FLA_Obj alpha,
FLA_Obj A,
fla_scal_t * cntl )
14{
15 return FLA_Scal_external( alpha, A );
16}

References FLA_Scal_external().

Referenced by FLA_Scal_internal(), FLASH_Queue_exec_task(), and FLASH_Queue_exec_task_gpu().

◆ FLA_Scalc()

FLA_Error FLA_Scalc ( FLA_Conj conjalpha,
FLA_Obj alpha,
FLA_Obj A )
14{
15 return FLA_Scalc_external( conjalpha, alpha, A );
16}
FLA_Error FLA_Scalc_external(FLA_Conj conjalpha, FLA_Obj alpha, FLA_Obj A)
Definition FLA_Scalc_external.c:13

References FLA_Scalc_external().

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_Scalc_check()

FLA_Error FLA_Scalc_check ( FLA_Conj conjalpha,
FLA_Obj alpha,
FLA_Obj A )
14{
15 FLA_Error e_val;
16
17 e_val = FLA_Check_valid_conj( conjalpha );
18 FLA_Check_error_code( e_val );
19
20 e_val = FLA_Check_floating_object( A );
21 FLA_Check_error_code( e_val );
22
24 FLA_Check_error_code( e_val );
25
26 if ( FLA_Obj_is_real( A ) )
27 {
28 e_val = FLA_Check_consistent_object_datatype( A, alpha );
29 FLA_Check_error_code( e_val );
30 }
31 else
32 {
33 e_val = FLA_Check_identical_object_precision( A, alpha );
34 FLA_Check_error_code( e_val );
35 }
36
37 e_val = FLA_Check_if_scalar( alpha );
38 FLA_Check_error_code( e_val );
39
40 return FLA_SUCCESS;
41}

References FLA_Check_consistent_object_datatype(), FLA_Check_floating_object(), FLA_Check_identical_object_precision(), FLA_Check_if_scalar(), FLA_Check_nonconstant_object(), FLA_Check_valid_conj(), and FLA_Obj_is_real().

Referenced by FLA_Scalc_external().

◆ FLA_Scalc_external()

FLA_Error FLA_Scalc_external ( FLA_Conj conjalpha,
FLA_Obj alpha,
FLA_Obj A )
14{
15 FLA_Datatype datatype, dt_alpha;
16 int m_A, n_A;
17 int rs_A, cs_A;
18 conj1_t blis_conj;
19
20 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
21 FLA_Scalc_check( conj, alpha, A );
22
23 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
24
25 if ( FLA_Obj_equals( alpha, FLA_ONE ) )
26 {
27 return FLA_SUCCESS;
28 }
29 else if ( FLA_Obj_equals( alpha, FLA_ZERO ) )
30 {
31 FLA_Set( FLA_ZERO, A );
32 return FLA_SUCCESS;
33 }
34
35 datatype = FLA_Obj_datatype( A );
36
37 m_A = FLA_Obj_length( A );
38 n_A = FLA_Obj_width( A );
39 rs_A = FLA_Obj_row_stride( A );
40 cs_A = FLA_Obj_col_stride( A );
41
42 if ( FLA_Obj_is_constant( alpha ) )
43 dt_alpha = datatype;
44 else
45 dt_alpha = FLA_Obj_datatype( alpha );
46
47 FLA_Param_map_flame_to_blis_conj( conj, &blis_conj );
48
49 switch ( datatype ){
50
51 case FLA_FLOAT:
52 {
53 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
54 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
55
56 bl1_sscalm( blis_conj,
57 m_A,
58 n_A,
59 buff_alpha,
60 buff_A, rs_A, cs_A );
61
62 break;
63 }
64
65 case FLA_DOUBLE:
66 {
67 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
68 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
69
70 bl1_dscalm( blis_conj,
71 m_A,
72 n_A,
73 buff_alpha,
74 buff_A, rs_A, cs_A );
75
76 break;
77 }
78
79 case FLA_COMPLEX:
80 {
81 if ( dt_alpha == FLA_COMPLEX )
82 {
83 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
84 scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha );
85
86 bl1_cscalm( blis_conj,
87 m_A,
88 n_A,
89 buff_alpha,
90 buff_A, rs_A, cs_A );
91 }
92 else if ( dt_alpha == FLA_FLOAT )
93 {
94 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
95 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
96
97 bl1_csscalm( blis_conj,
98 m_A,
99 n_A,
100 buff_alpha,
101 buff_A, rs_A, cs_A );
102 }
103
104 break;
105 }
106
107 case FLA_DOUBLE_COMPLEX:
108 {
109 if ( dt_alpha == FLA_DOUBLE_COMPLEX )
110 {
111 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
112 dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
113
114 bl1_zscalm( blis_conj,
115 m_A,
116 n_A,
117 buff_alpha,
118 buff_A, rs_A, cs_A );
119 }
120 else if ( dt_alpha == FLA_DOUBLE )
121 {
122 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
123 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
124
125 bl1_zdscalm( blis_conj,
126 m_A,
127 n_A,
128 buff_alpha,
129 buff_A, rs_A, cs_A );
130 }
131
132 break;
133 }
134
135 }
136
137 return FLA_SUCCESS;
138}
FLA_Error FLA_Scalc_check(FLA_Conj conjalpha, FLA_Obj alpha, FLA_Obj A)
Definition FLA_Scalc_check.c:13

References bl1_cscalm(), bl1_csscalm(), bl1_dscalm(), bl1_sscalm(), bl1_zdscalm(), bl1_zscalm(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_equals(), FLA_Obj_has_zero_dim(), FLA_Obj_is_constant(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_ONE, FLA_Param_map_flame_to_blis_conj(), FLA_Scalc_check(), FLA_Set(), and FLA_ZERO.

Referenced by FLA_Scalc(), FLA_Trmm_llc_unb_var1(), FLA_Trmm_llc_unb_var2(), FLA_Trmm_llh_unb_var1(), FLA_Trmm_llh_unb_var2(), FLA_Trmm_luc_unb_var1(), FLA_Trmm_luc_unb_var2(), FLA_Trmm_luh_unb_var1(), FLA_Trmm_luh_unb_var2(), FLA_Trmm_rlc_unb_var1(), FLA_Trmm_rlc_unb_var2(), FLA_Trmm_rlh_unb_var1(), FLA_Trmm_rlh_unb_var2(), FLA_Trmm_ruc_unb_var1(), FLA_Trmm_ruc_unb_var2(), FLA_Trmm_ruh_unb_var1(), and FLA_Trmm_ruh_unb_var2().

◆ FLA_Scalr()

FLA_Error FLA_Scalr ( FLA_Uplo uplo,
FLA_Obj alpha,
FLA_Obj A )
16{
17 FLA_Error r_val;
18
19#ifdef FLA_ENABLE_BLAS1_FRONT_END_CNTL_TREES
20 // Check parameters.
21 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
22 FLA_Scalr_check( alpha, A );
23
24 // Invoke FLA_Scalr_internal() with flat control tree that simply calls
25 // external wrapper.
26 r_val = FLA_Scalr_internal( uplo, alpha, A, fla_scalr_cntl_blas );
27
28#else
29 r_val = FLA_Scalr_external( uplo, alpha, A );
30#endif
31
32 return r_val;
33}
fla_scalr_t * fla_scalr_cntl_blas
Definition FLA_Scalr_cntl_init.c:13
FLA_Error FLA_Scalr_internal(FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A, fla_scalr_t *cntl)
Definition FLA_Scalr_internal.c:16
FLA_Error FLA_Scalr_check(FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A)
Definition FLA_Scalr_check.c:13
FLA_Error FLA_Scalr_external(FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A)
Definition FLA_Scalr_external.c:13

References FLA_Check_error_level(), FLA_Scalr_check(), fla_scalr_cntl_blas, FLA_Scalr_external(), and FLA_Scalr_internal().

Referenced by FLA_Hevd_lv_unb_var1(), and FLA_Hevd_lv_unb_var2().

◆ FLA_Scalr_check()

FLA_Error FLA_Scalr_check ( FLA_Uplo uplo,
FLA_Obj alpha,
FLA_Obj A )
14{
15 FLA_Error e_val;
16
17 e_val = FLA_Check_valid_uplo( uplo );
18 FLA_Check_error_code( e_val );
19
20 e_val = FLA_Check_floating_object( A );
21 FLA_Check_error_code( e_val );
22
24 FLA_Check_error_code( e_val );
25
26 if ( FLA_Obj_is_real( A ) )
27 {
28 e_val = FLA_Check_consistent_object_datatype( A, alpha );
29 FLA_Check_error_code( e_val );
30 }
31 else
32 {
33 e_val = FLA_Check_identical_object_precision( A, alpha );
34 FLA_Check_error_code( e_val );
35 }
36
37 e_val = FLA_Check_if_scalar( alpha );
38 FLA_Check_error_code( e_val );
39
40 return FLA_SUCCESS;
41}

References FLA_Check_consistent_object_datatype(), FLA_Check_floating_object(), FLA_Check_identical_object_precision(), FLA_Check_if_scalar(), FLA_Check_nonconstant_object(), FLA_Check_valid_uplo(), and FLA_Obj_is_real().

Referenced by FLA_Scalr(), FLA_Scalr_external(), FLA_Scalr_external_gpu(), and FLASH_Scalr().

◆ FLA_Scalr_external()

FLA_Error FLA_Scalr_external ( FLA_Uplo uplo,
FLA_Obj alpha,
FLA_Obj A )
14{
15 FLA_Datatype datatype, dt_alpha;
16 int m_A, n_A;
17 int rs_A, cs_A;
18 uplo1_t blis_uplo;
19
20 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
21 FLA_Scalr_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 rs_A = FLA_Obj_row_stride( A );
30 cs_A = FLA_Obj_col_stride( A );
31
32 if ( FLA_Obj_is_constant( alpha ) )
33 dt_alpha = datatype;
34 else
35 dt_alpha = FLA_Obj_datatype( alpha );
36
37 FLA_Param_map_flame_to_blis_uplo( uplo, &blis_uplo );
38
39 switch ( datatype ){
40
41 case FLA_FLOAT:
42 {
43 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
44 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
45
46 bl1_sscalmr( blis_uplo,
47 m_A,
48 n_A,
49 buff_alpha,
50 buff_A, rs_A, cs_A );
51
52 break;
53 }
54
55 case FLA_DOUBLE:
56 {
57 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
58 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
59
60 bl1_dscalmr( blis_uplo,
61 m_A,
62 n_A,
63 buff_alpha,
64 buff_A, rs_A, cs_A );
65
66 break;
67 }
68
69 case FLA_COMPLEX:
70 {
71 if ( dt_alpha == FLA_COMPLEX )
72 {
73 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
74 scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha );
75
76 bl1_cscalmr( blis_uplo,
77 m_A,
78 n_A,
79 buff_alpha,
80 buff_A, rs_A, cs_A );
81 }
82 else if ( dt_alpha == FLA_FLOAT )
83 {
84 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
85 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
86
87 bl1_csscalmr( blis_uplo,
88 m_A,
89 n_A,
90 buff_alpha,
91 buff_A, rs_A, cs_A );
92 }
93
94 break;
95 }
96
97 case FLA_DOUBLE_COMPLEX:
98 {
99 if ( dt_alpha == FLA_DOUBLE_COMPLEX )
100 {
101 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
102 dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
103
104 bl1_zscalmr( blis_uplo,
105 m_A,
106 n_A,
107 buff_alpha,
108 buff_A, rs_A, cs_A );
109 }
110 else if ( dt_alpha == FLA_DOUBLE )
111 {
112 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
113 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
114
115 bl1_zdscalmr( blis_uplo,
116 m_A,
117 n_A,
118 buff_alpha,
119 buff_A, rs_A, cs_A );
120 }
121
122 break;
123 }
124
125 }
126
127 return FLA_SUCCESS;
128}
void bl1_csscalmr(uplo1_t uplo, int m, int n, float *alpha, scomplex *a, int a_rs, int a_cs)
Definition bl1_scalmr.c:125
void bl1_zdscalmr(uplo1_t uplo, int m, int n, double *alpha, dcomplex *a, int a_rs, int a_cs)
Definition bl1_scalmr.c:237
void bl1_zscalmr(uplo1_t uplo, int m, int n, dcomplex *alpha, dcomplex *a, int a_rs, int a_cs)
Definition bl1_scalmr.c:293
void bl1_cscalmr(uplo1_t uplo, int m, int n, scomplex *alpha, scomplex *a, int a_rs, int a_cs)
Definition bl1_scalmr.c:181
void bl1_sscalmr(uplo1_t uplo, int m, int n, float *alpha, float *a, int a_rs, int a_cs)
Definition bl1_scalmr.c:13
void bl1_dscalmr(uplo1_t uplo, int m, int n, double *alpha, double *a, int a_rs, int a_cs)
Definition bl1_scalmr.c:69

References bl1_cscalmr(), bl1_csscalmr(), bl1_dscalmr(), bl1_sscalmr(), bl1_zdscalmr(), bl1_zscalmr(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_is_constant(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_Param_map_flame_to_blis_uplo(), and FLA_Scalr_check().

Referenced by FLA_Her2k_lh_unb_var1(), FLA_Her2k_lh_unb_var10(), FLA_Her2k_lh_unb_var2(), FLA_Her2k_lh_unb_var3(), FLA_Her2k_lh_unb_var4(), FLA_Her2k_lh_unb_var5(), FLA_Her2k_lh_unb_var6(), FLA_Her2k_lh_unb_var7(), FLA_Her2k_lh_unb_var8(), FLA_Her2k_lh_unb_var9(), FLA_Her2k_ln_unb_var1(), FLA_Her2k_ln_unb_var10(), FLA_Her2k_ln_unb_var2(), FLA_Her2k_ln_unb_var3(), FLA_Her2k_ln_unb_var4(), FLA_Her2k_ln_unb_var5(), FLA_Her2k_ln_unb_var6(), FLA_Her2k_ln_unb_var7(), FLA_Her2k_ln_unb_var8(), FLA_Her2k_ln_unb_var9(), FLA_Her2k_uh_unb_var1(), FLA_Her2k_uh_unb_var10(), FLA_Her2k_uh_unb_var2(), FLA_Her2k_uh_unb_var3(), FLA_Her2k_uh_unb_var4(), FLA_Her2k_uh_unb_var5(), FLA_Her2k_uh_unb_var6(), FLA_Her2k_uh_unb_var7(), FLA_Her2k_uh_unb_var8(), FLA_Her2k_uh_unb_var9(), FLA_Her2k_un_unb_var1(), FLA_Her2k_un_unb_var10(), FLA_Her2k_un_unb_var2(), FLA_Her2k_un_unb_var3(), FLA_Her2k_un_unb_var4(), FLA_Her2k_un_unb_var5(), FLA_Her2k_un_unb_var6(), FLA_Her2k_un_unb_var7(), FLA_Her2k_un_unb_var8(), FLA_Her2k_un_unb_var9(), FLA_Herk_lh_unb_var1(), FLA_Herk_lh_unb_var2(), FLA_Herk_lh_unb_var3(), FLA_Herk_lh_unb_var4(), FLA_Herk_lh_unb_var5(), FLA_Herk_lh_unb_var6(), FLA_Herk_ln_unb_var1(), FLA_Herk_ln_unb_var2(), FLA_Herk_ln_unb_var3(), FLA_Herk_ln_unb_var4(), FLA_Herk_ln_unb_var5(), FLA_Herk_ln_unb_var6(), FLA_Herk_uh_unb_var1(), FLA_Herk_uh_unb_var2(), FLA_Herk_uh_unb_var3(), FLA_Herk_uh_unb_var4(), FLA_Herk_uh_unb_var5(), FLA_Herk_uh_unb_var6(), FLA_Herk_un_unb_var1(), FLA_Herk_un_unb_var2(), FLA_Herk_un_unb_var3(), FLA_Herk_un_unb_var4(), FLA_Herk_un_unb_var5(), FLA_Herk_un_unb_var6(), FLA_Scalr(), FLA_Scalr_l_task(), FLA_Scalr_task(), FLA_Scalr_u_task(), FLA_Syr2k_ln_unb_var1(), FLA_Syr2k_ln_unb_var10(), FLA_Syr2k_ln_unb_var2(), FLA_Syr2k_ln_unb_var3(), FLA_Syr2k_ln_unb_var4(), FLA_Syr2k_ln_unb_var5(), FLA_Syr2k_ln_unb_var6(), FLA_Syr2k_ln_unb_var7(), FLA_Syr2k_ln_unb_var8(), FLA_Syr2k_ln_unb_var9(), FLA_Syr2k_lt_unb_var1(), FLA_Syr2k_lt_unb_var10(), FLA_Syr2k_lt_unb_var2(), FLA_Syr2k_lt_unb_var3(), FLA_Syr2k_lt_unb_var4(), FLA_Syr2k_lt_unb_var5(), FLA_Syr2k_lt_unb_var6(), FLA_Syr2k_lt_unb_var7(), FLA_Syr2k_lt_unb_var8(), FLA_Syr2k_lt_unb_var9(), FLA_Syr2k_un_unb_var1(), FLA_Syr2k_un_unb_var10(), FLA_Syr2k_un_unb_var2(), FLA_Syr2k_un_unb_var3(), FLA_Syr2k_un_unb_var4(), FLA_Syr2k_un_unb_var5(), FLA_Syr2k_un_unb_var6(), FLA_Syr2k_un_unb_var7(), FLA_Syr2k_un_unb_var8(), FLA_Syr2k_un_unb_var9(), FLA_Syr2k_ut_unb_var1(), FLA_Syr2k_ut_unb_var10(), FLA_Syr2k_ut_unb_var2(), FLA_Syr2k_ut_unb_var3(), FLA_Syr2k_ut_unb_var4(), FLA_Syr2k_ut_unb_var5(), FLA_Syr2k_ut_unb_var6(), FLA_Syr2k_ut_unb_var7(), FLA_Syr2k_ut_unb_var8(), FLA_Syr2k_ut_unb_var9(), FLA_Syrk_ln_unb_var1(), FLA_Syrk_ln_unb_var2(), FLA_Syrk_ln_unb_var3(), FLA_Syrk_ln_unb_var4(), FLA_Syrk_ln_unb_var5(), FLA_Syrk_ln_unb_var6(), FLA_Syrk_lt_unb_var1(), FLA_Syrk_lt_unb_var2(), FLA_Syrk_lt_unb_var3(), FLA_Syrk_lt_unb_var4(), FLA_Syrk_lt_unb_var5(), FLA_Syrk_lt_unb_var6(), FLA_Syrk_un_unb_var1(), FLA_Syrk_un_unb_var2(), FLA_Syrk_un_unb_var3(), FLA_Syrk_un_unb_var4(), FLA_Syrk_un_unb_var5(), FLA_Syrk_un_unb_var6(), FLA_Syrk_ut_unb_var1(), FLA_Syrk_ut_unb_var2(), FLA_Syrk_ut_unb_var3(), FLA_Syrk_ut_unb_var4(), FLA_Syrk_ut_unb_var5(), and FLA_Syrk_ut_unb_var6().

◆ FLA_Scalr_external_gpu()

FLA_Error FLA_Scalr_external_gpu ( FLA_Uplo uplo,
FLA_Obj alpha,
FLA_Obj A,
void * A_gpu )
18{
19 FLA_Datatype datatype;
20 int m_A, n_A;
21 int ldim_A, inc_A;
22 int i;
23
24 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
25 FLA_Scalr_check( uplo, alpha, A );
26
27 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
28
29 if ( FLA_Obj_equals( alpha, FLA_ONE ) )
30 {
31 return FLA_SUCCESS;
32 }
33
34 datatype = FLA_Obj_datatype( A );
35
36 m_A = FLA_Obj_length( A );
37 n_A = FLA_Obj_width( A );
38 ldim_A = FLA_Obj_length( A );
39 inc_A = 1;
40
41 if ( uplo == FLA_LOWER_TRIANGULAR ){
42
43 switch ( datatype ){
44
45 case FLA_FLOAT:
46 {
47 float* buff_alpha = ( float* ) FLA_FLOAT_PTR( alpha );
48 float* buff_A_gpu = ( float* ) A_gpu;
49
50 for ( i = 0; i < min( n_A, m_A ); i++ )
51 cublasSscal( m_A - i,
52 *buff_alpha,
53 buff_A_gpu + i * ldim_A + i, inc_A );
54
55 break;
56 }
57
58 case FLA_DOUBLE:
59 {
60 double* buff_alpha = ( double* ) FLA_DOUBLE_PTR( alpha );
61 double* buff_A_gpu = ( double* ) A_gpu;
62
63 for ( i = 0; i < min( n_A, m_A ); i++ )
64 cublasDscal( m_A - i,
65 *buff_alpha,
66 buff_A_gpu + i * ldim_A + i, inc_A );
67
68 break;
69 }
70
71 case FLA_COMPLEX:
72 {
73 cuComplex* buff_alpha = ( cuComplex* ) FLA_COMPLEX_PTR( alpha );
74 cuComplex* buff_A_gpu = ( cuComplex* ) A_gpu;
75
76 for ( i = 0; i < min( n_A, m_A ); i++ )
77 cublasCscal( m_A - i,
78 *buff_alpha,
79 buff_A_gpu + i * ldim_A + i, inc_A );
80
81 break;
82 }
83
84 case FLA_DOUBLE_COMPLEX:
85 {
86 cuDoubleComplex* buff_alpha = ( cuDoubleComplex* ) FLA_DOUBLE_COMPLEX_PTR( alpha );
87 cuDoubleComplex* buff_A_gpu = ( cuDoubleComplex* ) A_gpu;
88
89 for ( i = 0; i < min( n_A, m_A ); i++ )
90 cublasZscal( m_A - i,
91 *buff_alpha,
92 buff_A_gpu + i * ldim_A + i, inc_A );
93
94 break;
95 }
96
97 }
98
99 }
100
101 else if ( uplo == FLA_UPPER_TRIANGULAR ){
102
103 switch ( datatype ){
104
105 case FLA_FLOAT:
106 {
107 float* buff_alpha = ( float* ) FLA_FLOAT_PTR( alpha );
108 float* buff_A_gpu = ( float* ) A_gpu;
109
110 for ( i = 0; i < n_A; i++ )
111 cublasSscal( min( i + 1, m_A ),
112 *buff_alpha,
113 buff_A_gpu + i * ldim_A, inc_A );
114
115 break;
116 }
117
118 case FLA_DOUBLE:
119 {
120 double* buff_alpha = ( double* ) FLA_DOUBLE_PTR( alpha );
121 double* buff_A_gpu = ( double* ) A_gpu;
122
123 for ( i = 0; i < n_A; i++ )
124 cublasDscal( min( i + 1, m_A ),
125 *buff_alpha,
126 buff_A_gpu + i * ldim_A, inc_A );
127
128 break;
129 }
130
131 case FLA_COMPLEX:
132 {
133 cuComplex* buff_alpha = ( cuComplex* ) FLA_COMPLEX_PTR( alpha );
134 cuComplex* buff_A_gpu = ( cuComplex* ) A_gpu;
135
136 for ( i = 0; i < n_A; i++ )
137 cublasCscal( min( i + 1, m_A ),
138 *buff_alpha,
139 buff_A_gpu + i * ldim_A, inc_A );
140
141 break;
142 }
143
144 case FLA_DOUBLE_COMPLEX:
145 {
146 cuDoubleComplex* buff_alpha = ( cuDoubleComplex* ) FLA_DOUBLE_COMPLEX_PTR( alpha );
147 cuDoubleComplex* buff_A_gpu = ( cuDoubleComplex* ) A_gpu;
148
149 for ( i = 0; i < n_A; i++ )
150 cublasZscal( min( i + 1, m_A ),
151 *buff_alpha,
152 buff_A_gpu + i * ldim_A, inc_A );
153
154 break;
155 }
156
157 }
158
159 }
160
161 return FLA_SUCCESS;
162}

References FLA_Check_error_level(), FLA_Obj_datatype(), FLA_Obj_equals(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_width(), FLA_ONE, FLA_Scalr_check(), and i.

Referenced by FLASH_Queue_exec_task_gpu().

◆ FLA_Scalr_internal_check()

FLA_Error FLA_Scalr_internal_check ( FLA_Uplo uplo,
FLA_Obj alpha,
FLA_Obj A,
fla_scalr_t * cntl )
14{
15 FLA_Error e_val;
16
17 // Abort if the control structure is NULL.
18 e_val = FLA_Check_null_pointer( ( void* ) cntl );
19 FLA_Check_error_code( e_val );
20
21 return FLA_SUCCESS;
22}

References FLA_Check_null_pointer().

Referenced by FLA_Scalr_internal().

◆ FLA_Scalr_l_task()

FLA_Error FLA_Scalr_l_task ( FLA_Obj alpha,
FLA_Obj A,
fla_scalr_t * cntl )
19{
20 return FLA_Scalr_external( FLA_LOWER_TRIANGULAR, alpha, A );
21}

References FLA_Scalr_external().

Referenced by FLA_Scalr_l().

◆ FLA_Scalr_task()

FLA_Error FLA_Scalr_task ( FLA_Uplo uplo,
FLA_Obj alpha,
FLA_Obj A,
fla_scalr_t * cntl )
14{
15 return FLA_Scalr_external( uplo, alpha, A );
16}

References FLA_Scalr_external().

Referenced by FLASH_Queue_exec_task(), and FLASH_Queue_exec_task_gpu().

◆ FLA_Scalr_u_task()

FLA_Error FLA_Scalr_u_task ( FLA_Obj alpha,
FLA_Obj A,
fla_scalr_t * cntl )
24{
25 return FLA_Scalr_external( FLA_UPPER_TRIANGULAR, alpha, A );
26}

References FLA_Scalr_external().

Referenced by FLA_Scalr_u().

◆ FLA_Swap()

FLA_Error FLA_Swap ( FLA_Obj A,
FLA_Obj B )
14{
15 return FLA_Swap_external( A, B );
16}
FLA_Error FLA_Swap_external(FLA_Obj A, FLA_Obj B)
Definition FLA_Swap_external.c:13

References FLA_Swap_external().

◆ FLA_Swap_check()

FLA_Error FLA_Swap_check ( FLA_Obj A,
FLA_Obj B )
14{
15 FLA_Error e_val;
16
17 e_val = FLA_Check_floating_object( A );
18 FLA_Check_error_code( e_val );
19
21 FLA_Check_error_code( e_val );
22
24 FLA_Check_error_code( e_val );
25
26 if ( FLA_Obj_is_vector( A ) && FLA_Obj_is_vector( B ) )
27 {
28 e_val = FLA_Check_equal_vector_dims( A, B );
29 FLA_Check_error_code( e_val );
30 }
31 else
32 {
33 e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, B );
34 FLA_Check_error_code( e_val );
35 }
36
37 return FLA_SUCCESS;
38}

References FLA_Check_conformal_dims(), FLA_Check_equal_vector_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), and FLA_Obj_is_vector().

Referenced by FLA_Swap_external().

◆ FLA_Swap_external()

FLA_Error FLA_Swap_external ( 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;
19 trans1_t blis_trans;
20
21 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
22 FLA_Swap_check( A, B );
23
24 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
25
26 datatype = FLA_Obj_datatype( A );
27
28 rs_A = FLA_Obj_row_stride( A );
29 cs_A = FLA_Obj_col_stride( A );
30
31 m_B = FLA_Obj_length( B );
32 n_B = FLA_Obj_width( B );
33 rs_B = FLA_Obj_row_stride( B );
34 cs_B = FLA_Obj_col_stride( B );
35
36 if ( FLA_Obj_is_conformal_to( FLA_NO_TRANSPOSE, A, B ) )
37 FLA_Param_map_flame_to_blis_trans( FLA_NO_TRANSPOSE, &blis_trans );
38 else // if ( FLA_Obj_is_conformal_to( FLA_TRANSPOSE, A, B ) )
39 FLA_Param_map_flame_to_blis_trans( FLA_TRANSPOSE, &blis_trans );
40
41 switch ( datatype ){
42
43 case FLA_FLOAT:
44 {
45 float* buff_A = ( float * ) FLA_FLOAT_PTR( A );
46 float* buff_B = ( float * ) FLA_FLOAT_PTR( B );
47
48 bl1_sswapmt( blis_trans,
49 m_B,
50 n_B,
51 buff_A, rs_A, cs_A,
52 buff_B, rs_B, cs_B );
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 bl1_dswapmt( blis_trans,
63 m_B,
64 n_B,
65 buff_A, rs_A, cs_A,
66 buff_B, rs_B, cs_B );
67
68 break;
69 }
70
71 case FLA_COMPLEX:
72 {
73 scomplex* buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
74 scomplex* buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
75
76 bl1_cswapmt( blis_trans,
77 m_B,
78 n_B,
79 buff_A, rs_A, cs_A,
80 buff_B, rs_B, cs_B );
81
82 break;
83 }
84
85 case FLA_DOUBLE_COMPLEX:
86 {
87 dcomplex* buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
88 dcomplex* buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
89
90 bl1_zswapmt( blis_trans,
91 m_B,
92 n_B,
93 buff_A, rs_A, cs_A,
94 buff_B, rs_B, cs_B );
95
96 break;
97 }
98
99 }
100
101 return FLA_SUCCESS;
102}
FLA_Error FLA_Swap_check(FLA_Obj A, FLA_Obj B)
Definition FLA_Swap_check.c:13
void bl1_zswapmt(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_swapmt.c:222
void bl1_dswapmt(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_swapmt.c:80
void bl1_cswapmt(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_swapmt.c:147
void bl1_sswapmt(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_swapmt.c:13

References bl1_cswapmt(), bl1_dswapmt(), bl1_sswapmt(), bl1_zswapmt(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_is_conformal_to(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_Param_map_flame_to_blis_trans(), and FLA_Swap_check().

Referenced by FLA_Swap().

◆ FLA_Swapt()

FLA_Error FLA_Swapt ( FLA_Trans trans,
FLA_Obj A,
FLA_Obj B )
14{
15 return FLA_Swapt_external( trans, A, B );
16}
FLA_Error FLA_Swapt_external(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition FLA_Swapt_external.c:13

References FLA_Swapt_external().

◆ FLA_Swapt_check()

FLA_Error FLA_Swapt_check ( FLA_Trans trans,
FLA_Obj A,
FLA_Obj B )
14{
15 FLA_Error e_val;
16
17 e_val = FLA_Check_valid_trans( trans );
18 FLA_Check_error_code( e_val );
19
20 e_val = FLA_Check_floating_object( A );
21 FLA_Check_error_code( e_val );
22
24 FLA_Check_error_code( e_val );
25
27 FLA_Check_error_code( e_val );
28
29 e_val = FLA_Check_conformal_dims( trans, A, B );
30 FLA_Check_error_code( e_val );
31
32 return FLA_SUCCESS;
33}

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_Swapt_external().

◆ FLA_Swapt_external()

FLA_Error FLA_Swapt_external ( 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;
19 trans1_t blis_trans;
20
21 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
22 FLA_Swapt_check( trans, A, B );
23
24 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
25
26 datatype = FLA_Obj_datatype( A );
27
28 rs_A = FLA_Obj_row_stride( A );
29 cs_A = FLA_Obj_col_stride( A );
30
31 m_B = FLA_Obj_length( B );
32 n_B = FLA_Obj_width( B );
33 rs_B = FLA_Obj_row_stride( B );
34 cs_B = FLA_Obj_col_stride( B );
35
36 FLA_Param_map_flame_to_blis_trans( trans, &blis_trans );
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
45 bl1_sswapmt( blis_trans,
46 m_B,
47 n_B,
48 buff_A, rs_A, cs_A,
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
59 bl1_dswapmt( blis_trans,
60 m_B,
61 n_B,
62 buff_A, rs_A, cs_A,
63 buff_B, rs_B, cs_B );
64
65 break;
66 }
67
68 case FLA_COMPLEX:
69 {
70 scomplex* buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
71 scomplex* buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
72
73 bl1_cswapmt( blis_trans,
74 m_B,
75 n_B,
76 buff_A, rs_A, cs_A,
77 buff_B, rs_B, cs_B );
78
79 break;
80 }
81
82 case FLA_DOUBLE_COMPLEX:
83 {
84 dcomplex* buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
85 dcomplex* buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
86
87 bl1_zswapmt( blis_trans,
88 m_B,
89 n_B,
90 buff_A, rs_A, cs_A,
91 buff_B, rs_B, cs_B );
92
93 break;
94 }
95
96 }
97
98 return FLA_SUCCESS;
99}
FLA_Error FLA_Swapt_check(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition FLA_Swapt_check.c:13

References bl1_cswapmt(), bl1_dswapmt(), bl1_sswapmt(), bl1_zswapmt(), 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(), and FLA_Swapt_check().

Referenced by FLA_Swap_t_blk_var1(), FLA_Swap_t_blk_var2(), FLA_Swapt(), FLA_Transpose_unb_var1(), and FLA_Transpose_unb_var2().