]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Rename to sum()
authorMaximilian Bergbauer <bergbauer@lnm.mw.tum.de>
Wed, 24 May 2023 19:38:09 +0000 (21:38 +0200)
committerMaximilian Bergbauer <bergbauer@lnm.mw.tum.de>
Wed, 24 May 2023 19:39:31 +0000 (21:39 +0200)
include/deal.II/base/vectorization.h
include/deal.II/matrix_free/fe_point_evaluation.h

index ffe8c130c1a985a704f9a6670f2b32a94f84356b..cce9b00d82101ee94fea24d6b882fa39e477744a 100644 (file)
@@ -657,11 +657,11 @@ public:
   }
 
   /**
-   * Returns horizontal sum of data field.
+   * Returns sum over entries of data field.
    */
   DEAL_II_ALWAYS_INLINE
   Number
-  horizontal_add()
+  sum()
   {
     return data;
   }
@@ -1227,10 +1227,10 @@ public:
   }
 
   /**
-   * Returns horizontal sum of data field.
+   * Returns sum over entries of data field.
    */
   double
-  horizontal_add();
+  sum();
 
   /**
    * Actual data field. To be consistent with the standard layout type and to
@@ -1826,10 +1826,10 @@ public:
   }
 
   /**
-   * Returns horizontal sum of data field.
+   * Returns sum over entries of data field.
    */
   float
-  horizontal_add();
+  sum();
 
   /**
    * Actual data field. To be consistent with the standard layout type and to
@@ -2530,10 +2530,10 @@ public:
   }
 
   /**
-   * Returns horizontal sum of data field.
+   * Returns sum over entries of data field.
    */
   double
-  horizontal_add();
+  sum();
 
   /**
    * Actual data field. To be consistent with the standard layout type and to
@@ -3088,10 +3088,10 @@ public:
   }
 
   /**
-   * Returns horizontal sum of data field.
+   * Returns sum over entries of data field.
    */
   float
-  horizontal_add();
+  sum();
 
   /**
    * Actual data field. To be consistent with the standard layout type and to
@@ -3676,10 +3676,10 @@ public:
   }
 
   /**
-   * Returns horizontal sum of data field.
+   * Returns sum over entries of data field.
    */
   double
-  horizontal_add();
+  sum();
 
   /**
    * Actual data field. To be consistent with the standard layout type and to
@@ -4138,10 +4138,10 @@ public:
   }
 
   /**
-   * Returns horizontal sum of data field.
+   * Returns sum over entries of data field.
    */
   float
-  horizontal_add();
+  sum();
 
   /**
    * Actual data field. To be consistent with the standard layout type and to
@@ -4939,12 +4939,12 @@ private:
 #endif // DOXYGEN
 
 /**
- * horizontal_add() functions.
+ * sum() functions.
  */
 
 #if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 128 && defined(__SSE2__)
 inline double
-VectorizedArray<double, 2>::horizontal_add()
+VectorizedArray<double, 2>::sum()
 {
   __m128d t1 = _mm_unpackhi_pd(data, data);
   __m128d t2 = _mm_add_pd(data, t1);
@@ -4954,7 +4954,7 @@ VectorizedArray<double, 2>::horizontal_add()
 
 
 inline float
-VectorizedArray<float, 4>::horizontal_add()
+VectorizedArray<float, 4>::sum()
 {
   __m128 t1 = _mm_movehl_ps(data, data);
   __m128 t2 = _mm_add_ps(data, t1);
@@ -4968,21 +4968,21 @@ VectorizedArray<float, 4>::horizontal_add()
 
 #if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 256 && defined(__AVX__)
 inline double
-VectorizedArray<double, 4>::horizontal_add()
+VectorizedArray<double, 4>::sum()
 {
   VectorizedArray<double, 2> t1;
   t1.data = _mm_add_pd(this->get_lower(), this->get_upper());
-  return t1.horizontal_add();
+  return t1.sum();
 }
 
 
 
 inline float
-VectorizedArray<float, 8>::horizontal_add()
+VectorizedArray<float, 8>::sum()
 {
   VectorizedArray<float, 4> t1;
   t1.data = _mm_add_ps(this->get_lower(), this->get_upper());
-  return t1.horizontal_add();
+  return t1.sum();
 }
 #endif
 
@@ -4990,21 +4990,21 @@ VectorizedArray<float, 8>::horizontal_add()
 
 #if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 512 && defined(__AVX512F__)
 inline double
-VectorizedArray<double, 8>::horizontal_add()
+VectorizedArray<double, 8>::sum()
 {
   VectorizedArray<double, 4> t1;
   t1.data = _mm256_add_pd(this->get_lower(), this->get_upper());
-  return t1.horizontal_add();
+  return t1.sum();
 }
 
 
 
 inline float
-VectorizedArray<float, 16>::horizontal_add()
+VectorizedArray<float, 16>::sum()
 {
   VectorizedArray<float, 8> t1;
   t1.data = _mm256_add_ps(this->get_lower(), this->get_upper());
-  return t1.horizontal_add();
+  return t1.sum();
 }
 #endif
 
index cecab550a673172529990beb323981498fdaecc6..0b13f8b7bd78f63e434371c8d9f6c83a669f2642 100644 (file)
@@ -2067,7 +2067,7 @@ FEPointEvaluation<n_components_, dim, spacedim, Number>::finish_integrate_fast(
               ETT::write_value(vectorized_input,
                                comp,
                                solution_renumbered_vectorized[i]);
-              input[i] = vectorized_input.horizontal_add();
+              input[i] = vectorized_input.sum();
             }
 
           internal::FEFaceNormalEvaluationImpl<dim, -1, ScalarNumber>::
@@ -2089,7 +2089,7 @@ FEPointEvaluation<n_components_, dim, spacedim, Number>::finish_integrate_fast(
               VectorizedArrayType result;
               ETT::write_value(result, comp, solution_renumbered_vectorized[i]);
               solution_values[renumber[comp * dofs_per_component + i]] =
-                result.horizontal_add();
+                result.sum();
             }
         }
     }

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.