Compute the inverse of a symmetric, positive definite matrix from its
Cholesky decomposition. The input x should be an upper triangular matrix
from chol().
Examples
A <- mlx_matrix(c(4, 1, 1, 3), 2, 2)
U <- chol(A)
A_inv <- chol2inv(U)
# Verify: A %*% A_inv should be identity
A %*% A_inv
#> mlx array [2 x 2]
#> dtype: float32
#> device: gpu
#> values:
#> [,1] [,2]
#> [1,] 1 0
#> [2,] 0 1