From: Daniel Arndt Date: Thu, 2 Feb 2017 15:30:10 +0000 (+0100) Subject: Restrict tests requiring C++11 X-Git-Tag: v8.5.0-rc1~162^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=580f981f7158e65e2eaaf9f88649529c81ce7a2f;p=dealii.git Restrict tests requiring C++11 --- diff --git a/include/deal.II/base/vectorization.h b/include/deal.II/base/vectorization.h index 2a9ed1b809..7b1f874184 100644 --- a/include/deal.II/base/vectorization.h +++ b/include/deal.II/base/vectorization.h @@ -19,6 +19,7 @@ #include #include +#include #include @@ -78,6 +79,42 @@ struct EnableIfScalar > }; + +#ifndef DEAL_II_WITH_CXX11 +// Specify the types for the implemented multiplications explicitly + +template +struct ProductType > +{ + typedef VectorizedArray type; +}; + +template +struct ProductType, Number> +{ + typedef VectorizedArray type; +}; + +// In contrast to scalar types for which the product of a float and a double +// variable would be a double variable, the implemented type here really is +// VectorizedArray. Since VectorizedArray is only half as +// wide as VectorizedArray, we would have to throw away half of the +// vector otherwise. +template<> +struct ProductType > +{ + typedef VectorizedArray type; +}; + +template<> +struct ProductType, double> +{ + typedef VectorizedArray type; +}; +#endif + + + /** * This generic class defines a unified interface to a vectorized data type. * For general template arguments, this class simply corresponds to the diff --git a/tests/base/symmetric_tensor_36.output b/tests/base/symmetric_tensor_36.with_cxx11=on.output similarity index 100% rename from tests/base/symmetric_tensor_36.output rename to tests/base/symmetric_tensor_36.with_cxx11=on.output diff --git a/tests/mpi/parallel_vector_20.cc b/tests/mpi/parallel_vector_20.cc index fb9ed93be5..fe2a8bdeca 100644 --- a/tests/mpi/parallel_vector_20.cc +++ b/tests/mpi/parallel_vector_20.cc @@ -39,7 +39,7 @@ void test() read_write_vector.local_element(0) = 1.; read_write_vector.local_element(1) = 2.; - v.import(read_write_vector, VectorOperation::values::insert); + v.import(read_write_vector, VectorOperation::insert); AssertThrow(v.local_element(0) == 1., ExcInternalError()); AssertThrow(v.local_element(1) == 2., ExcInternalError()); @@ -51,7 +51,7 @@ void test() read_write_vector.local_element(0) = 1.; read_write_vector.local_element(1) = 2.; - v.import(read_write_vector, VectorOperation::values::insert); + v.import(read_write_vector, VectorOperation::insert); AssertThrow(v.local_element(0) == my_id+1, ExcInternalError()); AssertThrow(v.local_element(1) == my_id+1, ExcInternalError());