20 #define PLASMA_zlag2c(_descA, _descSB) \
21 plasma_parallel_call_4(plasma_pzlag2c, \
22 PLASMA_desc, (_descA), \
23 PLASMA_desc, (_descSB), \
24 PLASMA_sequence*, sequence, \
25 PLASMA_request*, request)
27 #define PLASMA_clag2z(_descSA, _descB) \
28 plasma_parallel_call_4(plasma_pclag2z, \
29 PLASMA_desc, (_descSA), \
30 PLASMA_desc, (_descB), \
31 PLASMA_sequence*, sequence, \
32 PLASMA_request*, request)
34 #define PLASMA_zlange(_norm, _descA, _result, _work) \
36 plasma_parallel_call_6(plasma_pzlange, \
37 PLASMA_enum, (_norm), \
38 PLASMA_desc, (_descA), \
40 double*, &(_result), \
41 PLASMA_sequence*, sequence, \
42 PLASMA_request*, request);
44 #define PLASMA_zlanhe(_norm, _uplo, _descA, _result, _work) \
46 plasma_parallel_call_7(plasma_pzlanhe, \
47 PLASMA_enum, (_norm), \
48 PLASMA_enum, (_uplo), \
49 PLASMA_desc, (_descA), \
51 double*, &(_result), \
52 PLASMA_sequence*, sequence, \
53 PLASMA_request*, request);
55 #define PLASMA_zlacpy(_descA, _descB) \
56 plasma_parallel_call_5(plasma_pzlacpy, \
57 PLASMA_enum, PlasmaUpperLower, \
58 PLASMA_desc, (_descA), \
59 PLASMA_desc, (_descB), \
60 PLASMA_sequence*, sequence, \
61 PLASMA_request*, request)
63 #define PLASMA_zgeadd(_alpha, _descA, _descB) \
64 plasma_parallel_call_5(plasma_pzgeadd, \
65 PLASMA_Complex64_t, (_alpha), \
66 PLASMA_desc, (_descA), \
67 PLASMA_desc, (_descB), \
68 PLASMA_sequence*, sequence, \
69 PLASMA_request*, request)
186 if (plasma == NULL) {
203 if (LDA <
max(1, N)) {
207 if (LDB <
max(1, N)) {
211 if (LDX <
max(1, N)) {
217 if (
min(N, NRHS) == 0)
233 plasma_zooplap2tile( descA, A, NB, NB, LDA, N, 0, 0, N, N ,
plasma_desc_mat_free(&(descA)) );
234 plasma_zooplap2tile( descB, B, NB, NB, LDB, NRHS, 0, 0, N, NRHS,
plasma_desc_mat_free(&(descA));
plasma_desc_mat_free(&(descB)) );
242 LDX, NRHS, 0, 0, N, NRHS);
264 status = sequence->
status;
332 if (plasma == NULL) {
341 status = sequence->
status;
386 const int itermax = 30;
387 const double bwdmax = 1.0;
391 double Anorm, cte, eps, Rnorm, Xnorm;
395 if (plasma == NULL) {
399 if (sequence == NULL) {
403 if (request == NULL) {
415 plasma_error(
"PLASMA_zcposv_Tile_Async",
"invalid first descriptor");
419 plasma_error(
"PLASMA_zcposv_Tile_Async",
"invalid second descriptor");
423 plasma_error(
"PLASMA_zcposv_Tile_Async",
"invalid third descriptor");
427 if (descA.
nb != descA.
mb || descB.
nb != descB.
mb || descX.
nb != descX.
mb) {
428 plasma_error(
"PLASMA_zcposv_Tile_Async",
"only square tiles supported");
432 plasma_error(
"PLASMA_zcposv_Tile_Async",
"illegal value of uplo");
449 plasma_error(
"PLASMA_zcposv_Tile_Async",
"plasma_shared_alloc() failed");
454 plasma_zdesc_alloc( descR, NB, NB, descB.
m, descB.
n, 0, 0, descB.
m, descB.
n,
plasma_shared_free( plasma, work );
plasma_desc_mat_free(&descR) );
455 plasma_cdesc_alloc( descSA, NB, NB, descA.
m, descA.
n, 0, 0, descA.
m, descA.
n,
plasma_shared_free( plasma, work );
plasma_desc_mat_free(&descR);
plasma_desc_mat_free(&descSA) );
456 plasma_cdesc_alloc( descSX, NB, NB, descX.
m, descX.
n, 0, 0, descX.
m, descX.
n,
plasma_shared_free( plasma, work );
plasma_desc_mat_free(&descR);
plasma_desc_mat_free(&descSA);
plasma_desc_mat_free(&descSX) );
460 eps = LAPACKE_dlamch_work(
'e');
530 cte = Anorm*eps*((double) N)*bwdmax;
531 if (Rnorm < Xnorm * cte){
542 for (iiter = 0; iiter < itermax; iiter++){
599 if (Rnorm < Xnorm * cte){
615 *ITER = -itermax - 1;