gpudistmat now uses partial sums