A generic matrix implementation in C.