libflame  revision_anchor
Functions
FLA_Trinv_lu_opt_var3.c File Reference

(r)

Functions

FLA_Error FLA_Trinv_lu_opt_var3 (FLA_Obj A)
 
FLA_Error FLA_Trinv_lu_ops_var3 (int mn_A, float *buff_A, int rs_A, int cs_A)
 
FLA_Error FLA_Trinv_lu_opd_var3 (int mn_A, double *buff_A, int rs_A, int cs_A)
 
FLA_Error FLA_Trinv_lu_opc_var3 (int mn_A, scomplex *buff_A, int rs_A, int cs_A)
 
FLA_Error FLA_Trinv_lu_opz_var3 (int mn_A, dcomplex *buff_A, int rs_A, int cs_A)
 

Function Documentation

◆ FLA_Trinv_lu_opc_var3()

FLA_Error FLA_Trinv_lu_opc_var3 ( int  mn_A,
scomplex buff_A,
int  rs_A,
int  cs_A 
)
162 {
163  scomplex* buff_1 = FLA_COMPLEX_PTR( FLA_ONE );
164  scomplex* buff_m1 = FLA_COMPLEX_PTR( FLA_MINUS_ONE );
165  int i;
166 
167  for ( i = 0; i < mn_A; ++i )
168  {
169  scomplex* a10t = buff_A + (0 )*cs_A + (i )*rs_A;
170  scomplex* A20 = buff_A + (0 )*cs_A + (i+1)*rs_A;
171  scomplex* a21 = buff_A + (i )*cs_A + (i+1)*rs_A;
172 
173  int mn_ahead = mn_A - i - 1;
174  int mn_behind = i;
175 
176  /*------------------------------------------------------------*/
177 
178  // FLA_Scal_external( FLA_MINUS_ONE, a21 );
180  mn_ahead,
181  buff_m1,
182  a21, rs_A );
183 
184  // FLA_Ger_external( FLA_ONE, a21, a10t, A20 );
187  mn_ahead,
188  mn_behind,
189  buff_1,
190  a21, rs_A,
191  a10t, cs_A,
192  A20, rs_A, cs_A );
193 
194  /*------------------------------------------------------------*/
195 
196  }
197 
198  return FLA_SUCCESS;
199 }
FLA_Obj FLA_MINUS_ONE
Definition: FLA_Init.c:22
FLA_Obj FLA_ONE
Definition: FLA_Init.c:18
int i
Definition: bl1_axmyv2.c:145
void bl1_cger(conj1_t conjx, conj1_t conjy, int m, int n, scomplex *alpha, scomplex *x, int incx, scomplex *y, int incy, scomplex *a, int a_rs, int a_cs)
Definition: bl1_ger.c:111
void bl1_cscalv(conj1_t conj, int n, scomplex *alpha, scomplex *x, int incx)
Definition: bl1_scalv.c:46
@ BLIS1_NO_CONJUGATE
Definition: blis_type_defs.h:81
Definition: blis_type_defs.h:133

References bl1_cger(), bl1_cscalv(), BLIS1_NO_CONJUGATE, FLA_MINUS_ONE, FLA_ONE, and i.

Referenced by FLA_Trinv_lu_opt_var3().

◆ FLA_Trinv_lu_opd_var3()

