diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionCuda.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionCuda.h index 5e512490c..d3894e625 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionCuda.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionCuda.h @@ -336,9 +336,11 @@ struct FullReducer { static const bool HasOptimizedImplementation = !Op::IsStateful && (internal::is_same::value || (internal::is_same::value && reducer_traits::PacketAccess)); -#else +#elif __CUDA_ARCH__ >= 300 static const bool HasOptimizedImplementation = !Op::IsStateful && internal::is_same::value; +#else + static const bool HasOptimizedImplementation = false; #endif template @@ -617,9 +619,11 @@ struct InnerReducer { static const bool HasOptimizedImplementation = !Op::IsStateful && (internal::is_same::value || (internal::is_same::value && reducer_traits::PacketAccess)); -#else +#elif __CUDA_ARCH__ >= 300 static const bool HasOptimizedImplementation = !Op::IsStateful && internal::is_same::value; +#else + static const bool HasOptimizedImplementation = false; #endif template @@ -674,8 +678,12 @@ struct OuterReducer { // Unfortunately nvidia doesn't support well exotic types such as complex, // so reduce the scope of the optimized version of the code to the simple case // of floats. +#if __CUDA_ARCH__ >= 300 static const bool HasOptimizedImplementation = !Op::IsStateful && internal::is_same::value; +#else + static const bool HasOptimizedImplementation = false; +#endif template static EIGEN_DEVICE_FUNC bool run(const Self&, Op&, const Device&, OutputType*, typename Self::Index, typename Self::Index) {