Computation of matrix R from QR Example on Cuda

I am trying to learn QR factorization on cusolver. I am having trouble in extracting R matrix after using the example given in manual. Any help will be appreciated.