libflame revision_anchor
Functions
FLA_Lyap_h_opt_var1.c File Reference

(r)

Functions

FLA_Error FLA_Lyap_h_opt_var1 (FLA_Obj isgn, FLA_Obj A, FLA_Obj C)
 
FLA_Error FLA_Lyap_h_ops_var1 (int m_AC, float *buff_sgn, float *buff_A, int rs_A, int cs_A, float *buff_W, int rs_W, int cs_W, float *buff_C, int rs_C, int cs_C)
 
FLA_Error FLA_Lyap_h_opd_var1 (int m_AC, double *buff_sgn, double *buff_A, int rs_A, int cs_A, double *buff_W, int rs_W, int cs_W, double *buff_C, int rs_C, int cs_C)
 
FLA_Error FLA_Lyap_h_opc_var1 (int m_AC, scomplex *buff_sgn, scomplex *buff_A, int rs_A, int cs_A, scomplex *buff_W, int rs_W, int cs_W, scomplex *buff_C, int rs_C, int cs_C)
 
FLA_Error FLA_Lyap_h_opz_var1 (int m_AC, dcomplex *buff_sgn, dcomplex *buff_A, int rs_A, int cs_A, dcomplex *buff_W, int rs_W, int cs_W, dcomplex *buff_C, int rs_C, int cs_C)
 

Function Documentation

◆ FLA_Lyap_h_opc_var1()

FLA_Error FLA_Lyap_h_opc_var1 ( int  m_AC,
scomplex buff_sgn,
scomplex buff_A,
int  rs_A,
int  cs_A,
scomplex buff_W,
int  rs_W,
int  cs_W,
scomplex buff_C,
int  rs_C,
int  cs_C 
)
302{
305 int i;
306
308 m_AC,
309 m_AC,
310 buff_sgn,
311 buff_C, rs_C, cs_C );
312
313 for ( i = 0; i < m_AC; ++i )
314 {
315 scomplex* A00 = buff_A + (0 )*cs_A + (0 )*rs_A;
316 scomplex* a01 = buff_A + (i )*cs_A + (0 )*rs_A;
317 scomplex* alpha11 = buff_A + (i )*cs_A + (i )*rs_A;
318
319 scomplex* C00 = buff_C + (0 )*cs_C + (0 )*rs_C;
320 scomplex* c01 = buff_C + (i )*cs_C + (0 )*rs_C;
321 scomplex* gamma11 = buff_C + (i )*cs_C + (i )*rs_C;
322
323 scomplex* W00 = buff_W + (0 )*cs_W + (0 )*rs_W;
324
326
327 int m_behind = i;
328
329 /*------------------------------------------------------------*/
330
331 // FLA_Hemv( FLA_UPPER_TRIANGULAR, FLA_MINUS_ONE, C00, a01, FLA_ONE, c01 );
334 m_behind,
335 buff_m1,
336 C00, rs_C, cs_C,
337 a01, rs_A,
338 buff_1,
339 c01, rs_C );
340
341 // FLA_Copyrt( FLA_UPPER_TRIANGULAR, FLA_NO_TRANSPOSE, A00, W00 );
342 // FLA_Shift_diag( FLA_CONJUGATE, alpha11, W00 );
343 // FLA_Trsv( FLA_UPPER_TRIANGULAR, FLA_CONJ_TRANSPOSE, FLA_NONUNIT_DIAG, W00, c01 );
346 m_behind,
347 m_behind,
348 A00, rs_A, cs_A,
349 W00, rs_W, cs_W );
350
352 0,
353 m_behind,
354 m_behind,
355 alpha11,
356 W00, rs_W, cs_W );
357
361 m_behind,
362 W00, rs_W, cs_W,
363 c01, rs_C );
364
365 // FLA_Dot2cs( FLA_CONJUGATE, FLA_MINUS_ONE, a01, c01, FLA_ONE, gamma11 );
367 m_behind,
368 buff_m1,
369 a01, rs_A,
370 c01, rs_C,
371 buff_1,
372 gamma11 );
373
374 // FLA_Copyt( FLA_CONJ_NO_TRANSPOSE, alpha11, omega );
375 // FLA_Mult_add( FLA_ONE, alpha11, omega );
376 // FLA_Inv_scal( omega, gamma11 );
380
381 /*------------------------------------------------------------*/
382
383 }
384
385 return FLA_SUCCESS;
386}
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_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_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_chemv(uplo1_t uplo, conj1_t conj, int m, scomplex *alpha, scomplex *a, int a_rs, int a_cs, scomplex *x, int incx, scomplex *beta, scomplex *y, int incy)
Definition bl1_hemv.c:35
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_ctrsv(uplo1_t uplo, trans1_t trans, diag1_t diag, int m, scomplex *a, int a_rs, int a_cs, scomplex *x, int incx)
Definition bl1_trsv.c:99
void bl1_cshiftdiag(conj1_t conj, int offset, int m, int n, scomplex *sigma, scomplex *a, int a_rs, int a_cs)
Definition bl1_shiftdiag.c:97
@ BLIS1_UPPER_TRIANGULAR
Definition blis_type_defs.h:63
@ BLIS1_NONUNIT_DIAG
Definition blis_type_defs.h:74
@ BLIS1_NO_TRANSPOSE
Definition blis_type_defs.h:54
@ BLIS1_CONJ_TRANSPOSE
Definition blis_type_defs.h:57
@ BLIS1_CONJUGATE
Definition blis_type_defs.h:82
@ BLIS1_NO_CONJUGATE
Definition blis_type_defs.h:81
Definition blis_type_defs.h:133

