Changeset 2446 for trunk


Ignore:
Timestamp:
03/29/12 14:48:26 (13 years ago)
Author:
KohjiNakamura
Message:

fixed to be able to compile without omp.h

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/concurrent.cpp

    r2392 r2446  
    1111//
    1212#include <stdio.h>
     13#ifdef _OPENMP
    1314#include <omp.h>
     15#endif
    1416#include <errno.h>
    1517#include <assert.h>
     
    165167void Broker::enableNested()
    166168{
     169#ifdef _OPENMP
    167170        omp_set_nested(1);
     171#endif
    168172}
    169173
    170174void Broker::disableNested()
    171175{
     176#ifdef _OPENMP
    172177        omp_set_nested(0);
     178#endif
    173179}
    174180
    175181void Broker::setNestedState(bool nested)
    176182{
     183#ifdef _OPENMP
    177184        omp_set_nested(static_cast<int>(nested));
     185#endif
    178186}
    179187
    180188bool Broker::getNestedState()
    181189{
     190#ifdef _OPENMP
    182191        return omp_get_nested() ? true : false;
     192#else
     193        return false;
     194#endif
    183195}
    184196
Note: See TracChangeset for help on using the changeset viewer.