![]() |
Eigen-unsupported
3.3.3
|
00001 // This file is part of Eigen, a lightweight C++ template library 00002 // for linear algebra. 00003 // 00004 // Copyright (C) 2016 Benoit Steiner <benoit.steiner.goog@gmail.com> 00005 // 00006 // This Source Code Form is subject to the terms of the Mozilla 00007 // Public License v. 2.0. If a copy of the MPL was not distributed 00008 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 00009 00010 #ifndef EIGEN_CXX11_THREADPOOL_THREAD_YIELD_H 00011 #define EIGEN_CXX11_THREADPOOL_THREAD_YIELD_H 00012 00013 // Try to come up with a portable way to yield 00014 #if EIGEN_COMP_GNUC && EIGEN_GNUC_AT_MOST(4, 7) 00015 #define EIGEN_THREAD_YIELD() sched_yield() 00016 #else 00017 #define EIGEN_THREAD_YIELD() std::this_thread::yield() 00018 #endif 00019 00020 #endif // EIGEN_CXX11_THREADPOOL_THREAD_YIELD_H