References bl1_ccopymrt(), bl1_cdot2s(), bl1_chemv(), bl1_cscalm(), bl1_cshiftdiag(), bl1_ctrsv(), BLIS1_CONJ_TRANSPOSE, BLIS1_CONJUGATE, BLIS1_NO_CONJUGATE, BLIS1_NO_TRANSPOSE, BLIS1_NONUNIT_DIAG, BLIS1_UPPER_TRIANGULAR, FLA_MINUS_ONE, FLA_ONE, and i.

Referenced by FLA_Lyap_h_opt_var1().

◆ FLA_Lyap_h_opd_var1()

FLA_Error FLA_Lyap_h_opd_var1 ( int  m_AC,
double buff_sgn,
double buff_A,
int  rs_A,
int  cs_A,
double buff_W,
int  rs_W,
int  cs_W,
double buff_C,
int  rs_C,
int  cs_C 
)
209{
210 double* buff_1 = FLA_DOUBLE_PTR( FLA_ONE );
212 int i;
213
215 m_AC,
216 m_AC,
217 buff_sgn,
218 buff_C, rs_C, cs_C );
219
220 for ( i = 0; i < m_AC; ++i )
221 {
222 double* A00 = buff_A + (0 )*cs_A + (0 )*rs_A;
223 double* a01 = buff_A + (i )*cs_A + (0 )*rs_A;
224 double* alpha11 = buff_A + (i )*cs_A + (i )*rs_A;
225
226 double* C00 = buff_C + (0 )*cs_C + (0 )*rs_C;
227 double* c01 = buff_C + (i )*cs_C + (0 )*rs_C;
228 double* gamma11 = buff_C + (i )*cs_C + (i )*rs_C;
229
230 double* W00 = buff_W + (0 )*cs_W + (0 )*rs_W;
231
232 double omega;
233
234 int m_behind = i;
235
236 /*------------------------------------------------------------*/
237
238 // FLA_Hemv( FLA_UPPER_TRIANGULAR, FLA_MINUS_ONE, C00, a01, FLA_ONE, c01 );
241 m_behind,
242 buff_m1,
243 C00, rs_C, cs_C,
244 a01, rs_A,
245 buff_1,
246 c01, rs_C );
247
248 // FLA_Copyrt( FLA_UPPER_TRIANGULAR, FLA_NO_TRANSPOSE, A00, W00 );
249 // FLA_Shift_diag( FLA_CONJUGATE, alpha11, W00 );
250 // FLA_Trsv( FLA_UPPER_TRIANGULAR, FLA_CONJ_TRANSPOSE, FLA_NONUNIT_DIAG, W00, c01 );
253 m_behind,
254 m_behind,
255 A00, rs_A, cs_A,
256 W00, rs_W, cs_W );
257
259 0,
260 m_behind,
261 m_behind,
262 alpha11,
263 W00, rs_W, cs_W );
264
268 m_behind,
269 W00, rs_W, cs_W,
270 c01, rs_C );
271
272 // FLA_Dot2cs( FLA_CONJUGATE, FLA_MINUS_ONE, a01, c01, FLA_ONE, gamma11 );
274 m_behind,
275 buff_m1,
276 a01, rs_A,
277 c01, rs_C,
278 buff_1,
279 gamma11 );
280
281 // FLA_Copyt( FLA_CONJ_NO_TRANSPOSE, alpha11, omega );
282 // FLA_Mult_add( FLA_ONE, alpha11, omega );
283 // FLA_Inv_scal( omega, gamma11 );
287
288 /*------------------------------------------------------------*/
289
290 }
291
292 return FLA_SUCCESS;
293}
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_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_dhemv(uplo1_t uplo, conj1_t conj, int m, double *alpha, double *a, int a_rs, int a_cs, double *x, int incx, double *beta, double *y, int incy)
Definition bl1_hemv.c:24
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
void bl1_dtrsv(uplo1_t uplo, trans1_t trans, diag1_t diag, int m, double *a, int a_rs, int a_cs, double *x, int incx)
Definition bl1_trsv.c:56
void bl1_dshiftdiag(conj1_t conj, int offset, int m, int n, double *sigma, double *a, int a_rs, int a_cs)
Definition bl1_shiftdiag.c:34

