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

6.4.1 vsip_dchold_create_p - Create Cholesky Decomposition Object

typedef enum _vsip_mat_uplo { 
  VSIP_TR_LOW = 0, // Lower triangular 
  VSIP_TR_UPP = 1  // Upper triangular 
} vsip_mat_uplo; 
 
vsip_chol_f* vsip_chold_create_f(vsip_mat_uplo uplo, vsip_length n); 
vsip_cchol_f* vsip_cchold_create_f(vsip_mat_uplo uplo, vsip_length n);
Description

This function creates a Cholesky decomposition object for a symmetric positive definite matrix of size n ×n. The Cholesky decomposition expresses a matrix A as the product of a lower triangular matrix L and its transpose:       T
A = LL (when uplo = VSIP_MAT_LOWER) or      T
A = U  U (when uplo = VSIP_MAT_UPPER).

Parameters
Return Value
Example

vsip_chol_f *chold; 
vsip_length n = 100; 
 
// Create Cholesky decomposition object for lower triangle 
chold = vsip_chold_create_f(VSIP_MAT_LOW, n); 
if (chold == NULL) { 
    fprintf(stderr, "Error: Could not create Cholesky object\n"); 
    return -1; 
}
Notes