static int _health_main_action(void *args, size_t size) { char *ptr = (char *)args; struct Village *top; hpx_time_t start; printf("initial top = %p, %u\n", top, top); read_input_data(ptr); allocate_village(&top, ((void *)0), ((void *)0), sim_level, 0);; printf("\ninitial top = %p, %u\n", top, top); start = hpx_time_now(); sim_village_main_hpx(top);; printf("HPX-5 health took: %.7f (s)\n", hpx_time_elapsed_ms(start)/1e3); check_village(top); hpx_exit(HPX_SUCCESS); }
int main(int argc, char *argv[]) { struct Village *top; char bots_arg_file[255]="./input/small.input"; if( argc < 1 ) { printf("./omp <input file>\n"); return 0; } else strcpy(bots_arg_file, argv[1] ); read_input_data(bots_arg_file); allocate_village(&top, ((void *)0), ((void *)0), sim_level, 0);; sim_village_main_par(top);; check_village(top); return 0; }
int main(int argc, char** argv) { const char* fn = "input/health/test.input"; if(argc > 1) fn = argv[1]; std::stringstream ss; ss << "Health with input file \"" << fn << "\""; struct Village *top; read_input_data(fn); inncabs::run_all( [&](const inncabs::launch l) { sim_village_main_par(l, top); return 1; }, [&](int result) { return check_village(top); }, ss.str(), [&] { allocate_village(&top, NULL, NULL, sim_level, 0); } ); return 0; }