I am looking for a way to write a code implementing the Cholesky decomposition with only one loop (on K), utilizing outer product. Not sure how to go about this. MATLAB can do it, but i have to use c++. I have looked at parallelism but that is over my head. Can someone help point my in the right direction.

```
for(int k = 0; k < N-1; k++)
{
a[k][k] = pow(a[k][k], 0.5);
for(int i = k+1; i < N; i++)
{
a[i][k] = a[i][k] / a[k][k];
}
for(int j = k + 1; j < N; j++)
{
for(int i = j; i < N; i++)
{
a[i][j] = a[i][j] - (a[i][k] * a[j][k]);
}
}
}
a[N-1][N-1] = pow(a[N-1][N-1], 0.5);
```