diff options
author | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-02-29 10:53:38 -0800 |
---|---|---|
committer | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-02-29 10:53:38 -0800 |
commit | b2075cb7a2d321a11f2c9b96877eaf2d49dc1b25 (patch) | |
tree | 6707bf898de41a2cc207cc13ccc249e8a7167f7a /unsupported/Eigen | |
parent | 328484204559b3ae89c6131e65bdc397a17e0275 (diff) |
Made the signature of the inner and outer reducers consistent
Diffstat (limited to 'unsupported/Eigen')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h | 6 | ||||
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorReductionCuda.h | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h index 88d51e5f0..d01a63ccb 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h @@ -345,8 +345,9 @@ template <typename Self, typename Op, typename Device> struct InnerReducer { static const bool HasOptimizedImplementation = false; - EIGEN_DEVICE_FUNC static void run(const Self&, Op&, const Device&, typename Self::CoeffReturnType*, typename Self::Index, typename Self::Index) { + EIGEN_DEVICE_FUNC static bool run(const Self&, Op&, const Device&, typename Self::CoeffReturnType*, typename Self::Index, typename Self::Index) { eigen_assert(false && "Not implemented"); + return true; } }; @@ -355,8 +356,9 @@ template <typename Self, typename Op, typename Device> struct OuterReducer { static const bool HasOptimizedImplementation = false; - EIGEN_DEVICE_FUNC static void run(const Self&, Op&, const Device&, typename Self::CoeffReturnType*, typename Self::Index, typename Self::Index) { + EIGEN_DEVICE_FUNC static bool run(const Self&, Op&, const Device&, typename Self::CoeffReturnType*, typename Self::Index, typename Self::Index) { eigen_assert(false && "Not implemented"); + return true; } }; diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionCuda.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionCuda.h index c3b1b8b7a..bad5c1425 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionCuda.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionCuda.h @@ -226,8 +226,9 @@ struct InnerReducer<Self, Op, GpuDevice> { internal::is_same<typename Self::CoeffReturnType, float>::value; template <typename Device, typename OutputType> - static EIGEN_DEVICE_FUNC void run(const Self&, Op&, const Device&, OutputType*, typename Self::Index, typename Self::Index) { + static EIGEN_DEVICE_FUNC bool run(const Self&, Op&, const Device&, OutputType*, typename Self::Index, typename Self::Index) { assert(false && "Should only be called to reduce floats on a gpu device"); + return true; } static EIGEN_DEVICE_FUNC bool run(const Self& self, Op& reducer, const GpuDevice& device, float* output, typename Self::Index num_coeffs_to_reduce, typename Self::Index num_preserved_vals) { @@ -304,8 +305,9 @@ struct OuterReducer<Self, Op, GpuDevice> { internal::is_same<typename Self::CoeffReturnType, float>::value; template <typename Device, typename OutputType> - static EIGEN_DEVICE_FUNC void run(const Self&, Op&, const Device&, OutputType*, typename Self::Index, typename Self::Index) { + static EIGEN_DEVICE_FUNC bool run(const Self&, Op&, const Device&, OutputType*, typename Self::Index, typename Self::Index) { assert(false && "Should only be called to reduce floats on a gpu device"); + return true; } static EIGEN_DEVICE_FUNC bool run(const Self& self, Op& reducer, const GpuDevice& device, float* output, typename Self::Index num_coeffs_to_reduce, typename Self::Index num_preserved_vals) { |