Make Barrier use constants for number of threads (instead of template)