Quiver Matrix Model and Topological Partition Function in Six Dimensions