Can partition the matrix so each thread will have roughly equal work, although this needs improving