]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove ctors and assign data directly
authorMaximilian Bergbauer <maximilian.bergbauer@tum.de>
Mon, 22 May 2023 12:37:05 +0000 (14:37 +0200)
committerMaximilian Bergbauer <maximilian.bergbauer@tum.de>
Mon, 22 May 2023 12:37:05 +0000 (14:37 +0200)
include/deal.II/base/vectorization.h

index ee71f123837165eeb915ca2475301396e98fc357..06a29e0d9690ecbb402c15829b50e814408a6941 100644 (file)
@@ -2314,14 +2314,6 @@ public:
     : VectorizedArrayBase<VectorizedArray<double, 4>, 4>(list)
   {}
 
-  /**
-   * Construct an array with the data field.
-   */
-  VectorizedArray(__m256d const &x)
-  {
-    data = x;
-  }
-
   /**
    * This function can be used to set all data fields to a given scalar.
    */
@@ -2894,14 +2886,6 @@ public:
     : VectorizedArrayBase<VectorizedArray<float, 8>, 8>(list)
   {}
 
-  /**
-   * Construct an array with the data field.
-   */
-  VectorizedArray(__m256 const &x)
-  {
-    data = x;
-  }
-
   /**
    * This function can be used to set all data fields to a given scalar.
    */
@@ -3494,14 +3478,6 @@ public:
     : VectorizedArrayBase<VectorizedArray<double, 2>, 2>(list)
   {}
 
-  /**
-   * Construct an array with the data field.
-   */
-  VectorizedArray(__m128d const &x)
-  {
-    data = x;
-  }
-
   /**
    * This function can be used to set all data fields to a given scalar.
    */
@@ -3993,14 +3969,6 @@ public:
     return *this;
   }
 
-  /**
-   * Construct an array with the data field.
-   */
-  VectorizedArray(__m128 const &x)
-  {
-    data = x;
-  }
-
   /**
    * Assign a scalar to the current object. This overload is used for
    * rvalue references; because it does not make sense to assign
@@ -5002,7 +4970,8 @@ VectorizedArray<float, 4>::horizontal_add()
 inline double
 VectorizedArray<double, 4>::horizontal_add()
 {
-  VectorizedArray<double, 2> t1(this->get_low() + this->get_high());
+  VectorizedArray<double, 2> t1;
+  t1.data = this->get_low() + this->get_high();
   return t1.horizontal_add();
 }
 
@@ -5011,7 +4980,8 @@ VectorizedArray<double, 4>::horizontal_add()
 inline float
 VectorizedArray<float, 8>::horizontal_add()
 {
-  VectorizedArray<float, 4> t1(this->get_low() + this->get_high());
+  VectorizedArray<float, 4> t1;
+  t1.data = this->get_low() + this->get_high();
   return t1.horizontal_add();
 }
 #endif
@@ -5022,7 +4992,8 @@ VectorizedArray<float, 8>::horizontal_add()
 inline double
 VectorizedArray<double, 8>::horizontal_add()
 {
-  VectorizedArray<double, 4> t1(this->get_low() + this->get_high());
+  VectorizedArray<double, 4> t1;
+  t1.data = this->get_low() + this->get_high();
   return t1.horizontal_add();
 }
 
@@ -5031,7 +5002,8 @@ VectorizedArray<double, 8>::horizontal_add()
 inline float
 VectorizedArray<float, 16>::horizontal_add()
 {
-  VectorizedArray<float, 8> t1(this->get_low() + this->get_high());
+  VectorizedArray<float, 8> t1;
+  t1.data = this->get_low() + this->get_high();
   return t1.horizontal_add();
 }
 #endif

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.