Implements cachematrix functions from stub interfaces