References bl1_dcopymrt(), bl1_ddot2s(), bl1_dhemv(), bl1_dscalm(), bl1_dshiftdiag(), bl1_dtrsv(), BLIS1_CONJ_TRANSPOSE, BLIS1_CONJUGATE, BLIS1_NO_CONJUGATE, BLIS1_NO_TRANSPOSE, BLIS1_NONUNIT_DIAG, BLIS1_UPPER_TRIANGULAR, FLA_MINUS_ONE, FLA_ONE, and i.

Referenced by FLA_Lyap_h_opt_var1().

◆ FLA_Lyap_h_ops_var1()

FLA_Error FLA_Lyap_h_ops_var1 ( int  m_AC,
float buff_sgn,
float buff_A,
int  rs_A,
int  cs_A,
float buff_W,
int  rs_W,
int  cs_W,
float buff_C,
int  rs_C,
int  cs_C 
)
116{
117 float* buff_1 = FLA_FLOAT_PTR( FLA_ONE );
119 int i;
120
122 m_AC,
123 m_AC,
124 buff_sgn,
125 buff_C, rs_C, cs_C );
126
127 for ( i = 0; i < m_AC; ++i )
128 {
129 float* A00 = buff_A + (0 )*cs_A + (0 )*rs_A;
130 float* a01 = buff_A + (i )*cs_A + (0 )*rs_A;
131 float* alpha11 = buff_A + (i )*cs_A + (i )*rs_A;
132
133 float* C00 = buff_C + (0 )*cs_C + (0 )*rs_C;
134 float* c01 = buff_C + (i )*cs_C + (0 )*rs_C;
135 float* gamma11 = buff_C + (i )*cs_C + (i )*rs_C;
136
137 float* W00 = buff_W + (0 )*cs_W + (0 )*rs_W;
138
139 float omega;
140
141 int m_behind = i;
142
143 /*------------------------------------------------------------*/
144
145 // FLA_Hemv( FLA_UPPER_TRIANGULAR, FLA_MINUS_ONE, C00, a01, FLA_ONE, c01 );
148 m_behind,
149 buff_m1,
150 C00, rs_C, cs_C,
151 a01, rs_A,
152 buff_1,
153 c01, rs_C );
154
155 // FLA_Copyrt( FLA_UPPER_TRIANGULAR, FLA_NO_TRANSPOSE, A00, W00 );
156 // FLA_Shift_diag( FLA_CONJUGATE, alpha11, W00 );
157 // FLA_Trsv( FLA_UPPER_TRIANGULAR, FLA_CONJ_TRANSPOSE, FLA_NONUNIT_DIAG, W00, c01 );
160 m_behind,
161 m_behind,
162 A00, rs_A, cs_A,
163 W00, rs_W, cs_W );
164
166 0,
167 m_behind,
168 m_behind,
169 alpha11,
170 W00, rs_W, cs_W );
171
175 m_behind,
176 W00, rs_W, cs_W,
177 c01, rs_C );
178
179 // FLA_Dot2cs( FLA_CONJUGATE, FLA_MINUS_ONE, a01, c01, FLA_ONE, gamma11 );
181 m_behind,
182 buff_m1,
183 a01, rs_A,
184 c01, rs_C,
185 buff_1,
186 gamma11 );
187
188 // FLA_Copyt( FLA_CONJ_NO_TRANSPOSE, alpha11, omega );
189 // FLA_Mult_add( FLA_ONE, alpha11, omega );
190 // FLA_Inv_scal( omega, gamma11 );
194
195 /*------------------------------------------------------------*/
196
197 }
198
199 return FLA_SUCCESS;
200}
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_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
void bl1_shemv(uplo1_t uplo, conj1_t conj, int m, float *alpha, float *a, int a_rs, int a_cs, float *x, int incx, float *beta, float *y, int incy)
Definition bl1_hemv.c:13
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_strsv(uplo1_t uplo, trans1_t trans, diag1_t diag, int m, float *a, int a_rs, int a_cs, float *x, int incx)
Definition bl1_trsv.c:13
void bl1_sshiftdiag(conj1_t conj, int offset, int m, int n, float *sigma, float *a, int a_rs, int a_cs)
Definition bl1_shiftdiag.c:13

