Changeset 2446
- Timestamp:
- 03/29/12 14:48:26 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/concurrent.cpp
r2392 r2446 11 11 // 12 12 #include <stdio.h> 13 #ifdef _OPENMP 13 14 #include <omp.h> 15 #endif 14 16 #include <errno.h> 15 17 #include <assert.h> … … 165 167 void Broker::enableNested() 166 168 { 169 #ifdef _OPENMP 167 170 omp_set_nested(1); 171 #endif 168 172 } 169 173 170 174 void Broker::disableNested() 171 175 { 176 #ifdef _OPENMP 172 177 omp_set_nested(0); 178 #endif 173 179 } 174 180 175 181 void Broker::setNestedState(bool nested) 176 182 { 183 #ifdef _OPENMP 177 184 omp_set_nested(static_cast<int>(nested)); 185 #endif 178 186 } 179 187 180 188 bool Broker::getNestedState() 181 189 { 190 #ifdef _OPENMP 182 191 return omp_get_nested() ? true : false; 192 #else 193 return false; 194 #endif 183 195 } 184 196
Note:
See TracChangeset
for help on using the changeset viewer.