Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/eigen3/unsupported/Eigen/CXX11/src/ThreadPool/ThreadYield.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // This file is part of Eigen, a lightweight C++ template library
0002 // for linear algebra.
0003 //
0004 // Copyright (C) 2016 Benoit Steiner <benoit.steiner.goog@gmail.com>
0005 //
0006 // This Source Code Form is subject to the terms of the Mozilla
0007 // Public License v. 2.0. If a copy of the MPL was not distributed
0008 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
0009 
0010 #ifndef EIGEN_CXX11_THREADPOOL_THREAD_YIELD_H
0011 #define EIGEN_CXX11_THREADPOOL_THREAD_YIELD_H
0012 
0013 // Try to come up with a portable way to yield
0014 #if EIGEN_COMP_GNUC && EIGEN_GNUC_AT_MOST(4, 7)
0015 #define EIGEN_THREAD_YIELD() sched_yield()
0016 #else
0017 #define EIGEN_THREAD_YIELD() std::this_thread::yield()
0018 #endif
0019 
0020 #endif  // EIGEN_CXX11_THREADPOOL_THREAD_YIELD_H