diff options
author | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-11-20 10:12:54 -0800 |
---|---|---|
committer | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-11-20 10:12:54 -0800 |
commit | 6d781e3e52b328710c55d854a97b2e69a3d433cc (patch) | |
tree | 9045672a31964bde027421b4c52d414d29fce3a7 | |
parent | 9265ca707ecde69c654029ff7209eff5cb50ffd4 (diff) | |
parent | 79a07b891bed35eba8ba4267722ecf99bf16a9d8 (diff) |
Merged eigen/eigen into default
-rw-r--r-- | Eigen/Core | 4 | ||||
-rw-r--r-- | Eigen/src/Core/AssignEvaluator.h | 8 | ||||
-rw-r--r-- | unsupported/Eigen/CXX11/Tensor | 1 | ||||
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h | 4 |
4 files changed, 11 insertions, 6 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/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<DstXprType, SrcXprType, Functor, EigenBase2EigenBase, Weak> 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<typename SrcScalarType> EIGEN_DEVICE_FUNC - static EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const internal::add_assign_op<typename DstXprType::Scalar,typename SrcXprType::Scalar> &/*func*/) + static EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const internal::add_assign_op<typename DstXprType::Scalar,SrcScalarType> &/*func*/) { Index dstRows = src.rows(); Index dstCols = src.cols(); @@ -889,8 +892,9 @@ struct Assignment<DstXprType, SrcXprType, Functor, EigenBase2EigenBase, Weak> src.addTo(dst); } + template<typename SrcScalarType> EIGEN_DEVICE_FUNC - static EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const internal::sub_assign_op<typename DstXprType::Scalar,typename SrcXprType::Scalar> &/*func*/) + static EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const internal::sub_assign_op<typename DstXprType::Scalar,SrcScalarType> &/*func*/) { Index dstRows = src.rows(); Index dstCols = src.cols(); 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 <SYCL/sycl.hpp> +#include <iostream> #include <map> #include <memory> #include <utility> diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h b/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h index 25500683f..a78350bf3 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<const uint8_t *, cl::sycl::buffer<uint8_t,1>>::iterator find_buffer(const void* ptr) const { auto it1 = buffer_map.find(static_cast<const uint8_t*>(ptr)); if (it1 != buffer_map.end()){ |