Changeset 62 for sources/src/gen_code.cc
- Timestamp:
- Feb 16, 2017, 3:46:11 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sources/src/gen_code.cc
r61 r62 241 241 242 242 243 char * gen_scheduling_code_for_dynamic_link(method_process_list_t & 244 transition_func_list, 245 method_process_list_t & 246 moore_func_list, 247 strong_component_list_t * 248 strongcomponents) { 243 char * gen_scheduling_code_for_dynamic_link(method_process_list_t & transition_func_list, 244 method_process_list_t & moore_func_list, 245 strong_component_list_t * strongcomponents) { 249 246 if (dump_stage) { 250 247 cerr << "Generating C code for scheduling...\n"; … … 305 302 306 303 307 char * gen_scheduling_code_for_dynamic_link(method_process_list_t & 308 transition_func_list, 309 method_process_list_t & 310 moore_func_list, 311 ProcessDependencyList & 312 mealy_func_list) { 304 char * gen_scheduling_code_for_dynamic_link(method_process_list_t & transition_func_list, 305 method_process_list_t & moore_func_list, 306 ProcessDependencyList & mealy_func_list) { 313 307 if (dump_stage) { 314 308 cerr << "Generating C code for scheduling...\n"; … … 509 503 510 504 511 void gen_scheduling_code_for_static_func(method_process_list_t & 512 transition_func_list, 513 method_process_list_t & 514 moore_func_list, 515 ProcessDependencyList & 516 mealy_func_list) { 505 void gen_scheduling_code_for_static_func(method_process_list_t & transition_func_list, 506 method_process_list_t & moore_func_list, 507 ProcessDependencyList & mealy_func_list) { 517 508 if (dump_stage) { 518 509 cerr << "Generating scheduling...\n"; … … 546 537 int n = fc.func_number; 547 538 int i; 548 #pragma omp parallel for549 539 for (i = 0; i < n; ++i) { 550 540 #if 0 … … 578 568 unsigned int nb_func[2]; 579 569 static method_process_t **func_list[2]; 580 #pragma omp threadprivate (nb_func, func_list)581 570 static strong_component_list_t quasistatic_list; 582 571 583 572 unsigned long long busy_wait_f0, busy_wait_f1, busy_wait_up, busy_wait_ml; 584 573 unsigned long long last_wait_f0, last_wait_f1, last_wait_up, last_wait_ml; 574 #ifdef USE_OPENMP 575 #pragma omp threadprivate (nb_func, func_list) 585 576 #pragma omp threadprivate (busy_wait_f0, busy_wait_f1, busy_wait_up,busy_wait_ml) 586 577 #pragma omp threadprivate (last_wait_f0, last_wait_f1, last_wait_up,last_wait_ml) 578 #endif 587 579 588 580 static void Call(const method_process_t & m) { … … 621 613 unsigned int expected_globaltime = 0; 622 614 volatile unsigned int globaltime __attribute__ ((aligned (128))) = 0; 615 #ifdef USE_OPENMP 616 #pragma omp threadprivate (expected_globaltime) 623 617 #pragma omp shared (globaltime) 624 # pragma omp threadprivate (expected_globaltime)618 #endif 625 619 626 620 unsigned int num_omp_threads; … … 644 638 __asm volatile("lfence"); 645 639 } 646 647 640 #else 648 #pragma omp barrier 641 #ifdef USE_OPENMP 642 #pragma omp barrier 643 #endif 649 644 #endif 650 645 … … 664 659 } 665 660 #else 666 #pragma omp barrier 661 #ifdef USE_OPENMP 662 #pragma omp barrier 663 #endif 667 664 #endif 668 665 if (!quasistatic_list.empty()) { 666 #ifdef USE_OPENMP 669 667 #pragma omp master 668 #endif 670 669 { 671 670 quasistatic_mealy_generation(); … … 682 681 } 683 682 #else 684 #pragma omp barrier 685 #endif 686 } 687 688 } 689 690 691 void gen_scheduling_code_for_quasistatic_func(method_process_list_t & 692 transition_func_list, 693 method_process_list_t & 694 moore_func_list, 695 strong_component_list_t * 696 mealy_func_list) { 683 #ifdef USE_OPENMP 684 #pragma omp barrier 685 #endif 686 #endif 687 } 688 } 689 690 691 void gen_scheduling_code_for_quasistatic_func(method_process_list_t & transition_func_list, 692 method_process_list_t & moore_func_list, 693 strong_component_list_t * mealy_func_list) { 697 694 if (dump_stage) { 698 695 cerr << "Generating quasi static scheduling...\n";
Note: See TracChangeset
for help on using the changeset viewer.