Use LAPACK . It is already installed on many systems, and there are many implementations for systems that do not have it.
In particular, the required procedure is dtrtrs or strtrs , depending on whether your data is double or single-precision.
source share