From 2d1aec15a7b95a6369c73fdebcab59603fa6515a Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Sat, 19 Nov 2016 08:09:54 -0800 Subject: [PATCH 1/4] Added missing include --- unsupported/Eigen/CXX11/Tensor | 1 + 1 file changed, 1 insertion(+) diff --git a/unsupported/Eigen/CXX11/Tensor b/unsupported/Eigen/CXX11/Tensor index e41b67c56..8b36093f0 100644 --- a/unsupported/Eigen/CXX11/Tensor +++ b/unsupported/Eigen/CXX11/Tensor @@ -20,6 +20,7 @@ #undef isinf #undef isfinite #include +#include #include #include #include From 81151bd47489f39dedc3e9faa32679740c98bf01 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Sat, 19 Nov 2016 19:12:59 -0800 Subject: [PATCH 2/4] Fixed merge conflicts --- Eigen/Core | 4 ---- unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Eigen/Core b/Eigen/Core index a9a082782..444c1c8d7 100644 --- a/Eigen/Core +++ b/Eigen/Core @@ -47,10 +47,6 @@ #define EIGEN_DEVICE_FUNC #endif -#if defined(EIGEN_USE_SYCL) - #define EIGEN_DONT_VECTORIZE -#endif - // When compiling CUDA device code with NVCC, pull in math functions from the // global namespace. In host mode, and when device doee with clang, use the // std versions. diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h b/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h index 3fe0219ac..5d5ddfcb7 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h @@ -94,6 +94,10 @@ struct QueueInterface { } } + EIGEN_STRONG_INLINE void deallocate_all() const { + buffer_map.clear; + } + EIGEN_STRONG_INLINE std::map>::iterator find_buffer(const void* ptr) const { auto it1 = buffer_map.find(static_cast(ptr)); if (it1 != buffer_map.end()){ From 465ede0f20bae4795cd56b6987aaac77c5913bb2 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Sun, 20 Nov 2016 09:41:37 +0100 Subject: [PATCH 3/4] Fix compilation issue in mat = permutation (regression introduced in 8193ffb3d38b56c9295f204dc57dc6bac74f58aa ) --- Eigen/src/Core/AssignEvaluator.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Eigen/src/Core/AssignEvaluator.h b/Eigen/src/Core/AssignEvaluator.h index 6225bd73d..0d0189657 100644 --- a/Eigen/src/Core/AssignEvaluator.h +++ b/Eigen/src/Core/AssignEvaluator.h @@ -877,8 +877,11 @@ struct Assignment src.evalTo(dst); } + // NOTE The following two functions are templated to avoid their instanciation if not needed + // This is needed because some expressions supports evalTo only and/or have 'void' as scalar type. + template EIGEN_DEVICE_FUNC - static EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const internal::add_assign_op &/*func*/) + static EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const internal::add_assign_op &/*func*/) { Index dstRows = src.rows(); Index dstCols = src.cols(); @@ -889,8 +892,9 @@ struct Assignment src.addTo(dst); } + template EIGEN_DEVICE_FUNC - static EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const internal::sub_assign_op &/*func*/) + static EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const internal::sub_assign_op &/*func*/) { Index dstRows = src.rows(); Index dstCols = src.cols(); From 79a07b891bed35eba8ba4267722ecf99bf16a9d8 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Sun, 20 Nov 2016 07:07:41 -0800 Subject: [PATCH 4/4] Fixed a typo --- unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h b/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h index 5d5ddfcb7..f880a8b90 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h @@ -95,7 +95,7 @@ struct QueueInterface { } EIGEN_STRONG_INLINE void deallocate_all() const { - buffer_map.clear; + buffer_map.clear(); } EIGEN_STRONG_INLINE std::map>::iterator find_buffer(const void* ptr) const {