aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/CXX11/src/Tensor/TensorForwardDeclarations.h
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2015-07-01 11:32:04 -0700
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2015-07-01 11:32:04 -0700
commit925d0d375a05f09c3e3abb91f29fc2513bb25d0d (patch)
treec88a75d40e6e005ea6b6c0630c74a2707a8d7455 /unsupported/Eigen/CXX11/src/Tensor/TensorForwardDeclarations.h
parent44eedd89159d75b319bc714775b58bb54eb92927 (diff)
Enabled the vectorized evaluation of several tensor expressions that was previously disabled by mistake
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorForwardDeclarations.h')
-rw-r--r--unsupported/Eigen/CXX11/src/Tensor/TensorForwardDeclarations.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorForwardDeclarations.h b/unsupported/Eigen/CXX11/src/Tensor/TensorForwardDeclarations.h
index 7df8d1453..b3bc16bc4 100644
--- a/unsupported/Eigen/CXX11/src/Tensor/TensorForwardDeclarations.h
+++ b/unsupported/Eigen/CXX11/src/Tensor/TensorForwardDeclarations.h
@@ -51,8 +51,27 @@ template<typename XprType> class TensorForcedEvalOp;
template<typename ExpressionType, typename DeviceType> class TensorDevice;
template<typename Derived, typename Device> struct TensorEvaluator;
+class DefaultDevice;
+class ThreadPoolDevice;
+class GpuDevice;
+
namespace internal {
-template<typename Expression, typename Device, bool Vectorizable> class TensorExecutor;
+
+template <typename Device, typename Expression>
+struct IsVectorizable {
+ static const bool value = TensorEvaluator<Expression, Device>::PacketAccess;
+};
+
+template <typename Expression>
+struct IsVectorizable<GpuDevice, Expression> {
+ static const bool value = TensorEvaluator<Expression, GpuDevice>::PacketAccess &&
+ TensorEvaluator<Expression, GpuDevice>::IsAligned;
+};
+
+template <typename Expression, typename Device,
+ bool Vectorizable = IsVectorizable<Device, Expression>::value>
+class TensorExecutor;
+
} // end namespace internal
} // end namespace Eigen