diff options
author | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-04-29 15:19:19 -0700 |
---|---|---|
committer | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-04-29 15:19:19 -0700 |
commit | c07404f6a1324f515841695666ca91af70f8b8a5 (patch) | |
tree | 4f4c80e9a2fbc71a18cc4f0955ba453d2072ac4e | |
parent | ba32ded021b1cf6224ec7c0b5638af079076e99e (diff) |
Restore Tensor support for non c++11 compilers
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorCostModel.h | 10 | ||||
-rw-r--r-- | 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 <typename ArgType> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE static int MulCost() { return internal::functor_traits< - internal::scalar_product_op<ArgType, ArgType>>::Cost; + internal::scalar_product_op<ArgType, ArgType> >::Cost; } template <typename ArgType> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE static int AddCost() { - return internal::functor_traits<internal::scalar_sum_op<ArgType>>::Cost; + return internal::functor_traits<internal::scalar_sum_op<ArgType> >::Cost; } template <typename ArgType> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE static int DivCost() { return internal::functor_traits< - internal::scalar_quotient_op<ArgType, ArgType>>::Cost; + internal::scalar_quotient_op<ArgType, ArgType> >::Cost; } template <typename ArgType> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE static int ModCost() { - return internal::functor_traits<internal::scalar_mod_op<ArgType>>::Cost; + return internal::functor_traits<internal::scalar_mod_op<ArgType> >::Cost; } template <typename SrcType, typename TargetType> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE static int CastCost() { return internal::functor_traits< - internal::scalar_cast_op<SrcType, TargetType>>::Cost; + internal::scalar_cast_op<SrcType, TargetType> >::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<Tuple<DenseIndex, float>, 0, DataLayout> reduced; DimensionList<DenseIndex, 4> dims; reduced = index_tuples.reduce( - dims, internal::ArgMaxTupleReducer<Tuple<DenseIndex, float>>()); + dims, internal::ArgMaxTupleReducer<Tuple<DenseIndex, float> >()); Tensor<float, 0, DataLayout> 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<Tuple<DenseIndex, float>, 1, DataLayout> reduced_by_dims(7); reduced_by_dims = index_tuples.reduce( - reduce_dims, internal::ArgMaxTupleReducer<Tuple<DenseIndex, float>>()); + reduce_dims, internal::ArgMaxTupleReducer<Tuple<DenseIndex, float> >()); Tensor<float, 1, DataLayout> max_by_dims = tensor.maximum(reduce_dims); @@ -96,7 +96,7 @@ static void test_argmin_tuple_reducer() Tensor<Tuple<DenseIndex, float>, 0, DataLayout> reduced; DimensionList<DenseIndex, 4> dims; reduced = index_tuples.reduce( - dims, internal::ArgMinTupleReducer<Tuple<DenseIndex, float>>()); + dims, internal::ArgMinTupleReducer<Tuple<DenseIndex, float> >()); Tensor<float, 0, DataLayout> 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<Tuple<DenseIndex, float>, 1, DataLayout> reduced_by_dims(7); reduced_by_dims = index_tuples.reduce( - reduce_dims, internal::ArgMinTupleReducer<Tuple<DenseIndex, float>>()); + reduce_dims, internal::ArgMinTupleReducer<Tuple<DenseIndex, float> >()); Tensor<float, 1, DataLayout> min_by_dims = tensor.minimum(reduce_dims); |