diff options
author | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2018-08-10 13:02:41 -0700 |
---|---|---|
committer | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2018-08-10 13:02:41 -0700 |
commit | c8ea39867573b36c72c5342393f4e3ee22ab6406 (patch) | |
tree | 8d1f574ff9daf3f5c3c4a5c9c447437f6d149d8e /unsupported/Eigen/CXX11/src | |
parent | 4be42862241d4f976d8ed92a2cc0ad5b06520ef9 (diff) |
Avoided language features that are only available in cxx11 mode.
Diffstat (limited to 'unsupported/Eigen/CXX11/src')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h b/unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h index 17008917a..3f3b5685d 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h @@ -36,7 +36,7 @@ template <typename Expression, typename Device, bool Vectorizable, bool Tileable> class TensorExecutor { public: - using StorageIndex = typename Expression::Index; + typedef typename Expression::Index StorageIndex; EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(const Expression& expr, @@ -60,7 +60,7 @@ template <typename Expression> class TensorExecutor<Expression, DefaultDevice, /*Vectorizable*/ true, /*Tileable*/ false> { public: - using StorageIndex = typename Expression::Index; + typedef typename Expression::Index StorageIndex; EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(const Expression& expr, @@ -102,21 +102,19 @@ template <typename Expression, bool Vectorizable> class TensorExecutor<Expression, DefaultDevice, Vectorizable, /*Tileable*/ true> { public: - using Scalar = typename traits<Expression>::Scalar; - using ScalarNoConst = typename remove_const<Scalar>::type; + typedef typename traits<Expression>::Scalar Scalar; + typedef typename remove_const<Scalar>::type ScalarNoConst; - using Evaluator = TensorEvaluator<Expression, DefaultDevice>; - using StorageIndex = typename traits<Expression>::Index; + typedef TensorEvaluator<Expression, DefaultDevice> Evaluator; + typedef typename traits<Expression>::Index StorageIndex; static const int NumDims = traits<Expression>::NumDimensions; EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(const Expression& expr, const DefaultDevice& device = DefaultDevice()) { - using TensorBlock = - TensorBlock<ScalarNoConst, StorageIndex, NumDims, Evaluator::Layout>; - using TensorBlockMapper = TensorBlockMapper<ScalarNoConst, StorageIndex, - NumDims, Evaluator::Layout>; + typedef TensorBlock<ScalarNoConst, StorageIndex, NumDims, Evaluator::Layout> TensorBlock; + typedef TensorBlockMapper<ScalarNoConst, StorageIndex, NumDims, Evaluator::Layout> TensorBlockMapper; Evaluator evaluator(expr, device); Index total_size = array_prod(evaluator.dimensions()); @@ -221,7 +219,7 @@ struct EvalRange<Evaluator, StorageIndex, /*Vectorizable*/ true> { template <typename Expression, bool Vectorizable, bool Tileable> class TensorExecutor<Expression, ThreadPoolDevice, Vectorizable, Tileable> { public: - using StorageIndex = typename Expression::Index; + typedef typename Expression::Index StorageIndex; static EIGEN_STRONG_INLINE void run(const Expression& expr, const ThreadPoolDevice& device) { @@ -249,20 +247,18 @@ class TensorExecutor<Expression, ThreadPoolDevice, Vectorizable, Tileable> { template <typename Expression, bool Vectorizable> class TensorExecutor<Expression, ThreadPoolDevice, Vectorizable, /*Tileable*/ true> { public: - using Scalar = typename traits<Expression>::Scalar; - using ScalarNoConst = typename remove_const<Scalar>::type; + typedef typename traits<Expression>::Scalar Scalar; + typedef typename remove_const<Scalar>::type ScalarNoConst; - using Evaluator = TensorEvaluator<Expression, ThreadPoolDevice>; - using StorageIndex = typename traits<Expression>::Index; + typedef TensorEvaluator<Expression, ThreadPoolDevice> Evaluator; + typedef typename traits<Expression>::Index StorageIndex; static const int NumDims = traits<Expression>::NumDimensions; static EIGEN_STRONG_INLINE void run(const Expression& expr, const ThreadPoolDevice& device) { - using TensorBlock = - TensorBlock<ScalarNoConst, StorageIndex, NumDims, Evaluator::Layout>; - using TensorBlockMapper = - TensorBlockMapper<ScalarNoConst, StorageIndex, NumDims, Evaluator::Layout>; + typedef TensorBlock<ScalarNoConst, StorageIndex, NumDims, Evaluator::Layout> TensorBlock; + typedef TensorBlockMapper<ScalarNoConst, StorageIndex, NumDims, Evaluator::Layout> TensorBlockMapper; Evaluator evaluator(expr, device); StorageIndex total_size = array_prod(evaluator.dimensions()); |