QR分解求解线性系统的CUDA [英] QR decomposition to solve linear systems in CUDA
问题描述
我在GPU上编写的图像复原算法,在细节
的QR分解法求解线性系统
Ax = b的
的工作原理如下
分钟||斧-B || ---> || QRX-B || ---> ||(Q ^ T)QRx-(Q ^ T)乙|| ---> || RX-(Q ^ T)乙||
其中,研究
是上三角矩阵。由此产生的上三角线性系统是很容易解决的。
我想用CULA工具来实现此方法。该CULA程序 GEQRF
计算一个QR分解。手册上说:
在退出时,上和在对角线之上的阵列的元件包含 在
分(M,N)×-N
上梯形矩阵研究
(研究
为上 三角形,如果M> = N)
;下面的对角线的元素,与 数组TAU
,再present正交/酉矩阵问:
作为产品 对分(M,N)
基本反射。
我想不通其中问:
存储,并且算法似乎太复杂了我。你能给什么建议?
谢谢!
无效GEQRF(INT男,诠释N,T * A,INT LDA,T * TAU,T *工作, INT LWORK,INT和放大器; INFO)
GEQRF后,R被存储在答Q值然后使用xORGQR A和TAU作为输入来产生的上三角部
进一步的解释: http://www.culatools.com /forums/viewtopic.php?f=15&t=684
I'm writing an image restoration algorithm on GPU, details in
Cuda: least square solving , poor in speed
The QR decomposition method to solve the linear system
Ax=b
works as follows
min||Ax-b|| ---> ||QRx-b|| ---> ||(Q^T)QRx-(Q^T)b|| ---> ||Rx-(Q^T)b||
where R
is the upper triangular matrix. The resulting upper triangular linear system is easy to solve.
I want to use CULA tools to implement this method. The CULA routine GEQRF
computes a QR factorization. The manual says:
On exit, the elements on and above the diagonal of the array contain the
min(M,N)-by-N
upper trapezoidal matrixR
(R
is upper triangular ifm >= n)
; the elements below the diagonal, with the arrayTAU
, represent the orthogonal/unitary matrixQ
as a product ofmin(m,n)
elementary reflectors.
I cannot figure out where Q
is stored, and the algorithm seems too complex for me. Could you give any advice?
Thanks!
void GEQRF(int M,int N,T* A,int LDA, T* TAU, T* WORK,int LWORK,int &INFO)
After GEQRF, R is stored in the upper triangular portion of A. Q can then be generated using xORGQR with A and TAU as the inputs.
more explanation: http://www.culatools.com/forums/viewtopic.php?f=15&t=684
这篇关于QR分解求解线性系统的CUDA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!