fn num_chunks<T: Idx>(domain_size: T) -> usize