MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / magma_geqrf3_gpu

Function magma_geqrf3_gpu

src/backend/opencl/magma/geqrf3.cpp:92–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90
91template<typename Ty>
92magma_int_t magma_geqrf3_gpu(magma_int_t m, magma_int_t n, cl_mem dA,
93 size_t dA_offset, magma_int_t ldda, Ty *tau,
94 cl_mem dT, size_t dT_offset, magma_queue_t queue,
95 magma_int_t *info) {
96 /* -- clMAGMA (version 0.1) --
97 Univ. of Tennessee, Knoxville
98 Univ. of California, Berkeley
99 Univ. of Colorado, Denver
100 @date
101
102 Purpose
103 =======
104 ZGEQRF computes a QR factorization of a complex M-by-N matrix A:
105 A = Q * R.
106
107 This version stores the triangular dT matrices used in
108 the block QR factorization so that they can be applied directly (i.e.,
109 without being recomputed) later. As a result, the application
110 of Q is much faster. Also, the upper triangular matrices for V have 0s
111 in them. The corresponding parts of the upper triangular R are inverted
112 and stored separately in dT.
113
114 Arguments
115 =========
116 M (input) INTEGER
117 The number of rows of the matrix A. M >= 0.
118
119 N (input) INTEGER
120 The number of columns of the matrix A. N >= 0.
121
122 dA (input/output) COMPLEX_16 array on the GPU, dimension (LDDA,N)
123 On entry, the M-by-N matrix A.
124 On exit, the elements on and above the diagonal of the array
125 contain the min(M,N)-by-N upper trapezoidal matrix R (R is
126 upper triangular if m >= n); the elements below the diagonal,
127 with the array TAU, represent the orthogonal matrix Q as a
128 product of min(m,n) elementary reflectors (see Further
129 Details).
130
131 LDDA (input) INTEGER
132 The leading dimension of the array dA. LDDA >= max(1,M).
133 To benefit from coalescent memory accesses LDDA must be
134 divisible by 16.
135
136 TAU (output) COMPLEX_16 array, dimension (min(M,N))
137 The scalar factors of the elementary reflectors (see Further
138 Details).
139
140 dT (workspace/output) COMPLEX_16 array on the GPU,
141 dimension (2*MIN(M, N) + (N+31)/32*32 )*NB,
142 where NB can be obtained through magma_get_zgeqrf_nb(M).
143 It starts with MIN(M,N)*NB block that store the triangular T
144 matrices, followed by the MIN(M,N)*NB block of the diagonal
145 inverses for the R matrix. The rest of the array is used as
146 workspace.
147
148 INFO (output) INTEGER
149 = 0: successful exit

Callers

nothing calls this directly

Calls 4

magma_event_syncFunction · 0.85
magma_free_cpuFunction · 0.85
maxFunction · 0.50
minFunction · 0.50

Tested by

no test coverage detected