int main( int coreid ) { if( coreid == 0 ) { return main0(); } else if( coreid == 1 ) { return main1(); } return 0; }
int main(int argc, char *argv[]) { int core = getCoreId(); if( core == 0 ) { return main0(); } else if(core == 1) { return main1(); } return 0; }
void main1() { int n; long seed; n = 10; seed = 123; RbcRnd *rnd; rbc_rnd_ini(n, seed, &rnd); main0(rnd, n); rbc_rnd_fin(rnd); }
int main(int argc, char *argv[]) { register int procNumber; NumProcs = NPROC; AcquireGlobalLock(); procNumber = procCounter++; ReleaseGlobalLock(); if (procNumber == 0) { #ifdef POWER_SIM pthread_changePowerState(HIGH); #endif printf("\n"); printf("\n"); printf("--------------------------------------------------------------------\n"); printf("-------------------------- MPSoCBench ----------------------------\n"); printf("-------------------- Running: water-spatial ------------------------\n"); printf("--------------- The results will be available in -------------------\n"); printf("------------------------- the output file --------------------------\n"); printf("--------------------------------------------------------------------\n"); printf("\n"); /* OUTPUT FILE */ six = fopen("output","w"); if (six == NULL){ printf("Error: fopen()\n"); exit(1); } main0(argc, argv); fclose(six); } else{ #ifdef POWER_SIM pthread_changePowerState(HIGH); #endif WorkStart(); #ifdef POWER_SIM pthread_changePowerState(LOW); #endif } MAIN_END; }
static void main1(int c, char **v) { enum {XX, XY, XZ, YY, YZ, ZZ}; float m[6]; assert_c(c, "XX"); m[XX] = atof(v[0]); shift(&c, &v); assert_c(c, "XY"); m[XY] = atof(v[0]); shift(&c, &v); assert_c(c, "XZ"); m[XZ] = atof(v[0]); shift(&c, &v); assert_c(c, "YY"); m[YY] = atof(v[0]); shift(&c, &v); assert_c(c, "YZ"); m[YZ] = atof(v[0]); shift(&c, &v); assert_c(c, "ZZ"); m[ZZ] = atof(v[0]); main0(m); }
int main(int argc, char* argv[]) { if(argc<2) { std::cout << "0 - Tempo do Algoritmo + result | cloud_s.txt cloud_d.txt\n" << "1 - Tempo do Algoritmo ORB vs SURF + results | cloud_s.txt cloud_d.txt\n" << "2 - ORB debug mode | cloud_s.txt cloud_d.txt\n" << "3 - SURF debug mode | cloud_s.txt cloud_d.txt\n" << "4 - Make map | nframes\n" << "5 - Video stream\n\n"; return 0; } switch(atoi(argv[1])) { case 0: { main0(argc,argv); } break; case 1: { main1(argc,argv); } break; case 2: { main2(argc,argv); } break; case 3: { main3(argc,argv); } break; case 4: { main4(argc,argv); } break; case 5: { main5(argc,argv); } break; } return 0; }
int main(int argc, char *argv[]){ int sel; std::string ply_filename; std::string ply_filepath; ros::init(argc, argv, "world_node"); ros::NodeHandle nh("~"); nh.param("sel",sel,0); nh.param<std::string>("ply_filepath",ply_filepath,"/home/"); nh.param<std::string>("ply_filename",ply_filename,"/home/cloud.ply"); switch(sel){ case 0:{main0(ply_filepath);}break; case 1:{main1(ply_filename);}break; } }
int main(int argc, char **argv) { const char *path; Config *cfg; int rank, dims[3]; MPI_Comm comm; m::ini(&argc, &argv); m::get_dims(&argc, &argv, dims); m::get_cart(MPI_COMM_WORLD, dims, &comm); MC(m::Comm_rank(comm, &rank)); msg_ini(rank); UC(conf_ini(&cfg)); UC(conf_read(argc, argv, cfg)); UC(conf_lookup_string(cfg, "o", &path)); main0(comm, path); UC(conf_fin(cfg)); MC(m::Barrier(comm)); m::fin(); }
int main(int argc, char **argv) { const char *i; Out out; Config *cfg; int rank, size, dims[3]; m::ini(&argc, &argv); m::get_dims(&argc, &argv, dims); m::get_cart(MPI_COMM_WORLD, dims, &out.comm); MC(m::Comm_rank(out.comm, &rank)); MC(m::Comm_size(out.comm, &size)); UC(conf_ini(&cfg)); UC(conf_read(argc, argv, cfg)); UC(conf_lookup_string(cfg, "i", &i)); UC(conf_lookup_string(cfg, "o", &out.path)); main0(i, &out); UC(conf_fin(cfg)); MC(m::Barrier(out.comm)); m::fin(); }
int main(int argc, char* argv[]){ ros::init(argc, argv, "test_icp"); ros::NodeHandle n; if (argc<2){ std::cout<< "0 - remove by statistic | main(int) | file" << std::endl; std::cout<< "1 - remove by pass | main(int) | file" << std::endl; std::cout<< "2 - test voxel grid downsampling | main(int) | file" << std::endl; std::cout<< "3 - test normals with voxel grid downsampling | main(int) | file" << std::endl; return 0; } switch(atoi(argv[1])){ case 0:{main0(argc, argv);}break; case 1:{main1(argc, argv);}break; case 2:{main2(argc, argv);}break; case 3:{main3(argc, argv);}break; } return 0; }
int obj2bim_main(struct STR_OBJ2BIM *params) { // static char execflag = 0; int argc; UCHAR **argv, *tmp0; UCHAR **argv1, **p; GO_stdout.p0 = GO_stdout.p = params->map0; GO_stdout.p1 = params->map1; /* stdoutはmap */ GO_stdout.dummy = ~0; GO_stderr.p0 = GO_stderr.p = params->err0; GO_stderr.p1 = params->err1; GO_stderr.dummy = ~0; /* 多重実行阻止 (staticを再初期化すればできるが) */ // if (execflag) // return 7; // execflag = 1; if (setjmp(setjmp_env)) { params->err0 = GO_stderr.p; return GOL_abortcode; } if (params->work1 - params->work0 < SIZ_SYSWRK + 16 * 1024) return GO_TERM_WORKOVER; GOL_memmaninit(&GOL_sysman, SIZ_SYSWRK, params->work0); GOL_memmaninit(&GOL_memman, params->work1 - params->work0 - SIZ_SYSWRK, params->work0 + SIZ_SYSWRK); argv = ConvCmdLine1(&argc, params->cmdlin); params->errcode = main0(argc, argv, params); params->map0 = GO_stdout.p; skip: /* バッファを出力 */ GOL_sysabort(0); }
void main1(int c, char **v) { int n; UC(assert_n(c)); n = atoi(v[0]); if (n == 0) ERR("expecting an a positive number"); main0(n); }
int main() { main0(); }
int main(int argc, char *argv[]) { register int procNumber; AcquireGlobalLock(); P = NPROC; procNumber = procCounter++; ReleaseGlobalLock(); if (procNumber == 0) { #ifdef POWER_SIM //pthread_changePowerState(HIGH); #endif printf("\n"); printf("\n"); printf("--------------------------------------------------------------------\n"); printf("------------------------- MPSoCBench -----------------------------\n"); printf("------------------------- Running: fft -----------------------------\n"); printf("--------------- The results will be available in -------------------\n"); printf("---------------------- the output.dat file -------------------------\n"); printf("--------------------------------------------------------------------\n"); printf("\n"); /* OUTPUT FILE */ fileout = fopen("output","w"); if (fileout == NULL){ printf("Error: fopen()\n"); exit(0); } main0(argc, argv); fclose(fileout); } else { #ifdef POWER_SIM pthread_changePowerState(HIGH); #endif SlaveStart(); #ifdef POWER_SIM pthread_changePowerState(LOW); #endif } _exit(0); return 0; // Never executed, just for compatibility }