This is not the canonical way to solve a batch of states. It's just a middle man.

This is one way, doing a sparse Cholesky decomposition followed by forward and backward passes.

A Cholesky Decomposition decomposes a matrix into a lower-triangular representation and its transpose

To do a Cholesky Decomposition, its pretty easy, a pattern forms that allows you to compute it in linear time.