FLA_Error FLA_Trinv_lu_opd_var3 ( int  mn_A,
double *  buff_A,
int  rs_A,
int  cs_A 
)
119 {
120  double* buff_1 = FLA_DOUBLE_PTR( FLA_ONE );
121  double* buff_m1 = FLA_DOUBLE_PTR( FLA_MINUS_ONE );
122  int i;
123 
124  for ( i = 0; i < mn_A; ++i )
125  {
126  double* a10t = buff_A + (0 )*cs_A + (i )*rs_A;
127  double* A20 = buff_A + (0 )*cs_A + (i+1)*rs_A;
128  double* a21 = buff_A + (i )*cs_A + (i+1)*rs_A;
129 
130  int mn_ahead = mn_A - i - 1;
131  int mn_behind = i;
132 
133  /*------------------------------------------------------------*/
134 
135  // FLA_Scal_external( FLA_MINUS_ONE, a21 );
137  mn_ahead,
138  buff_m1,
139  a21, rs_A );
140 
141  // FLA_Ger_external( FLA_ONE, a21, a10t, A20 );
144  mn_ahead,
145  mn_behind,
146  buff_1,
147  a21, rs_A,
148  a10t, cs_A,
149  A20, rs_A, cs_A );
150 
151  /*------------------------------------------------------------*/
152 
153  }
154 
155  return FLA_SUCCESS;
156 }
void bl1_dger(conj1_t conjx, conj1_t conjy, int m, int n, double *alpha, double *x, int incx, double *y, int incy, double *a, int a_rs, int a_cs)
Definition: bl1_ger.c:62
void bl1_dscalv(conj1_t conj, int n, double *alpha, double *x, int incx)
Definition: bl1_scalv.c:24

References bl1_dger(), bl1_dscalv(), BLIS1_NO_CONJUGATE, FLA_MINUS_ONE, FLA_ONE, and i.

Referenced by FLA_Trinv_lu_opt_var3().

◆ FLA_Trinv_lu_ops_var3()

FLA_Error FLA_Trinv_lu_ops_var3 ( int  mn_A,
float *  buff_A,
int  rs_A,
int  cs_A 
)
76 {
77  float* buff_1 = FLA_FLOAT_PTR( FLA_ONE );
78  float* buff_m1 = FLA_FLOAT_PTR( FLA_MINUS_ONE );
79  int i;
80 
81  for ( i = 0; i < mn_A; ++i )
82  {
83  float* a10t = buff_A + (0 )*cs_A + (i )*rs_A;
84  float* A20 = buff_A + (0 )*cs_A + (i+1)*rs_A;
85  float* a21 = buff_A + (i )*cs_A + (i+1)*rs_A;
86 
87  int mn_ahead = mn_A - i - 1;
88  int mn_behind = i;
89 
90  /*------------------------------------------------------------*/
91 
92  // FLA_Scal_external( FLA_MINUS_ONE, a21 );
94  mn_ahead,
95  buff_m1,
96  a21, rs_A );
97 
98  // FLA_Ger_external( FLA_ONE, a21, a10t, A20 );
101  mn_ahead,
102  mn_behind,
103  buff_1,
104  a21, rs_A,
105  a10t, cs_A,
106  A20, rs_A, cs_A );
107 
108  /*------------------------------------------------------------*/
109 
110  }
111 
112  return FLA_SUCCESS;
113 }
void bl1_sger(conj1_t conjx, conj1_t conjy, int m, int n, float *alpha, float *x, int incx, float *y, int incy, float *a, int a_rs, int a_cs)
Definition: bl1_ger.c:13
void bl1_sscalv(conj1_t conj, int n, float *alpha, float *x, int incx)
Definition: bl1_scalv.c:13

References bl1_sger(), bl1_sscalv(), BLIS1_NO_CONJUGATE, FLA_MINUS_ONE, FLA_ONE, and i.

Referenced by FLA_Trinv_lu_opt_var3().

◆ FLA_Trinv_lu_opt_var3()

