]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Reduce overhead of AlignedVector 15193/head
authorMaximilian Bergbauer <maximilian.bergbauer@tum.de>
Thu, 11 May 2023 13:10:23 +0000 (15:10 +0200)
committerMaximilian Bergbauer <maximilian.bergbauer@tum.de>
Thu, 11 May 2023 14:55:54 +0000 (16:55 +0200)
include/deal.II/matrix_free/evaluation_kernels.h
include/deal.II/matrix_free/tensor_product_kernels.h

index bf994afb1be2729263e952f1d5ebf9f20c12f091..7167750c2d42fb63d9920e60c28ec8ff49d5e44e 100644 (file)
@@ -3552,9 +3552,9 @@ namespace internal
                                  fe_degree + 1,
                                  0,
                                  Number>
-            evalf(shape_data[face_no % 2],
-                  AlignedVector<Number>(),
-                  AlignedVector<Number>(),
+            evalf(shape_data[face_no % 2].begin(),
+                  nullptr,
+                  nullptr,
                   n_points_1d,
                   0);
 
index e02030183a83f5ab385da2235ffb72578f5bfacb..05ae25107aad5e3cc6149666f19feeb724bb73cb 100644 (file)
@@ -231,6 +231,22 @@ namespace internal
       (void)dummy2;
     }
 
+    /**
+     * Constructor, taking the data from ShapeInfo via raw pointers
+     */
+    EvaluatorTensorProduct(const Number2 *    shape_values,
+                           const Number2 *    shape_gradients,
+                           const Number2 *    shape_hessians,
+                           const unsigned int dummy1 = 0,
+                           const unsigned int dummy2 = 0)
+      : shape_values(shape_values)
+      , shape_gradients(shape_gradients)
+      , shape_hessians(shape_hessians)
+    {
+      (void)dummy1;
+      (void)dummy2;
+    }
+
     template <int direction, bool contract_over_rows, bool add>
     void
     values(const Number in[], Number out[]) const

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.