libflame revision_anchor
FLA_Chol_unb_external.c File Reference

(r)

Functions

FLA_Error FLA_Chol_unb_external (FLA_Uplo uplo, FLA_Obj A)
 
FLA_Error FLA_Chol_l_unb_ext (FLA_Obj A)
 
FLA_Error FLA_Chol_u_unb_ext (FLA_Obj A)
 

Function Documentation

◆ FLA_Chol_l_unb_ext()

FLA_Error FLA_Chol_l_unb_ext ( FLA_Obj A)
99{
100 return FLA_Chol_unb_external( FLA_LOWER_TRIANGULAR, A );
101}
FLA_Error FLA_Chol_unb_external(FLA_Uplo uplo, FLA_Obj A)
Definition FLA_Chol_unb_external.c:13

References FLA_Chol_unb_external().

Referenced by FLA_Chol_l().

◆ FLA_Chol_u_unb_ext()

FLA_Error FLA_Chol_u_unb_ext ( FLA_Obj A)
104{
105 return FLA_Chol_unb_external( FLA_UPPER_TRIANGULAR, A );
106}

References FLA_Chol_unb_external().

Referenced by FLA_Chol_u().

◆ FLA_Chol_unb_external()

FLA_Error FLA_Chol_unb_external ( FLA_Uplo uplo,
FLA_Obj A )
14{
15 FLA_Error r_val = FLA_SUCCESS;
16#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17 int info;
18 FLA_Datatype datatype;
19 int m_A, cs_A;
20 char blas_uplo;
21
22 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
23 FLA_Chol_check( uplo, A );
24
25 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
26
27 datatype = FLA_Obj_datatype( A );
28
29 m_A = FLA_Obj_length( A );
30 cs_A = FLA_Obj_col_stride( A );
31
32 FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
33
34
35 switch( datatype ){
36
37 case FLA_FLOAT:
38 {
39 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
40
41 F77_spotf2( &blas_uplo,
42 &m_A,
43 buff_A, &cs_A,
44 &info );
45
46 break;
47 }
48
49 case FLA_DOUBLE:
50 {
51 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
52
53 F77_dpotf2( &blas_uplo,
54 &m_A,
55 buff_A, &cs_A,
56 &info );
57
58 break;
59 }
60
61 case FLA_COMPLEX:
62 {
63 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
64
65 F77_cpotf2( &blas_uplo,
66 &m_A,
67 buff_A, &cs_A,
68 &info );
69
70 break;
71 }
72
73 case FLA_DOUBLE_COMPLEX:
74 {
75 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
76
77 F77_zpotf2( &blas_uplo,
78 &m_A,
79 buff_A, &cs_A,
80 &info );
81
82 break;
83 }
84
85 }
86
87 // Convert to zero-based indexing, if an index was reported.
88 if ( info > 0 ) r_val = info - 1;
89 else r_val = FLA_SUCCESS;
90
91#else
92 FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
93#endif
94
95 return r_val;
96}
FLA_Error FLA_Chol_check(FLA_Uplo uplo, FLA_Obj A)
Definition FLA_Chol_check.c:13
int F77_dpotf2(char *uplo, int *n, double *a, int *lda, int *info)
int F77_zpotf2(char *uplo, int *n, dcomplex *a, int *lda, int *info)
int F77_cpotf2(char *uplo, int *n, scomplex *a, int *lda, int *info)
int F77_spotf2(char *uplo, int *n, float *a, int *lda, int *info)
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition FLA_Query.c:400
dim_t FLA_Obj_length(FLA_Obj obj)
Definition FLA_Query.c:116
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition FLA_Query.c:174
unsigned int FLA_Check_error_level(void)
Definition FLA_Check.c:18
void FLA_Param_map_flame_to_netlib_uplo(FLA_Uplo uplo, void *blas_uplo)
Definition FLA_Param.c:47
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition FLA_Query.c:13
int FLA_Error
Definition FLA_type_defs.h:47
int FLA_Datatype
Definition FLA_type_defs.h:49
Definition blis_type_defs.h:138
Definition blis_type_defs.h:133

References F77_cpotf2(), F77_dpotf2(), F77_spotf2(), F77_zpotf2(), FLA_Check_error_level(), FLA_Chol_check(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), and FLA_Param_map_flame_to_netlib_uplo().

Referenced by FLA_Chol_l_unb_ext(), and FLA_Chol_u_unb_ext().