Changeset 63 for sources/src/gen_code.h


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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.