FLA_Error FLA_Trinv_lu_opt_var3 ( FLA_Obj  A)
14 {
15  FLA_Datatype datatype;
16  int mn_A;
17  int rs_A, cs_A;
18 
19  datatype = FLA_Obj_datatype( A );
20 
21  mn_A = FLA_Obj_length( A );
22  rs_A = FLA_Obj_row_stride( A );
23  cs_A = FLA_Obj_col_stride( A );
24 
25 
26  switch ( datatype )
27  {
28  case FLA_FLOAT:
29  {
30  float* buff_A = FLA_FLOAT_PTR( A );
31 
33  buff_A, rs_A, cs_A );
34 
35  break;
36  }
37 
38  case FLA_DOUBLE:
39  {
40  double* buff_A = FLA_DOUBLE_PTR( A );
41 
43  buff_A, rs_A, cs_A );
44 
45  break;
46  }
47 
48  case FLA_COMPLEX:
49  {
50  scomplex* buff_A = FLA_COMPLEX_PTR( A );
51 
53  buff_A, rs_A, cs_A );
54 
55  break;
56  }
57 
58  case FLA_DOUBLE_COMPLEX:
59  {
60  dcomplex* buff_A = FLA_DOUBLE_COMPLEX_PTR( A );
61 
63  buff_A, rs_A, cs_A );
64 
65  break;
66  }
67  }
68 
69  return FLA_SUCCESS;
70 }
FLA_Error FLA_Trinv_lu_opc_var3(int mn_A, scomplex *buff_A, int rs_A, int cs_A)
Definition: FLA_Trinv_lu_opt_var3.c:160
FLA_Error FLA_Trinv_lu_opd_var3(int mn_A, double *buff_A, int rs_A, int cs_A)
Definition: FLA_Trinv_lu_opt_var3.c:117
FLA_Error FLA_Trinv_lu_ops_var3(int mn_A, float *buff_A, int rs_A, int cs_A)
Definition: FLA_Trinv_lu_opt_var3.c:74
FLA_Error FLA_Trinv_lu_opz_var3(int mn_A, dcomplex *buff_A, int rs_A, int cs_A)
Definition: FLA_Trinv_lu_opt_var3.c:203
dim_t FLA_Obj_row_stride(FLA_Obj obj)
Definition: FLA_Query.c:167
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
int FLA_Datatype
Definition: FLA_type_defs.h:49
Definition: blis_type_defs.h:138

References FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Trinv_lu_opc_var3(), FLA_Trinv_lu_opd_var3(), FLA_Trinv_lu_ops_var3(), and FLA_Trinv_lu_opz_var3().

Referenced by FLA_Trinv_lu().

◆ FLA_Trinv_lu_opz_var3()

FLA_Error FLA_Trinv_lu_opz_var3 ( int  mn_A,
dcomplex buff_A,
int  rs_A,
int  cs_A 
)
205 {
206  dcomplex* buff_1 = FLA_DOUBLE_COMPLEX_PTR( FLA_ONE );
207  dcomplex* buff_m1 = FLA_DOUBLE_COMPLEX_PTR( FLA_MINUS_ONE );
208  int i;
209 
210  for ( i = 0; i < mn_A; ++i )
211  {
212  dcomplex* a10t = buff_A + (0 )*cs_A + (i )*rs_A;
213  dcomplex* A20 = buff_A + (0 )*cs_A + (i+1)*rs_A;
214  dcomplex* a21 = buff_A + (i )*cs_A + (i+1)*rs_A;
215 
216  int mn_ahead = mn_A - i - 1;
217  int mn_behind = i;
218 
219  /*------------------------------------------------------------*/
220 
221  // FLA_Scal_external( FLA_MINUS_ONE, a21 );
223  mn_ahead,
224  buff_m1,
225  a21, rs_A );
226 
227  // FLA_Ger_external( FLA_ONE, a21, a10t, A20 );
230  mn_ahead,
231  mn_behind,
232  buff_1,
233  a21, rs_A,
234  a10t, cs_A,
235  A20, rs_A, cs_A );
236 
237  /*------------------------------------------------------------*/
238 
239  }
240 
241  return FLA_SUCCESS;
242 }
void bl1_zger(conj1_t conjx, conj1_t conjy, int m, int n, dcomplex *alpha, dcomplex *x, int incx, dcomplex *y, int incy, dcomplex *a, int a_rs, int a_cs)
Definition: bl1_ger.c:194
void bl1_zscalv(conj1_t conj, int n, dcomplex *alpha, dcomplex *x, int incx)
Definition: bl1_scalv.c:72

References bl1_zger(), bl1_zscalv(), BLIS1_NO_CONJUGATE, FLA_MINUS_ONE, FLA_ONE, and i.

Referenced by FLA_Trinv_lu_opt_var3().