Add matrix related kernels.