Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library
- Size problem using zgeqrf and zunmqr

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Pierre_B_

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-31-2017
08:09 AM

60 Views

Size problem using zgeqrf and zunmqr

Hello,

After using zgeqrf to compute the QR factorization of an m by n matrix, I want to multiply Q by another matrix C (k by k with k<m) with zunmqr.

My problem is that the result of the multiplication overwrites the matrix C, which size is smaller than the expected result.

I expect to get an m by k matrix, but C is only allocated for a k by k size.

Is there a way to directly compute the product into another allocated matrix with the proper size, or is the only solution to first compute the matrix Q and then multiply with zgemm ?

Thanks a lot in advance for your response.

Pierre

Link Copied

2 Replies

mecej4

Black Belt

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-31-2017
06:12 PM

60 Views

Most QR decomposition routines, including ZGEQRF, do not form Q explicitly. Instead, they produce compacted information from which one can recover the Householder reflectors whose product is Q. For this reason, you cannot use ZGEMM, nor should you plan to form Q explicitly.

It is not clear to my why/how you try to multiply Q, which is m X n, with a matrix C of size k X k. First of all, the matrix shapes do not conform w.r.t. matrix multiplication. Perhaps, what you want to do is to use a submatrix of Q as the multiplier?

Secondly, do you want to obtain Q C, or Q^{T}C?

Pierre_B_

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-03-2017
12:50 AM

60 Views

Thanks for your answer, and sorry, I realize my first post wasn't cery clear.

My goal is to multiply the matrix Q from the QR factorization of A (m X k) with the matrix C (k X k). I want to obtain Q C (no transposition needed) which size should be m X k. So if I understand correctly how unmqr works, the result of size m X k is too big to be overwriting C.

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

For more complete information about compiler optimizations, see our Optimization Notice.