16 using number_t = cmb::combination::number_t;
20 auto combination_handler = [&
stream, &
mutex](
auto&& combination)
27 stream <<
"Enumerating in parallel with selected only ... " <<
tpf::endl;
36 for(number_t m_th = 0; m_th < max_mth; ++m_th)
44int main(
int argc,
char** argv)
47 std::thread::hardware_concurrency();
56 n = atoi(argv[2]); r = atoi(argv[3]);
64 catch(
const std::exception&)
70 stream <<
"Enumerating " << n <<
"_C_" <<r
void performance_test_for_combination_parallel(unsigned int thread_count, int n, int r)
int main(int argc, char **argv)
std::string elapsed_time(bool bReset=true, TimeUnit dummy_time=TimeUnit{}) const
Implements random number generator and stop watch.
ReturnType enumerate_combination_and_complement(combination cmb, MthType m_th, SetContainer< EleType, ContainerTails... > from_set, SelectCountType select_count)
enable_if_all_in_list_t< types::type_list_t< Type1, Type2 >, integral_list_t, ReturnType > ncr(Type1 nn, Type2 rr)
void parallel_visit_combinations_and_complements(NRType n, NRType r, CallbackType &&callback, ArgTypes &&... args)
void parallel_visit_combinations(NRType n, NRType r, CallbackType &&callback, ArgTypes &&... args)
std::atomic< int > thread_count
Stream output operators << are implemented.