Following the use of the cula ?orgqr function I want to obtain the R matrix. This can be done by copying the upper triangular values from the resulting matrix to another matrix and leaving the lower triangular values other than the diagonal as 0. I have not been able to find a way to do this using cuBLAS or cula.
this can be illustrated as follows:
a1 a2 a3 a1 a2 a3
a4 a5 a6 -> 0 a5 a6
a7 a8 a9 0 0 a9
Is there a way to do it with those libraries that I am not aware of? If not what would be an efficient way to perform this procedure?