|
| 1 | +.. SPDX-FileCopyrightText: 2019-2020 Intel Corporation |
| 2 | +.. |
| 3 | +.. SPDX-License-Identifier: CC-BY-4.0 |
| 4 | +
|
| 5 | +.. _onemkl_lapack_gebrd: |
| 6 | + |
| 7 | +gebrd |
| 8 | +===== |
| 9 | + |
| 10 | +Reduces a general matrix to bidiagonal form. |
| 11 | + |
| 12 | +.. container:: section |
| 13 | + |
| 14 | + .. rubric:: Description |
| 15 | + |
| 16 | +``gebrd`` supports the following precisions. |
| 17 | + |
| 18 | + .. list-table:: |
| 19 | + :header-rows: 1 |
| 20 | + |
| 21 | + * - T |
| 22 | + * - ``float`` |
| 23 | + * - ``double`` |
| 24 | + * - ``std::complex<float>`` |
| 25 | + * - ``std::complex<double>`` |
| 26 | + |
| 27 | +The routine reduces a general :math:`m \times n` matrix :math:`A` to a |
| 28 | +bidiagonal matrix :math:`B` by an orthogonal (unitary) transformation. |
| 29 | + |
| 30 | + |
| 31 | +If :math:`m \ge n`, the reduction is given by :math:`A=QBP^H=\begin{pmatrix}B_1\\0\end{pmatrix}P^H=Q_1B_1P_H` |
| 32 | + |
| 33 | +where :math:`B_{1}` is an :math:`n \times n` upper diagonal matrix, |
| 34 | +:math:`Q` and :math:`P` are orthogonal or, for a complex :math:`A`, unitary |
| 35 | +matrices; :math:`Q_{1}` consists of the first :math:`n` columns of |
| 36 | +:math:`Q`. |
| 37 | + |
| 38 | +If :math:`m < n`, the reduction is given by |
| 39 | + |
| 40 | +:math:`A = QBP^H = Q\begin{pmatrix}B_1\\0\end{pmatrix}P^H = Q_1B_1P_1^H`, |
| 41 | + |
| 42 | +where :math:`B_{1}` is an :math:`m \times m` lower diagonal matrix, |
| 43 | +:math:`Q` and :math:`P` are orthogonal or, for a complex :math:`A`, unitary |
| 44 | +matrices; :math:`P_{1}` consists of the first :math:`m` columns of |
| 45 | +:math:`P`. |
| 46 | + |
| 47 | +The routine does not form the matrices :math:`Q` and :math:`P` explicitly, |
| 48 | +but represents them as products of elementary reflectors. Routines |
| 49 | +are provided to work with the matrices :math:`Q` and :math:`P` in this |
| 50 | +representation: |
| 51 | + |
| 52 | +If the matrix :math:`A` is real, |
| 53 | + |
| 54 | +- to compute :math:`Q` and :math:`P` explicitly, call |
| 55 | + :ref:`onemkl_lapack_orgbr`. |
| 56 | + |
| 57 | +If the matrix :math:`A` is complex, |
| 58 | + |
| 59 | +- to compute :math:`Q` and :math:`P` explicitly, call |
| 60 | + :ref:`onemkl_lapack_ungbr` |
| 61 | + |
| 62 | +gebrd (Buffer Version) |
| 63 | +---------------------- |
| 64 | + |
| 65 | +.. container:: section |
| 66 | + |
| 67 | + .. rubric:: Syntax |
| 68 | + |
| 69 | +.. code-block:: cpp |
| 70 | +
|
| 71 | + namespace oneapi::mkl::lapack { |
| 72 | + void gebrd(cl::sycl::queue &queue, std::int64_t m, std::int64_t n, cl::sycl::buffer<T,1> &a, std::int64_t lda, cl::sycl::buffer<realT,1> &d, cl::sycl::buffer<realT,1> &e, cl::sycl::buffer<T,1> &tauq, cl::sycl::buffer<T,1> &taup, cl::sycl::buffer<T,1> &scratchpad, std::int64_t scratchpad_size) |
| 73 | + } |
| 74 | +
|
| 75 | +.. container:: section |
| 76 | + |
| 77 | + .. rubric:: Input Parameters |
| 78 | + |
| 79 | +queue |
| 80 | + The queue where the routine should be executed. |
| 81 | + |
| 82 | +m |
| 83 | + The number of rows in the matrix :math:`A` (:math:`0 \le m`). |
| 84 | + |
| 85 | +n |
| 86 | + The number of columns in the matrix :math:`A` (:math:`0 \le n`). |
| 87 | + |
| 88 | +a |
| 89 | + The buffer :math:`a`, size (``lda,*``). The buffer ``a`` contains the |
| 90 | + matrix :math:`A`. The second dimension of ``a`` must be at least |
| 91 | + :math:`\max(1, m)`. |
| 92 | + |
| 93 | +lda |
| 94 | + The leading dimension of :math:`a`. |
| 95 | + |
| 96 | +scratchpad_size |
| 97 | + Size of scratchpad memory as a number of floating point elements of type ``T``. |
| 98 | + Size should not be less than the value returned by :ref:`onemkl_lapack_gebrd_scratchpad_size` function. |
| 99 | + |
| 100 | +.. container:: section |
| 101 | + |
| 102 | + .. rubric:: Output Parameters |
| 103 | + |
| 104 | +a |
| 105 | + If :math:`m \ge n`, the diagonal and first super-diagonal of a are |
| 106 | + overwritten by the upper bidiagonal matrix :math:`B`. The elements |
| 107 | + below the diagonal, with the buffer tauq, represent the orthogonal |
| 108 | + matrix :math:`Q` as a product of elementary reflectors, and the |
| 109 | + elements above the first superdiagonal, with the buffer ``taup``, |
| 110 | + represent the orthogonal matrix :math:`P` as a product of elementary |
| 111 | + reflectors. |
| 112 | + |
| 113 | + If :math:`m<n`, the diagonal and first sub-diagonal of a are |
| 114 | + overwritten by the lower bidiagonal matrix :math:`B`. The elements |
| 115 | + below the first subdiagonal, with the buffer tauq, represent the |
| 116 | + orthogonal matrix :math:`Q` as a product of elementary reflectors, and |
| 117 | + the elements above the diagonal, with the buffer ``taup``, represent |
| 118 | + the orthogonal matrix :math:`P` as a product of elementary reflectors. |
| 119 | + |
| 120 | +d |
| 121 | + Buffer, size at least :math:`\max(1, \min(m,n))`. Contains the diagonal |
| 122 | + elements of :math:`B`. |
| 123 | + |
| 124 | +e |
| 125 | + Buffer, size at least :math:`\max(1, \min(m,n) - 1)`. Contains the |
| 126 | + off-diagonal elements of :math:`B`. |
| 127 | + |
| 128 | +tauq |
| 129 | + Buffer, size at least :math:`\max(1, \min(m, n))`. The scalar factors of |
| 130 | + the elementary reflectors which represent the orthogonal or |
| 131 | + unitary matrix :math:`Q`. |
| 132 | + |
| 133 | +taup |
| 134 | + Buffer, size at least :math:`\max(1, \min(m, n))`. The scalar factors of |
| 135 | + the elementary reflectors which represent the orthogonal or |
| 136 | + unitary matrix :math:`P`. |
| 137 | + |
| 138 | +scratchpad |
| 139 | + Buffer holding scratchpad memory to be used by routine for storing intermediate results. |
| 140 | + |
| 141 | +gebrd (USM Version) |
| 142 | +------------------- |
| 143 | + |
| 144 | +.. container:: section |
| 145 | + |
| 146 | + .. rubric:: Syntax |
| 147 | + |
| 148 | +.. code-block:: cpp |
| 149 | +
|
| 150 | + namespace oneapi::mkl::lapack { |
| 151 | + cl::sycl::event gebrd(cl::sycl::queue &queue, std::int64_t m, std::int64_t n, T *a, std::int64_t lda, RealT *d, RealT *e, T *tauq, T *taup, T *scratchpad, std::int64_t scratchpad_size, const cl::sycl::vector_class<cl::sycl::event> &events = {}) |
| 152 | + } |
| 153 | +
|
| 154 | +.. container:: section |
| 155 | + |
| 156 | + .. rubric:: Input Parameters |
| 157 | + |
| 158 | +queue |
| 159 | + The queue where the routine should be executed. |
| 160 | + |
| 161 | +m |
| 162 | + The number of rows in the matrix :math:`A` (:math:`0 \le m`). |
| 163 | + |
| 164 | +n |
| 165 | + The number of columns in the matrix :math:`A` (:math:`0 \le n`). |
| 166 | + |
| 167 | +a |
| 168 | + Pointer to matrix :math:`A`. The second dimension of ``a`` must be at least |
| 169 | + :math:`\max(1, m)`. |
| 170 | + |
| 171 | +lda |
| 172 | + The leading dimension of ``a``. |
| 173 | + |
| 174 | +scratchpad_size |
| 175 | + Size of scratchpad memory as a number of floating point elements of type T. |
| 176 | + Size should not be less than the value returned by :ref:`onemkl_lapack_gebrd_scratchpad_size` function. |
| 177 | + |
| 178 | +events |
| 179 | + List of events to wait for before starting computation. Defaults to empty list. |
| 180 | + |
| 181 | +.. container:: section |
| 182 | + |
| 183 | + .. rubric:: Output Parameters |
| 184 | + |
| 185 | +a |
| 186 | + If :math:`m \ge n`, the diagonal and first super-diagonal of a are |
| 187 | + overwritten by the upper bidiagonal matrix :math:`B`. The elements |
| 188 | + below the diagonal, with the array tauq, represent the orthogonal |
| 189 | + matrix :math:`Q` as a product of elementary reflectors, and the |
| 190 | + elements above the first superdiagonal, with the array ``taup``, |
| 191 | + represent the orthogonal matrix :math:`P` as a product of elementary |
| 192 | + reflectors. |
| 193 | + |
| 194 | + If :math:`m<n`, the diagonal and first sub-diagonal of a are |
| 195 | + overwritten by the lower bidiagonal matrix :math:`B`. The elements |
| 196 | + below the first subdiagonal, with the array tauq, represent the |
| 197 | + orthogonal matrix :math:`Q` as a product of elementary reflectors, and |
| 198 | + the elements above the diagonal, with the array ``taup``, represent |
| 199 | + the orthogonal matrix :math:`P` as a product of elementary reflectors. |
| 200 | + |
| 201 | +d |
| 202 | + Pointer to memory of size at least :math:`\max(1, \min(m,n))`. Contains the diagonal |
| 203 | + elements of :math:`B`. |
| 204 | + |
| 205 | +e |
| 206 | + Pointer to memory of size at least :math:`\max(1, \min(m,n) - 1)`. Contains the |
| 207 | + off-diagonal elements of :math:`B`. |
| 208 | + |
| 209 | +tauq |
| 210 | + Pointer to memory of size at least :math:`\max(1, \min(m, n))`. The scalar factors of |
| 211 | + the elementary reflectors which represent the orthogonal or |
| 212 | + unitary matrix :math:`Q`. |
| 213 | + |
| 214 | +taup |
| 215 | + Pointer to memory of size at least :math:`\max(1, \min(m, n))`. The scalar factors of |
| 216 | + the elementary reflectors which represent the orthogonal or |
| 217 | + unitary matrix :math:`P`. |
| 218 | + |
| 219 | +scratchpad |
| 220 | + Pointer to scratchpad memory to be used by routine for storing intermediate results. |
| 221 | + |
| 222 | +.. container:: section |
| 223 | + |
| 224 | + .. rubric:: Return Values |
| 225 | + |
| 226 | +Output event to wait on to ensure computation is complete. |
| 227 | + |
| 228 | +**Parent topic:** :ref:`onemkl_lapack-singular-value-eigenvalue-routines` |
| 229 | + |
| 230 | + |
0 commit comments