References bl1_scopymrt(), bl1_sdot2s(), bl1_shemv(), bl1_sscalm(), bl1_sshiftdiag(), bl1_strsv(), BLIS1_CONJ_TRANSPOSE, BLIS1_CONJUGATE, BLIS1_NO_CONJUGATE, BLIS1_NO_TRANSPOSE, BLIS1_NONUNIT_DIAG, BLIS1_UPPER_TRIANGULAR, FLA_MINUS_ONE, FLA_ONE, and i.

Referenced by FLA_Lyap_h_opt_var1().

◆ FLA_Lyap_h_opt_var1()

FLA_Error FLA_Lyap_h_opt_var1 ( FLA_Obj  isgn,
FLA_Obj  A,
FLA_Obj  C 
)
14{
15 FLA_Datatype datatype;
16 int m_AC;
17 int rs_A, cs_A;
18 int rs_W, cs_W;
19 int rs_C, cs_C;
20 FLA_Obj W;
21
23
24 datatype = FLA_Obj_datatype( A );
25
27
30
33
36
37 switch ( datatype )
38 {
39 case FLA_FLOAT:
40 {
41 float* buff_A = FLA_FLOAT_PTR( A );
42 float* buff_W = FLA_FLOAT_PTR( W );
43 float* buff_C = FLA_FLOAT_PTR( C );
44 float* buff_sgn = FLA_FLOAT_PTR( isgn );
45
50 buff_C, rs_C, cs_C );
51
52 break;
53 }
54
55 case FLA_DOUBLE:
56 {
57 double* buff_A = FLA_DOUBLE_PTR( A );
58 double* buff_W = FLA_DOUBLE_PTR( W );
59 double* buff_C = FLA_DOUBLE_PTR( C );
60 double* buff_sgn = FLA_DOUBLE_PTR( isgn );
61
66 buff_C, rs_C, cs_C );
67
68 break;
69 }
70
71 case FLA_COMPLEX:
72 {
77
82 buff_C, rs_C, cs_C );
83
84 break;
85 }
86
88 {
93
98 buff_C, rs_C, cs_C );
99
100 break;
101 }
102 }
103
104 FLA_Obj_free( &W );
105
106 return FLA_SUCCESS;
107}
FLA_Error FLA_Lyap_h_opd_var1(int m_AC, double *buff_sgn, double *buff_A, int rs_A, int cs_A, double *buff_W, int rs_W, int cs_W, double *buff_C, int rs_C, int cs_C)
Definition FLA_Lyap_h_opt_var1.c:204
FLA_Error FLA_Lyap_h_opz_var1(int m_AC, dcomplex *buff_sgn, dcomplex *buff_A, int rs_A, int cs_A, dcomplex *buff_W, int rs_W, int cs_W, dcomplex *buff_C, int rs_C, int cs_C)
Definition FLA_Lyap_h_opt_var1.c:390
FLA_Error FLA_Lyap_h_ops_var1(int m_AC, float *buff_sgn, float *buff_A, int rs_A, int cs_A, float *buff_W, int rs_W, int cs_W, float *buff_C, int rs_C, int cs_C)
Definition FLA_Lyap_h_opt_var1.c:111
FLA_Error FLA_Lyap_h_opc_var1(int m_AC, scomplex *buff_sgn, scomplex *buff_A, int rs_A, int cs_A, scomplex *buff_W, int rs_W, int cs_W, scomplex *buff_C, int rs_C, int cs_C)
Definition FLA_Lyap_h_opt_var1.c:297
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_Error FLA_Obj_create_conf_to(FLA_Trans trans, FLA_Obj old, FLA_Obj *obj)
Definition FLA_Obj.c:286
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition FLA_Obj.c:588
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition FLA_Query.c:13
int FLA_Datatype
Definition FLA_type_defs.h:49
Definition FLA_type_defs.h:159
Definition blis_type_defs.h:138

