Changeset 822 for soft/giet_vm/applications/rosenfeld/src/ecc_features.c
- Timestamp:
- Jun 1, 2016, 10:25:43 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/applications/rosenfeld/src/ecc_features.c
r821 r822 35 35 36 36 37 // ----------------------------------------------------- 38 void 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 37 49 // ------------------------------------------------------------- 38 50 void RegionStats_Constructor(RegionStats ** Stats, uint32 nemax) … … 54 66 } 55 67 56 RegionStats_ Clear(Stats, nemax);68 RegionStats_Init(Stats, nemax); 57 69 58 70 return Stats; … … 72 84 // ------------------------------------------------------------ 73 85 { 74 RegionStats_Clear(Stats, nemax);86 //RegionStats_Clear(Stats, nemax); 75 87 free(Stats); 76 88 } 77 78 89 79 90 // ------------------------------------------------------ … … 82 93 { 83 94 for (int i = 0; i < (int) nemax; i++) { 95 #if FEATURES 84 96 Stats[i].xmin = 65535; 85 97 Stats[i].xmax = 0; … … 91 103 Stats[i].Sx = 0; 92 104 Stats[i].Sy = 0; 93 #if PARMERGE94 pthread_spin_init(&Stats[i].lock, PTHREAD_PROCESS_PRIVATE);95 105 #endif 96 106 } 97 107 } 98 108 99 109 #if FEATURES 100 110 // ----------------------------------------- 101 111 void RegionStats_Clear1(RegionStats * stats) … … 396 406 dst->Sy = src->Sy; 397 407 } 398 408 #endif 399 409 400 410 // =============================== … … 414 424 return NULL; 415 425 } 416 RegionStats_ Clear(v, i1 - i0 + 1 + NR_END);426 RegionStats_Init(v, i1 - i0 + 1 + NR_END); 417 427 return v - i0 + NR_END; 418 428 } … … 432 442 return NULL; 433 443 } 434 RegionStats_ Clear(v, i1 - i0 + 1 + NR_END);444 RegionStats_Init(v, i1 - i0 + 1 + NR_END); 435 445 return v - i0 + NR_END; 436 446 } … … 542 552 543 553 554 #if FEATURES 544 555 // ----------------------------------- 545 556 void zero_RegionStats(RegionStats * x) … … 1420 1431 return n1 - s; 1421 1432 } 1433 #endif // FEATURES 1422 1434 1423 1435 // Local Variables:
Note: See TracChangeset
for help on using the changeset viewer.