#include <deal.II/base/config.h>
#include <deal.II/base/exceptions.h>
+#include <deal.II/base/template_constraints.h>
#include <cmath>
};
+
+#ifndef DEAL_II_WITH_CXX11
+// Specify the types for the implemented multiplications explicitly
+
+template <typename Number>
+struct ProductType<Number, VectorizedArray<Number> >
+{
+ typedef VectorizedArray<Number> type;
+};
+
+template <typename Number>
+struct ProductType<VectorizedArray<Number>, Number>
+{
+ typedef VectorizedArray<Number> 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<float>. Since VectorizedArray<double> is only half as
+// wide as VectorizedArray<float>, we would have to throw away half of the
+// vector otherwise.
+template<>
+struct ProductType<double, VectorizedArray<float> >
+{
+ typedef VectorizedArray<float> type;
+};
+
+template<>
+struct ProductType<VectorizedArray<float>, double>
+{
+ typedef VectorizedArray<float> type;
+};
+#endif
+
+
+
/**
* This generic class defines a unified interface to a vectorized data type.
* For general template arguments, this class simply corresponds to the
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());
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());