From: Timo Heister Date: Thu, 26 Feb 2015 14:14:11 +0000 (-0500) Subject: Disable SIMD vector operations for certain types X-Git-Tag: v8.3.0-rc1~406^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F608%2Fhead;p=dealii.git Disable SIMD vector operations for certain types 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). --- diff --git a/include/deal.II/lac/vector.templates.h b/include/deal.II/lac/vector.templates.h index 942f1f9cbd..72a65c7e17 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