Ignore:
Timestamp:
Jun 14, 2016, 5:23:56 PM (8 years ago)
Author:
meunier
Message:
  • Improved scripts for simulations and graphes
  • Continued to clean up the lib nrc2 (from nrio2x.x to nrmem1.c)
  • Added a version (Fast - Parmerge - No stats)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/applications/rosenfeld/src-par/mca_main.c

    r822 r823  
    4343#define MAX_THREADS 256
    4444#define DEFAULT_NTHREADS 1
     45#define DEFAULT_NRUNS 1
    4546#define DEFAULT_IN_FILENAME "/misc/cadastre.pgm"
    4647#define DEFAULT_OUT_FILENAME "out.bmp"
     
    233234
    234235
    235 // -----------------------------------------------------------
    236 void mca_test2(int num_threads, char * infile, char * outfile)
    237 // -----------------------------------------------------------
     236// -------------------------------------------------------------------------
     237void mca_test2(int num_threads, int num_runs, char * infile, char * outfile)
     238// -------------------------------------------------------------------------
    238239{
    239240    int i0, i1, j0, j1;
     
    277278    MCA_Set_ImageL(mca, E);
    278279    MCA_Set_NP(mca, num_threads);
     280    MCA_Set_NR(mca, num_runs);
    279281   
    280282    // -- MCA init
     
    316318
    317319
    318 // --------------------------------------------------------------
    319 int main_test_mca(int num_threads, char * infile, char * outfile)
    320 // --------------------------------------------------------------
     320// ----------------------------------------------------------------------------
     321int main_test_mca(int num_threads, int num_runs, char * infile, char * outfile)
     322// ----------------------------------------------------------------------------
    321323{
    322324    CLOCK_INIT(num_threads, 4); // 4 = Number of steps in body
    323325    CLOCK_APP_START;
    324326
    325     mca_test2(num_threads, infile, outfile);
     327    mca_test2(num_threads, num_runs, infile, outfile);
    326328
    327329    CLOCK_APP_END;
     
    349351    int ch;
    350352    int num_threads = DEFAULT_NTHREADS;
     353    int num_runs = DEFAULT_NRUNS;
    351354
    352355    MCA_VERBOSE1(printf("*** Starting application Rosenfeld ***\n"));
    353356
    354357#if TARGET_OS != GIETVM // @QM I think the giet has some random (uninitialized) values for argc and argv
    355     while ((ch = getopt(argc, argv, "i:o:n:hdg")) != EOF) {
     358    while ((ch = getopt(argc, argv, "i:o:n:r:hdg")) != EOF) {
    356359        switch (ch) {
    357360        case 'i':
     
    363366        case 'n':
    364367            num_threads = atoi(optarg);
     368            break;
     369        case 'r':
     370            num_runs = atoi(optarg);
    365371            break;
    366372        case 'h':
     
    409415    MCA_VERBOSE1(printf("Parameters:\n"));
    410416    MCA_VERBOSE1(printf("- Number of threads: %d\n", num_threads));
     417    MCA_VERBOSE1(printf("- Number of images processed: %d\n", num_runs));
    411418    MCA_VERBOSE1(printf("- Input file: %s\n", infile));
    412419    MCA_VERBOSE1(printf("- Output file: %s\n", outfile));
     
    450457
    451458    pthread_mutex_init(&print_lock, PTHREAD_PROCESS_PRIVATE);
    452     main_test_mca(num_threads, infile, outfile);
     459    main_test_mca(num_threads, num_runs, infile, outfile);
    453460
    454461    return 0;
Note: See TracChangeset for help on using the changeset viewer.