int main(int argc, char **argv) { int m, nfsft_flags, psi_flags; int nrepeat; int trafo_adjoint, N, M, r; double *x; C *f_hat, *f; #ifdef _OPENMP int nthreads; if (argc != 6) return 1; nthreads = atoi(argv[5]); fftw_init_threads(); omp_set_num_threads(nthreads); #else if (argc != 5) return 1; #endif m = atoi(argv[1]); nfsft_flags = atoi(argv[2]); psi_flags = atoi(argv[3]); nrepeat = atoi(argv[4]); bench_openmp_readfile(stdin, &trafo_adjoint, &N, &M, &x, &f_hat, &f); /* precomputation (for fast polynomial transform) */ nfsft_precompute(N,1000.0,0U,0U); for (r = 0; r < nrepeat; r++) bench_openmp(trafo_adjoint, N, M, x, f_hat, f, m, nfsft_flags, psi_flags); return 0; }
int main(int argc, char **argv) { int m, psi_flag; #ifdef _OPENMP int nthreads; if (argc != 4) return 1; nthreads = atoi(argv[3]); fftw_init_threads(); omp_set_num_threads(nthreads); #else if (argc != 3) return 1; #endif m = atoi(argv[1]); psi_flag = atoi(argv[2]); bench_openmp(stdin, m, psi_flag); return 0; }
int main(int argc, char **argv) { int n; /**< expansion degree */ int m; /**< cut-off parameter */ int p; /**< degree of smoothness */ char *s; /**< name of kernel */ C (*kernel)(R, int, const R *); /**< kernel function */ R c; /**< parameter for kernel */ R eps_I; /**< inner boundary */ R eps_B; /**< outer boundary */ #ifdef _OPENMP int nthreads; if (argc != 9) return EXIT_FAILURE; nthreads = atoi(argv[8]); FFTW(init_threads)(); omp_set_num_threads(nthreads); #else if (argc != 8) return EXIT_FAILURE; #endif n = atoi(argv[1]); m = atoi(argv[2]); p = atoi(argv[3]); s = argv[4]; c = atof(argv[5]); eps_I = (R)(atof(argv[6])); eps_B = (R)(atof(argv[7])); if (strcmp(s, "gaussian") == 0) kernel = gaussian; else if (strcmp(s, "multiquadric") == 0) kernel = multiquadric; else if (strcmp(s, "inverse_multiquadric") == 0) kernel = inverse_multiquadric; else if (strcmp(s, "logarithm") == 0) kernel = logarithm; else if (strcmp(s, "thinplate_spline") == 0) kernel = thinplate_spline; else if (strcmp(s, "one_over_square") == 0) kernel = one_over_square; else if (strcmp(s, "one_over_modulus") == 0) kernel = one_over_modulus; else if (strcmp(s, "one_over_x") == 0) kernel = one_over_x; else if (strcmp(s, "inverse_multiquadric3") == 0) kernel = inverse_multiquadric3; else if (strcmp(s, "sinc_kernel") == 0) kernel = sinc_kernel; else if (strcmp(s, "cosc") == 0) kernel = cosc; else if (strcmp(s, "cot") == 0) kernel = kcot; else { s = "multiquadric"; kernel = multiquadric; } bench_openmp(stdin, n, m, p, kernel, c, eps_I, eps_B); return EXIT_SUCCESS; }