ThreadLocal.h
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_LOCAL_H
00011 #define EIGEN_CXX11_THREADPOOL_THREAD_LOCAL_H
00012 
00013 // Try to come up with a portable implementation of thread local variables
00014 #if EIGEN_COMP_GNUC && EIGEN_GNUC_AT_MOST(4, 7)
00015 #define EIGEN_THREAD_LOCAL static __thread
00016 #elif EIGEN_COMP_CLANG
00017 #define EIGEN_THREAD_LOCAL static __thread
00018 #else
00019 #define EIGEN_THREAD_LOCAL static thread_local
00020 #endif
00021 
00022 #endif  // EIGEN_CXX11_THREADPOOL_THREAD_LOCAL_H
 All Classes Functions Variables Typedefs Enumerator