Merge "Move generic function calls to rs_matrix.c." into jb-mr2-dev