01: /* ///////////////////////////// P /// L /// A /// S /// M /// A /////////////////////////////// */
02: /* ///                    PLASMA computational routine (version 2.0.0)                       ///
03:  * ///                    Release Date: July, 4th 2009                                       ///
04:  * ///                    PLASMA is a software package provided by Univ. of Tennessee,       ///
05:  * ///                    Univ. of California Berkeley and Univ. of Colorado Denver          /// */
06: 
07: /* /////////////////////////// P /// U /// R /// P /// O /// S /// E /////////////////////////// */
08: // PLASMA_zgeqrf_Tile - Computes the tile QR factorization of a complex M-by-N matrix A: A = Q * R.
09: // All matrices are passed through descriptors. All dimensions are taken from the descriptors.
10: 
11: /* ///////////////////// A /// R /// G /// U /// M /// E /// N /// T /// S ///////////////////// */
12: // A        PLASMA_Complex64_t* (INOUT)
13: //          On entry, the M-by-N matrix A.
14: //          On exit, the elements on and above the diagonal of the array contain the min(M,N)-by-N
15: //          upper trapezoidal matrix R (R is upper triangular if M >= N); the elements below the
16: //          diagonal represent the unitary matrix Q as a product of elementary reflectors stored
17: //          by tiles.
18: //
19: // T        PLASMA_Complex64_t* (OUT)
20: //          On exit, auxiliary factorization data, required by PLASMA_zgeqrs to solve the system
21: //          of equations.
22: 
23: /* ///////////// R /// E /// T /// U /// R /// N /////// V /// A /// L /// U /// E ///////////// */
24: //          = 0: successful exit
25: 
26: /* //////////////////////////////////// C /// O /// D /// E //////////////////////////////////// */
27: #include "common.h"
28: 
29: int PLASMA_zgeqrf_Tile(PLASMA_desc *A, PLASMA_desc *T)
30: {
31:     PLASMA_desc descA = *A;
32:     PLASMA_desc descT = *T;
33:     plasma_context_t *plasma;
34: 
35:     plasma = plasma_context_self();
36:     if (plasma == NULL) {
37:         plasma_error("PLASMA_zgeqrf_Tile", "PLASMA not initialized");
38:         return PLASMA_ERR_NOT_INITIALIZED;
39:     }
40:     /* Check descriptors for correctness */
41:     if (plasma_desc_check(&descA) != PLASMA_SUCCESS) {
42:         plasma_error("PLASMA_zgeqrf_Tile", "invalid first descriptor");
43:         return PLASMA_ERR_ILLEGAL_VALUE;
44:     }
45:     if (plasma_desc_check(&descT) != PLASMA_SUCCESS) {
46:         plasma_error("PLASMA_zgeqrf_Tile", "invalid second descriptor");
47:         return PLASMA_ERR_ILLEGAL_VALUE;
48:     }
49:     /* Check input arguments */
50:     /* Quick return */
51: /*
52:     if (min(M, N) == 0)
53:         return PLASMA_SUCCESS;
54: */
55:     plasma_parallel_call_2(plasma_pzgeqrf,
56:         PLASMA_desc, descA,
57:         PLASMA_desc, descT);
58: 
59:     return PLASMA_SUCCESS;
60: }