]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove a few VectorizedArray::n_array_elements in examples
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Sat, 21 Mar 2020 16:39:28 +0000 (17:39 +0100)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Sat, 21 Mar 2020 16:41:51 +0000 (17:41 +0100)
examples/step-37/step-37.cc
examples/step-48/step-48.cc
examples/step-59/step-59.cc

index f1a910d2057deedf4698bc9a8c74e36b82520980..05139308615c7a8ead4d05329ed8fbebe4fbc8b1 100644 (file)
@@ -1152,9 +1152,8 @@ namespace Step37
   void LaplaceProblem<dim>::run()
   {
     {
-      const unsigned int n_vect_doubles =
-        VectorizedArray<double>::n_array_elements;
-      const unsigned int n_vect_bits = 8 * sizeof(double) * n_vect_doubles;
+      const unsigned int n_vect_doubles = VectorizedArray<double>::size();
+      const unsigned int n_vect_bits    = 8 * sizeof(double) * n_vect_doubles;
 
       pcout << "Vectorization over " << n_vect_doubles
             << " doubles = " << n_vect_bits << " bits ("
index 155d345f01f7c65cf298ab92f5fcf3a34432f163..8c79feb1e51a409598beb22adcbc9c7fa704bf17 100644 (file)
@@ -529,9 +529,8 @@ namespace Step48
             << Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD) << std::endl;
       pcout << "Number of threads on each rank: "
             << MultithreadInfo::n_threads() << std::endl;
-      const unsigned int n_vect_doubles =
-        VectorizedArray<double>::n_array_elements;
-      const unsigned int n_vect_bits = 8 * sizeof(double) * n_vect_doubles;
+      const unsigned int n_vect_doubles = VectorizedArray<double>::size();
+      const unsigned int n_vect_bits    = 8 * sizeof(double) * n_vect_doubles;
       pcout << "Vectorization over " << n_vect_doubles
             << " doubles = " << n_vect_bits << " bits ("
             << Utilities::System::get_current_vectorization_level()
index 9378c1f8cdaced12d8904bbcebb5e82256167fa2..692a92bf017614d546a2d161e32b40b3a1ea28ea 100644 (file)
@@ -818,9 +818,7 @@ namespace Step59
         for (unsigned int d = 0; d < dim; ++d)
           for (unsigned int e = 0; e < dim; ++e)
             if (d != e)
-              for (unsigned int v = 0;
-                   v < VectorizedArray<number>::n_array_elements;
-                   ++v)
+              for (unsigned int v = 0; v < VectorizedArray<number>::size(); ++v)
                 AssertThrow(inverse_jacobian[d][e][v] == 0.,
                             ExcNotImplemented());
 
@@ -1084,9 +1082,7 @@ namespace Step59
             VectorizedArray<double> rhs_val = VectorizedArray<double>();
             Point<dim, VectorizedArray<double>> point_batch =
               phi.quadrature_point(q);
-            for (unsigned int v = 0;
-                 v < VectorizedArray<double>::n_array_elements;
-                 ++v)
+            for (unsigned int v = 0; v < VectorizedArray<double>::size(); ++v)
               {
                 Point<dim> single_point;
                 for (unsigned int d = 0; d < dim; ++d)
@@ -1143,9 +1139,7 @@ namespace Step59
             Point<dim, VectorizedArray<double>> point_batch =
               phi_face.quadrature_point(q);
 
-            for (unsigned int v = 0;
-                 v < VectorizedArray<double>::n_array_elements;
-                 ++v)
+            for (unsigned int v = 0; v < VectorizedArray<double>::size(); ++v)
               {
                 Point<dim> single_point;
                 for (unsigned int d = 0; d < dim; ++d)

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.