inlined mat::add