diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h b/unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h index 07735fa5f..3952e733c 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h @@ -32,6 +32,29 @@ template <> struct max_n_1<0> { }; +// Default packet types +template +struct PacketType { + typedef typename internal::packet_traits::type type; + static const int size = internal::unpacket_traits::size; +}; + +// For CUDA packet types when using a GpuDevice +#if defined(EIGEN_USE_GPU) && defined(__CUDACC__) +template <> +struct PacketType { + typedef float4 type; + static const int size = 4; +}; +template <> +struct PacketType { + typedef double2 type; + static const int size = 2; +}; +#endif + + + // Tuple mimics std::pair but works on e.g. nvcc. template struct Tuple { public: