partial implementation of chol decomposition builtin