From e3e343390adf05e091b605bf4975c6e9f495e8a1 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Tue, 4 Apr 2017 09:56:33 -0700 Subject: Guard the sycl specific code with a #ifdef EIGEN_USE_SYCL --- unsupported/Eigen/CXX11/src/Tensor/TensorPatch.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorPatch.h') diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorPatch.h b/unsupported/Eigen/CXX11/src/Tensor/TensorPatch.h index 415021510..6e8e7885b 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorPatch.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorPatch.h @@ -99,11 +99,14 @@ struct TensorEvaluator, Device> }; EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device) - : m_impl(op.expression(), device), patch_dims(op.patch_dims()) + : m_impl(op.expression(), device) +#ifdef EIGEN_USE_SYCL + , m_patch_dims(op.patch_dims()) +#endif { Index num_patches = 1; const typename TensorEvaluator::Dimensions& input_dims = m_impl.dimensions(); - // const PatchDim& patch_dims = op.patch_dims(); + const PatchDim& patch_dims = op.patch_dims(); if (static_cast(Layout) == static_cast(ColMajor)) { for (int i = 0; i < NumDims-1; ++i) { m_dimensions[i] = patch_dims[i]; @@ -257,7 +260,7 @@ struct TensorEvaluator, Device> #ifdef EIGEN_USE_SYCL EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorEvaluator& impl() const { return m_impl; } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const PatchDim& functor() const { return patch_dims; } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const PatchDim& functor() const { return m_patch_dims; } #endif protected: @@ -267,8 +270,10 @@ struct TensorEvaluator, Device> array m_patchStrides; TensorEvaluator m_impl; - // required by sycl - const PatchDim patch_dims; + +#ifdef EIGEN_USE_SYCL + const PatchDim m_patch_dims; +#endif }; } // end namespace Eigen -- cgit v1.2.3