简体   繁体   中英

Extract upper triangular matrix from the result of “magma_dgeqrf2_gpu” (which is a general matrix) without transferring to host

I'm building a kernel which among other things uses the Magma function magma_dgeqrf2_gpu to perform a QR factorization. This outputs the upper triangular matrix R into a general matrix d_A on the GPU device.

Without transferring d_A back to host (since I need the GPU for further operations), is there a lib way to just reduce or extract the d_A into an upper triangular matrix R on the device?

这有点愚蠢,但我发现解决方案只是使用magmablas_dlacopy()并设置属性以将上三角矩阵复制到设备上的另一个矩阵(已设置为0)。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM