From c07404f6a1324f515841695666ca91af70f8b8a5 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Fri, 29 Apr 2016 15:19:19 -0700 Subject: [PATCH] Restore Tensor support for non c++11 compilers --- unsupported/Eigen/CXX11/src/Tensor/TensorCostModel.h | 10 +++++----- unsupported/test/cxx11_tensor_argmax.cpp | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorCostModel.h b/unsupported/Eigen/CXX11/src/Tensor/TensorCostModel.h index 4e8f86674..0f6dcedaa 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorCostModel.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorCostModel.h @@ -34,25 +34,25 @@ class TensorOpCost { template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE static int MulCost() { return internal::functor_traits< - internal::scalar_product_op>::Cost; + internal::scalar_product_op >::Cost; } template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE static int AddCost() { - return internal::functor_traits>::Cost; + return internal::functor_traits >::Cost; } template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE static int DivCost() { return internal::functor_traits< - internal::scalar_quotient_op>::Cost; + internal::scalar_quotient_op >::Cost; } template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE static int ModCost() { - return internal::functor_traits>::Cost; + return internal::functor_traits >::Cost; } template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE static int CastCost() { return internal::functor_traits< - internal::scalar_cast_op>::Cost; + internal::scalar_cast_op >::Cost; } TensorOpCost() : bytes_loaded_(0), bytes_stored_(0), compute_cycles_(0) {} diff --git a/unsupported/test/cxx11_tensor_argmax.cpp b/unsupported/test/cxx11_tensor_argmax.cpp index 482dfa7de..037767270 100644 --- a/unsupported/test/cxx11_tensor_argmax.cpp +++ b/unsupported/test/cxx11_tensor_argmax.cpp @@ -64,7 +64,7 @@ static void test_argmax_tuple_reducer() Tensor, 0, DataLayout> reduced; DimensionList dims; reduced = index_tuples.reduce( - dims, internal::ArgMaxTupleReducer>()); + dims, internal::ArgMaxTupleReducer >()); Tensor maxi = tensor.maximum(); @@ -74,7 +74,7 @@ static void test_argmax_tuple_reducer() for (int d = 0; d < 3; ++d) reduce_dims[d] = d; Tensor, 1, DataLayout> reduced_by_dims(7); reduced_by_dims = index_tuples.reduce( - reduce_dims, internal::ArgMaxTupleReducer>()); + reduce_dims, internal::ArgMaxTupleReducer >()); Tensor max_by_dims = tensor.maximum(reduce_dims); @@ -96,7 +96,7 @@ static void test_argmin_tuple_reducer() Tensor, 0, DataLayout> reduced; DimensionList dims; reduced = index_tuples.reduce( - dims, internal::ArgMinTupleReducer>()); + dims, internal::ArgMinTupleReducer >()); Tensor mini = tensor.minimum(); @@ -106,7 +106,7 @@ static void test_argmin_tuple_reducer() for (int d = 0; d < 3; ++d) reduce_dims[d] = d; Tensor, 1, DataLayout> reduced_by_dims(7); reduced_by_dims = index_tuples.reduce( - reduce_dims, internal::ArgMinTupleReducer>()); + reduce_dims, internal::ArgMinTupleReducer >()); Tensor min_by_dims = tensor.minimum(reduce_dims);