Ignore:
Timestamp:
Jun 1, 2016, 10:25:43 AM (8 years ago)
Author:
meunier
Message:

In rosenfeld:

  • Updated nrio0, nrio1, nrio2, nrio1f, nrio2f, nrio1x, nrbool1, nrbool2 and nralloc1 in the nrc2 lib in order to use macro-typed functions
  • Updated the simulation script to include performance evaluation with random images, and a script to generate graphs
  • Updated the clock.h to use 64-bit integers, which potentially breaks the printing on the giet
File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/applications/rosenfeld/src/ecc_features.c

    r821 r822  
    3535
    3636
     37// -----------------------------------------------------
     38void RegionStats_Init(RegionStats * Stats, uint32 nemax)
     39// -----------------------------------------------------
     40{
     41    for (int i = 0; i < (int) nemax; i++) {
     42#if PARMERGE
     43        pthread_spin_init(&Stats[i].lock, PTHREAD_PROCESS_PRIVATE);
     44#endif
     45    }
     46}
     47
     48
    3749// -------------------------------------------------------------
    3850void RegionStats_Constructor(RegionStats ** Stats, uint32 nemax)
     
    5466    }
    5567   
    56     RegionStats_Clear(Stats, nemax);
     68    RegionStats_Init(Stats, nemax);
    5769   
    5870    return Stats;
     
    7284// ------------------------------------------------------------
    7385{
    74     RegionStats_Clear(Stats, nemax);
     86    //RegionStats_Clear(Stats, nemax);
    7587    free(Stats);
    7688}
    77 
    7889
    7990// ------------------------------------------------------
     
    8293{
    8394    for (int i = 0; i < (int) nemax; i++) {
     95#if FEATURES
    8496        Stats[i].xmin = 65535;
    8597        Stats[i].xmax = 0;
     
    91103        Stats[i].Sx = 0;
    92104        Stats[i].Sy = 0;
    93 #if PARMERGE
    94         pthread_spin_init(&Stats[i].lock, PTHREAD_PROCESS_PRIVATE);
    95105#endif
    96106    }
    97107}
    98108
    99 
     109#if FEATURES
    100110// -----------------------------------------
    101111void RegionStats_Clear1(RegionStats * stats)
     
    396406    dst->Sy   = src->Sy;
    397407}
    398 
     408#endif
    399409
    400410// ===============================
     
    414424        return NULL;
    415425    }
    416     RegionStats_Clear(v, i1 - i0 + 1 + NR_END);
     426    RegionStats_Init(v, i1 - i0 + 1 + NR_END);
    417427    return v - i0 + NR_END;
    418428}
     
    432442        return NULL;
    433443    }
    434     RegionStats_Clear(v, i1 - i0 + 1 + NR_END);
     444    RegionStats_Init(v, i1 - i0 + 1 + NR_END);
    435445    return v - i0 + NR_END;
    436446}
     
    542552
    543553
     554#if FEATURES
    544555// -----------------------------------
    545556void zero_RegionStats(RegionStats * x)
     
    14201431    return n1 - s;
    14211432}
     1433#endif // FEATURES
    14221434
    14231435// Local Variables:
Note: See TracChangeset for help on using the changeset viewer.