TensorMacros.h
00001 // This file is part of Eigen, a lightweight C++ template library
00002 // for linear algebra.
00003 //
00004 // Copyright (C) 2015 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_TENSOR_TENSOR_META_MACROS_H
00011 #define EIGEN_CXX11_TENSOR_TENSOR_META_MACROS_H
00012 
00013 
00029 // SFINAE requires variadic templates
00030 #ifndef __CUDACC__
00031 #if EIGEN_HAS_VARIADIC_TEMPLATES
00032   // SFINAE doesn't work for gcc <= 4.7
00033   #ifdef EIGEN_COMP_GNUC
00034     #if EIGEN_GNUC_AT_LEAST(4,8)
00035       #define EIGEN_HAS_SFINAE
00036     #endif
00037   #else
00038     #define EIGEN_HAS_SFINAE
00039   #endif
00040 #endif
00041 #endif
00042 
00043 #define EIGEN_SFINAE_ENABLE_IF( __condition__ ) \
00044     typename internal::enable_if< ( __condition__ ) , int >::type = 0
00045 
00046 
00047 #if EIGEN_HAS_CONSTEXPR
00048 #define EIGEN_CONSTEXPR constexpr
00049 #else
00050 #define EIGEN_CONSTEXPR
00051 #endif
00052 
00053 
00054 #endif
 All Classes Functions Variables Typedefs Enumerator