Ported most linalg related structs.