]> https://gitweb.dealii.org/ - dealii.git/commitdiff
TensorProductMatrix: with arbitrary number of lanes 14366/head
authorPeter Munch <peterrmuench@gmail.com>
Fri, 21 Oct 2022 07:29:57 +0000 (09:29 +0200)
committerPeter Munch <peterrmuench@gmail.com>
Fri, 21 Oct 2022 07:31:22 +0000 (09:31 +0200)
include/deal.II/lac/tensor_product_matrix.h

index 86a32dcb26016df82d2a8447b5ab6d1c9faa64b8..e7d2fa09bb4c474fa17d4ee69951b70cb296ff76 100644 (file)
@@ -585,16 +585,20 @@ namespace internal
 
 
 
-    template <std::size_t dim, typename Number>
+    template <std::size_t dim, typename Number, std::size_t n_lanes>
     inline void
-    setup(const std::array<Table<2, VectorizedArray<Number>>, dim> &mass_matrix,
-          const std::array<Table<2, VectorizedArray<Number>>, dim>
-            &                                                 derivative_matrix,
-          std::array<Table<2, VectorizedArray<Number>>, dim> &eigenvectors,
-          std::array<AlignedVector<VectorizedArray<Number>>, dim> &eigenvalues)
+    setup(
+      const std::array<Table<2, VectorizedArray<Number, n_lanes>>, dim>
+        &mass_matrix,
+      const std::array<Table<2, VectorizedArray<Number, n_lanes>>, dim>
+        &derivative_matrix,
+      std::array<Table<2, VectorizedArray<Number, n_lanes>>, dim> &eigenvectors,
+      std::array<AlignedVector<VectorizedArray<Number, n_lanes>>, dim>
+        &eigenvalues)
     {
-      const unsigned int     n_rows_1d   = mass_matrix[0].n_cols();
-      constexpr unsigned int macro_size  = VectorizedArray<Number>::size();
+      const unsigned int     n_rows_1d = mass_matrix[0].n_cols();
+      constexpr unsigned int macro_size =
+        VectorizedArray<Number, n_lanes>::size();
       const std::size_t nm_flat_size_max = n_rows_1d * n_rows_1d * macro_size;
       const std::size_t n_flat_size_max  = n_rows_1d * macro_size;
 

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.