Compute a local_size for each thread's work