#endif
static int inputs_num = 16;
+static _Bool use_bitonic = 0;
static char *initial_input_file = NULL;
static char *best_output_file = NULL;
" -i <file> Initial input file (REQUIRED)\n"
" -o <file> Write the current best solution to <file>\n"
" -n <number> Maximum number of steps (iterations) to perform\n"
+ " -b Use the bitonic merger instead of the odd-even merger\n"
" -h Display usage information (this message)\n"
"\n",
name);
{
int option;
- while ((option = getopt (argc, argv, "i:o:n:h")) != -1)
+ while ((option = getopt (argc, argv, "i:o:n:bh")) != -1)
{
switch (option)
{
break;
}
+ case 'b':
+ use_bitonic = 1;
+ break;
+
case 'h':
default:
exit_usage (argv[0], EXIT_SUCCESS);
assert (nright != NULL);
/* combine the two parents */
- nret = sn_network_combine (nleft, nright);
+ if (use_bitonic)
+ nret = sn_network_combine_bitonic_merge (nleft, nright);
+ else
+ nret = sn_network_combine_odd_even_merge (nleft, nright);
sn_network_destroy (nleft);
sn_network_destroy (nright);