Changeset 63 for sources/src


Ignore:
Timestamp:
Oct 23, 2019, 12:33:29 PM (5 years ago)
Author:
bouyer
Message:

Remplace USE_OPENMP with _OPENMP, the latter is automagically defined
by the compiler.

Location:
sources/src
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • sources/src/casc.h

    r62 r63  
    2424EXTERN char unstable;
    2525EXTERN int32_t * pending_write_vector_nb;
    26 #ifdef USE_OPENMP
     26#ifdef _OPENMP
    2727#pragma omp threadprivate (pending_write_vector_nb)
    2828#endif
  • sources/src/dump_used_options.cc

    r62 r63  
    8989  "INIT_SIGNALS_TO_ZERO, "
    9090#endif
    91 #ifdef USE_OPENMP
    92   "USE_OPENMP, "
     91#ifdef _OPENMP
     92  "_OPENMP, "
    9393#endif
    9494  "...";
  • sources/src/gen_code.cc

    r62 r63  
    4949#include <iostream>
    5050#include <fstream>
    51 #ifdef USE_OPENMP
     51#ifdef _OPENMP
    5252    #include <omp.h>
    5353#endif
     
    572572unsigned long long busy_wait_f0, busy_wait_f1, busy_wait_up, busy_wait_ml;
    573573unsigned long long last_wait_f0, last_wait_f1, last_wait_up, last_wait_ml;
    574 #ifdef USE_OPENMP
     574#ifdef _OPENMP
    575575#pragma omp threadprivate (nb_func, func_list)
    576576#pragma omp threadprivate (busy_wait_f0, busy_wait_f1, busy_wait_up,busy_wait_ml)
     
    613613unsigned int expected_globaltime = 0;
    614614volatile unsigned int globaltime __attribute__ ((aligned (128))) = 0;
    615 #ifdef USE_OPENMP
     615#ifdef _OPENMP
    616616#pragma omp threadprivate (expected_globaltime)
    617617#pragma omp shared (globaltime)
     
    639639    }
    640640#else
    641     #ifdef USE_OPENMP
     641    #ifdef _OPENMP
    642642    #pragma omp barrier
    643643    #endif
     
    659659    }
    660660#else
    661     #ifdef USE_OPENMP
     661    #ifdef _OPENMP
    662662    #pragma omp barrier
    663663    #endif
    664664#endif
    665665    if (!quasistatic_list.empty()) {
    666 #ifdef USE_OPENMP
     666#ifdef _OPENMP
    667667#pragma omp master
    668668#endif
     
    681681        }
    682682#else
    683     #ifdef USE_OPENMP
     683    #ifdef _OPENMP
    684684    #pragma omp barrier
    685685    #endif
  • sources/src/gen_code.h

    r62 r63  
    2121#include "process_dependency.h"
    2222
    23 #ifdef USE_OPENMP
     23#ifdef _OPENMP
    2424    #include <omp.h>
    2525#endif
     
    108108    extern unsigned int expected_globaltime;
    109109    extern volatile unsigned int globaltime;
    110 #ifdef USE_OPENMP
     110#ifdef _OPENMP
    111111#pragma omp threadprivate (busy_wait_f0, busy_wait_f1, busy_wait_up, busy_wait_ml, nb_func)
    112112#pragma omp threadprivate (last_wait_f0, last_wait_f1, last_wait_up, last_wait_ml)
     
    117117
    118118
    119 #ifdef USE_OPENMP
     119#ifdef _OPENMP
    120120#pragma omp parallel
    121121#endif
     
    126126
    127127        expected_globaltime = 0;
    128 #ifdef USE_OPENMP
     128#ifdef _OPENMP
    129129#pragma omp master
    130130#endif
    131131        {
    132132            globaltime = 0;
    133 #ifdef USE_OPENMP
     133#ifdef _OPENMP
    134134            num_omp_threads = omp_get_num_threads();
    135135#else
     
    138138        }
    139139
    140 #ifdef USE_OPENMP
     140#ifdef _OPENMP
    141141#pragma omp barrier
    142142#endif
    143143        while (!(have_to_stop || cyclecount == 0)) {
    144144        //while (!(have_to_stop || number_of_cycles == 0)) {
    145 #ifdef USE_OPENMP
     145#ifdef _OPENMP
    146146#pragma omp master
    147147#endif
     
    150150            }
    151151            internal_sc_cycle2();
    152 #ifdef USE_OPENMP
     152#ifdef _OPENMP
    153153#pragma omp master
    154154#endif
     
    159159            // number_of_cycles = (number_of_cycles < 0) ? number_of_cycles : number_of_cycles - 1;
    160160        }
    161 #ifdef USE_OPENMP
     161#ifdef _OPENMP
    162162#pragma omp barrier
    163163#endif
    164164#if 0
    165 #ifdef USE_OPENMP
     165#ifdef _OPENMP
    166166#pragma omp critical
    167167        {
     
    204204    if (is_posted_write()) {
    205205        // update posted value to external signals             
    206 #ifdef USE_OPENMP
     206#ifdef _OPENMP
    207207#pragma omp parallel
    208208#endif
     
    215215    // don't need to do func_combinationals since 'unstable' flag is now false
    216216    if (is_posted_write()) {
    217 #ifdef USE_OPENMP
     217#ifdef _OPENMP
    218218#pragma omp parallel
    219219#endif
  • sources/src/global_functions.cc

    r62 r63  
    248248    assert(pending_write_vector_capacity != 0);
    249249
    250 #ifdef USE_OPENMP
     250#ifdef _OPENMP
    251251    #define LINE_SIZE 128L
    252252    int malloc_size = (sizeof (pending_write_t) * (pending_write_vector_capacity + 1) + (LINE_SIZE - 1)) & ~(LINE_SIZE - 1);
  • sources/src/sc_main.cc

    r62 r63  
    3737#include <sstream>
    3838#include <list>
    39 #ifdef USE_OPENMP
     39#ifdef _OPENMP
    4040    #include <omp.h>
    4141#endif
     
    9090bool use_port_dependency  = false;
    9191
    92 #ifdef USE_OPENMP
     92#ifdef _OPENMP
    9393bool use_openmp = true;
    9494#else
  • sources/src/sc_module.cc

    r62 r63  
    3838#include <vector>
    3939#include <set>
    40 #ifdef USE_OPENMP
     40#ifdef _OPENMP
    4141    #include <omp.h>
    4242#endif
     
    131131    module = &mod;
    132132    dont_initialize = false;
    133 #ifdef USE_OPENMP
     133#ifdef _OPENMP
    134134    omp_threadnum = omp_get_thread_num();
    135135#endif
  • sources/src/sc_port.cc

    r62 r63  
    5555    int32_t * pending_write_vector_nb = 0;
    5656    unsigned long long int total_assig = 0;
    57 #ifdef USE_OPENMP
     57#ifdef _OPENMP
    5858#pragma omp threadprivate (pending_write_vector_nb, total_assig)
    5959#endif
     
    6969unsigned int pending_write_vector_capacity;
    7070pending_write_vector_t pending_write_vector = NULL;
    71 #ifdef USE_OPENMP
     71#ifdef _OPENMP
    7272#pragma omp threadprivate (pending_write_vector)
    7373#endif
  • sources/src/sc_signal.h

    r62 r63  
    7070extern "C" int32_t * pending_write_vector_nb;
    7171extern "C" unsigned long long int total_assig;
    72 #ifdef USE_OPENMP
     72#ifdef _OPENMP
    7373#pragma omp threadprivate(pending_write_vector_nb, total_assig)
    7474#endif
    7575extern unsigned int pending_write_vector_capacity;
    7676extern pending_write_vector_t pending_write_vector;
    77 #ifdef USE_OPENMP
     77#ifdef _OPENMP
    7878#pragma omp threadprivate(pending_write_vector)
    7979#endif
  • sources/src/sc_time.cc

    r62 r63  
    5555
    5656uint64 nb_cycles = 0;
    57 #ifdef USE_OPENMP
     57#ifdef _OPENMP
    5858#pragma omp threadprivate(nb_cycles)
    5959#endif
  • sources/src/sc_time.h

    r62 r63  
    4242
    4343extern uint64 nb_cycles;
    44 #ifdef USE_OPENMP
     44#ifdef _OPENMP
    4545#pragma omp threadprivate(nb_cycles)
    4646#endif
  • sources/src/sc_ver.cc

    r62 r63  
    7878    "\n"
    7979    "                           Last change : " __DATE__ "\n"
    80 #ifdef USE_OPENMP
     80#ifdef _OPENMP
    8181    "            Compiled with OpenMP enabled\n"
    8282#endif
  • sources/src/schedulers.cc

    r62 r63  
    4949#include "graph_signals.h" // makegraph
    5050
    51 #ifdef USE_OPENMP
     51#ifdef _OPENMP
    5252    #include <omp.h>
    5353#endif
     
    6464method_process_list_t * transition_func_list;
    6565method_process_list_t * moore_func_list;
    66 #ifdef USE_OPENMP
     66#ifdef _OPENMP
    6767#pragma omp threadprivate(transition_func_list, moore_func_list)
    6868#endif
     
    122122void sort_functions() {
    123123    method_process_list_t::const_iterator m;
    124 #ifdef USE_OPENMP
     124#ifdef _OPENMP
    125125#pragma omp parallel
    126126#pragma omp critical
     
    130130        moore_func_list = new method_process_list_t;
    131131        for (m = method_process_list.begin(); m != method_process_list.end(); ++m) {
    132 #ifdef USE_OPENMP
     132#ifdef _OPENMP
    133133            if ((*m)->omp_threadnum == omp_get_thread_num())
    134134#endif
     
    234234
    235235    sort_functions();
    236 #ifdef USE_OPENMP
     236#ifdef _OPENMP
    237237#pragma omp parallel
    238238#pragma omp critical
     
    240240    {
    241241        if (dump_funclist_info) {
    242 #ifdef USE_OPENMP
     242#ifdef _OPENMP
    243243            cerr << "Thread " << omp_get_thread_num() << "\n";
    244244#endif
    245245            cerr << "  Transition functions : " << *transition_func_list << "\n";
    246246            cerr << "  Moore generation functions : " << *moore_func_list << "\n";
    247 #ifdef USE_OPENMP
     247#ifdef _OPENMP
    248248#pragma omp master
    249249#endif
     
    295295                // Doesn't use port dependancies
    296296                strong_component_list_t * strong_list = NULL;
    297 #ifdef USE_OPENMP
     297#ifdef _OPENMP
    298298#pragma omp master
    299299#endif
     
    315315                //    delete *i;
    316316                //}
    317 #ifdef USE_OPENMP
     317#ifdef _OPENMP
    318318#pragma omp master
    319319#endif
Note: See TracChangeset for help on using the changeset viewer.