diff --git a/include/deal.II/lac/vector.templates.h b/include/deal.II/lac/vector.templates.h index 942f1f9cbd0e..72a65c7e1766 100644 --- a/include/deal.II/lac/vector.templates.h +++ b/include/deal.II/lac/vector.templates.h @@ -48,6 +48,28 @@ DEAL_II_NAMESPACE_OPEN +/** + * Helper struct to tell us if we can use SIMD instructions for the given @p + * Number type. + */ +template +struct EnableOpenMPSimdFor +{ + static const bool value = true; +}; + +#ifdef __INTEL_COMPILER +// Disable long double SIMD instructions on ICC. This is to work around a bug +// that generates wrong code at least up to intel 15 (see +// tests/lac/vector-vector, tests/lac/intel-15-bug, and the discussion at +// https://github.com/dealii/dealii/issues/598). +template <> +struct EnableOpenMPSimdFor +{ + static const bool value = false; +}; +#endif + namespace internal { @@ -159,9 +181,17 @@ namespace internal void operator() (const size_type begin, const size_type end) const { - DEAL_II_OPENMP_SIMD_PRAGMA - for (size_type i=begin; i::value) + { + DEAL_II_OPENMP_SIMD_PRAGMA + for (size_type i=begin; i::value) + { + DEAL_II_OPENMP_SIMD_PRAGMA + for (size_type i=begin; i::value) + { + DEAL_II_OPENMP_SIMD_PRAGMA + for (size_type i=begin; i::value) + { + DEAL_II_OPENMP_SIMD_PRAGMA + for (size_type i=begin; i::value) + { + DEAL_II_OPENMP_SIMD_PRAGMA + for (size_type i=begin; i::value) + { + DEAL_II_OPENMP_SIMD_PRAGMA + for (size_type i=begin; i::value) + { + DEAL_II_OPENMP_SIMD_PRAGMA + for (size_type i=begin; i::value) + { + DEAL_II_OPENMP_SIMD_PRAGMA + for (size_type i=begin; i::value) + { + DEAL_II_OPENMP_SIMD_PRAGMA + for (size_type i=begin; i::value) + { + DEAL_II_OPENMP_SIMD_PRAGMA + for (size_type i=begin; i::value) + { + DEAL_II_OPENMP_SIMD_PRAGMA + for (size_type i=begin; i::value) + { + DEAL_II_OPENMP_SIMD_PRAGMA + for (size_type i=begin; i::value) + { + DEAL_II_OPENMP_SIMD_PRAGMA + for (size_type i=begin; i::value) + { + DEAL_II_OPENMP_SIMD_PRAGMA + for (size_type i=begin; i