Added CPU matrix math.