38 extern "C" void dpotrf_ (
const char *uplo,
const unsigned long *_n,
double *a,
39 const unsigned long *_lda,
long *info)
41 unsigned long n = *_n, lda = *_lda;
51 for( k=(i-1); k>=0; --k )
52 sum -= a[k+lda*i] * a[k+lda*i];
55 a[i+lda*i] =
sqrt( sum );
63 for( j=(i+1); j<n; ++j )
67 for( k=(i-1); k>=0; --k )
68 sum -= a[k+lda*i] * a[k+lda*j];
70 a[i+lda*j] = sum / a[i+lda*i];
IntermediateState sqrt(const Expression &arg)
void dpotrf_(const char *uplo, const unsigned long *_n, double *a, const unsigned long *_lda, long *info)