Adelsbach/VSIPL
Core Programming Reference Guide
DD-00016-015
Core

This manual is preliminary and incomplete.
While our Core implementation implements all functions given in the standard we are still working on completing this documentation.

Please refer to the VSIPL standard for a complete function reference of the Core profile until we have completed work on this documentation.

6.5.1 vsip_dqrd_create_p - Create QR Decomposition Object

typedef enum _vsip_qrd_qopt { 
  VSIP_QRD_NOSAVEQ = 0, // Do not save Q 
  VSIP_QRD_SAVEQ   = 1, // Save full Q 
  VSIP_QRD_SAVEQ1  = 2 // Save skinny Q 
} vsip_qrd_qopt; 
 
vsip_qr_f* vsip_qrd_create_f(vsip_length m, vsip_length n, vsip_qrd_qopt qopt); 
vsip_cqr_f* vsip_cqrd_create_f(vsip_length m, vsip_length n, vsip_qrd_qopt qopt);
Description

This function creates a QR decomposition object that can be used to compute the QR factorization of an m ×n matrix. The QR decomposition expresses a matrix A as the product of an orthogonal matrix Q and an upper triangular matrix R, such that A = QR.

The vsip_qrd_qopt parameter allows you to specify how the orthogonal matrix Q should be stored.

Parameters
Return Value
Example

vsip_qr_f *qrd; 
vsip_length m = 100, n = 50; 
 
// Create a QR decomposition object 
// Using SAVEQ2 as a good compromise between memory and functionality 
qrd = vsip_qrd_create_f(m, n, VSIP_QRD_SAVEQ2); 
 
if (qrd == NULL) { 
    fprintf(stderr, "Failed to create QR decomposition object\n"); 
    return; 
}
Notes