References FLA_Lyap_h_opc_var1(), FLA_Lyap_h_opd_var1(), FLA_Lyap_h_ops_var1(), FLA_Lyap_h_opz_var1(), FLA_Obj_col_stride(), FLA_Obj_create_conf_to(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_length(), FLA_Obj_row_stride(), and i.

Referenced by FLA_Lyap_h().

◆ FLA_Lyap_h_opz_var1()

FLA_Error FLA_Lyap_h_opz_var1 ( int  m_AC,
dcomplex buff_sgn,
dcomplex buff_A,
int  rs_A,
int  cs_A,
dcomplex buff_W,
int  rs_W,
int  cs_W,
dcomplex buff_C,
int  rs_C,
int  cs_C 
)
395{
398 int i;
399
401 m_AC,
402 m_AC,
403 buff_sgn,
404 buff_C, rs_C, cs_C );
405
406 for ( i = 0; i < m_AC; ++i )
407 {
408 dcomplex* A00 = buff_A + (0 )*cs_A + (0 )*rs_A;
409 dcomplex* a01 = buff_A + (i )*cs_A + (0 )*rs_A;
410 dcomplex* alpha11 = buff_A + (i )*cs_A + (i )*rs_A;
411
412 dcomplex* C00 = buff_C + (0 )*cs_C + (0 )*rs_C;
413 dcomplex* c01 = buff_C + (i )*cs_C + (0 )*rs_C;
414 dcomplex* gamma11 = buff_C + (i )*cs_C + (i )*rs_C;
415
416 dcomplex* W00 = buff_W + (0 )*cs_W + (0 )*rs_W;
417
419
420 int m_behind = i;
421
422 /*------------------------------------------------------------*/
423
424 // FLA_Hemv( FLA_UPPER_TRIANGULAR, FLA_MINUS_ONE, C00, a01, FLA_ONE, c01 );
427 m_behind,
428 buff_m1,
429 C00, rs_C, cs_C,
430 a01, rs_A,
431 buff_1,
432 c01, rs_C );
433
434 // FLA_Copyrt( FLA_UPPER_TRIANGULAR, FLA_NO_TRANSPOSE, A00, W00 );
435 // FLA_Shift_diag( FLA_CONJUGATE, alpha11, W00 );
436 // FLA_Trsv( FLA_UPPER_TRIANGULAR, FLA_CONJ_TRANSPOSE, FLA_NONUNIT_DIAG, W00, c01 );
439 m_behind,
440 m_behind,
441 A00, rs_A, cs_A,
442 W00, rs_W, cs_W );
443
445 0,
446 m_behind,
447 m_behind,
448 alpha11,
449 W00, rs_W, cs_W );
450
454 m_behind,
455 W00, rs_W, cs_W,
456 c01, rs_C );
457
458 // FLA_Dot2cs( FLA_CONJUGATE, FLA_MINUS_ONE, a01, c01, FLA_ONE, gamma11 );
460 m_behind,
461 buff_m1,
462 a01, rs_A,
463 c01, rs_C,
464 buff_1,
465 gamma11 );
466
467 // FLA_Copyt( FLA_CONJ_NO_TRANSPOSE, alpha11, omega );
468 // FLA_Mult_add( FLA_ONE, alpha11, omega );
469 // FLA_Inv_scal( omega, gamma11 );
473
474 /*------------------------------------------------------------*/
475
476 }
477
478 return FLA_SUCCESS;
479}
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_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_zhemv(uplo1_t uplo, conj1_t conj, int m, dcomplex *alpha, dcomplex *a, int a_rs, int a_cs, dcomplex *x, int incx, dcomplex *beta, dcomplex *y, int incy)
Definition bl1_hemv.c:134
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_ztrsv(uplo1_t uplo, trans1_t trans, diag1_t diag, int m, dcomplex *a, int a_rs, int a_cs, dcomplex *x, int incx)
Definition bl1_trsv.c:177
void bl1_zshiftdiag(conj1_t conj, int offset, int m, int n, dcomplex *sigma, dcomplex *a, int a_rs, int a_cs)
Definition bl1_shiftdiag.c:122

References bl1_zcopymrt(), bl1_zdot2s(), bl1_zhemv(), bl1_zscalm(), bl1_zshiftdiag(), bl1_ztrsv(), BLIS1_CONJ_TRANSPOSE, BLIS1_CONJUGATE, BLIS1_NO_CONJUGATE, BLIS1_NO_TRANSPOSE, BLIS1_NONUNIT_DIAG, BLIS1_UPPER_TRIANGULAR, FLA_MINUS_ONE, FLA_ONE, and i.

Referenced by FLA_Lyap_h_opt_var1().