]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use std::bool_constant instead of std::integral_constant. 16190/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Thu, 26 Oct 2023 00:19:24 +0000 (18:19 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 26 Oct 2023 00:22:48 +0000 (18:22 -0600)
12 files changed:
include/deal.II/base/aligned_vector.h
include/deal.II/lac/affine_constraints.h
include/deal.II/lac/affine_constraints.templates.h
include/deal.II/lac/trilinos_block_sparse_matrix.h
include/deal.II/lac/vector_operations_internal.h
include/deal.II/matrix_free/evaluation_kernels.h
include/deal.II/matrix_free/fe_evaluation.h
include/deal.II/matrix_free/matrix_free.h
include/deal.II/matrix_free/type_traits.h
include/deal.II/matrix_free/vector_access_internal.h
source/lac/affine_constraints.cc
source/lac/affine_constraints.inst.in

index c6af1ed46e601f5dfb28ec9b11444c7d039758bf..deec926d0d8c2b762bf27579811f7ee73031ec25 100644 (file)
@@ -953,8 +953,9 @@ namespace internal
                     0,
                     (end - begin) * sizeof(T));
       else
-        copy_construct_or_assign(
-          begin, end, std::integral_constant<bool, initialize_memory>());
+        copy_construct_or_assign(begin,
+                                 end,
+                                 std::bool_constant<initialize_memory>());
     }
 
   private:
@@ -966,7 +967,7 @@ namespace internal
     void
     copy_construct_or_assign(const std::size_t begin,
                              const std::size_t end,
-                             std::integral_constant<bool, false>) const
+                             std::bool_constant<false>) const
     {
       for (std::size_t i = begin; i < end; ++i)
         destination_[i] = element_;
@@ -976,7 +977,7 @@ namespace internal
     void
     copy_construct_or_assign(const std::size_t begin,
                              const std::size_t end,
-                             std::integral_constant<bool, true>) const
+                             std::bool_constant<true>) const
     {
       for (std::size_t i = begin; i < end; ++i)
         new (&destination_[i]) T(element_);
@@ -1038,8 +1039,9 @@ namespace internal
                     0,
                     (end - begin) * sizeof(T));
       else
-        default_construct_or_assign(
-          begin, end, std::integral_constant<bool, initialize_memory>());
+        default_construct_or_assign(begin,
+                                    end,
+                                    std::bool_constant<initialize_memory>());
     }
 
   private:
@@ -1049,7 +1051,7 @@ namespace internal
     void
     default_construct_or_assign(const std::size_t begin,
                                 const std::size_t end,
-                                std::integral_constant<bool, false>) const
+                                std::bool_constant<false>) const
     {
       for (std::size_t i = begin; i < end; ++i)
         destination_[i] = std::move(T());
@@ -1059,7 +1061,7 @@ namespace internal
     void
     default_construct_or_assign(const std::size_t begin,
                                 const std::size_t end,
-                                std::integral_constant<bool, true>) const
+                                std::bool_constant<true>) const
     {
       for (std::size_t i = begin; i < end; ++i)
         new (&destination_[i]) T;
index bd0cc60391a3e8bc838e38fbd03ba9e602c18783..55715f1f19e62e6f17015ec6bb209a88e5ff1815 100644 (file)
@@ -2223,7 +2223,7 @@ private:
                              MatrixType                   &global_matrix,
                              VectorType                   &global_vector,
                              const bool use_inhomogeneities_for_rhs,
-                             const std::integral_constant<bool, false>) const;
+                             const std::bool_constant<false>) const;
 
   /**
    * This function actually implements the local_to_global function for block
@@ -2237,7 +2237,7 @@ private:
                              MatrixType                   &global_matrix,
                              VectorType                   &global_vector,
                              const bool use_inhomogeneities_for_rhs,
-                             const std::integral_constant<bool, true>) const;
+                             const std::bool_constant<true>) const;
 
   /**
    * Internal helper function for distribute_local_to_global function.
index 63da4a9e9b6ce556cbecb9d191d11a12ae294d51..fe265b85946310a8151ffd57688409403d59c7f2 100644 (file)
@@ -2440,7 +2440,7 @@ namespace internal
     void
     set_zero_in_parallel(const std::vector<size_type> &cm,
                          VectorType                   &vec,
-                         std::integral_constant<bool, false>)
+                         std::bool_constant<false>)
     {
       set_zero_parallel(cm, vec, 0);
     }
@@ -2450,7 +2450,7 @@ namespace internal
     void
     set_zero_in_parallel(const std::vector<size_type> &cm,
                          VectorType                   &vec,
-                         std::integral_constant<bool, true>)
+                         std::bool_constant<true>)
     {
       size_type start_shift = 0;
       for (size_type j = 0; j < vec.n_blocks(); ++j)
@@ -2473,9 +2473,7 @@ namespace internal
     set_zero_all(const std::vector<size_type> &cm, VectorType &vec)
     {
       set_zero_in_parallel<VectorType>(
-        cm,
-        vec,
-        std::integral_constant<bool, IsBlockVector<VectorType>::value>());
+        cm, vec, std::bool_constant<IsBlockVector<VectorType>::value>());
       vec.compress(VectorOperation::insert);
     }
 
@@ -2636,7 +2634,7 @@ namespace internal
     const IndexSet & /*locally_owned_elements*/,
     const IndexSet                &needed_elements,
     TrilinosWrappers::MPI::Vector &output,
-    const std::integral_constant<bool, false> /*is_block_vector*/)
+    const std::bool_constant<false> /*is_block_vector*/)
   {
     Assert(!vec.has_ghost_elements(), ExcGhostsPresent());
 #  ifdef DEAL_II_WITH_MPI
@@ -2659,7 +2657,7 @@ namespace internal
     const IndexSet                   &locally_owned_elements,
     const IndexSet                   &needed_elements,
     PETScWrappers::MPI::Vector       &output,
-    const std::integral_constant<bool, false> /*is_block_vector*/)
+    const std::bool_constant<false> /*is_block_vector*/)
   {
     output.reinit(locally_owned_elements,
                   needed_elements,
@@ -2677,7 +2675,7 @@ namespace internal
     const IndexSet                                   &locally_owned_elements,
     const IndexSet                                   &needed_elements,
     LinearAlgebra::distributed::Vector<number>       &output,
-    const std::integral_constant<bool, false> /*is_block_vector*/)
+    const std::bool_constant<false> /*is_block_vector*/)
   {
     // TODO: the in vector might already have all elements. need to find a
     // way to efficiently avoid the copy then
@@ -2701,7 +2699,7 @@ namespace internal
     const IndexSet & /*locally_owned_elements*/,
     const IndexSet & /*needed_elements*/,
     Vector & /*output*/,
-    const std::integral_constant<bool, false> /*is_block_vector*/)
+    const std::bool_constant<false> /*is_block_vector*/)
   {
     Assert(false, ExcMessage("We shouldn't even get here!"));
   }
@@ -2714,7 +2712,7 @@ namespace internal
     const IndexSet   &locally_owned_elements,
     const IndexSet   &needed_elements,
     VectorType       &output,
-    const std::integral_constant<bool, true> /*is_block_vector*/)
+    const std::bool_constant<true> /*is_block_vector*/)
   {
     output.reinit(vec.n_blocks());
 
@@ -2728,7 +2726,7 @@ namespace internal
           needed_elements.get_view(block_start,
                                    block_start + vec.block(b).size()),
           output.block(b),
-          std::integral_constant<bool, false>());
+          std::bool_constant<false>());
         block_start += vec.block(b).size();
       }
 
@@ -2882,8 +2880,7 @@ AffineConstraints<number>::distribute(VectorType &vec) const
                 vec_owned_elements,
                 needed_elements_for_distribute,
                 ghosted_vector,
-                std::integral_constant<bool,
-                                       IsBlockVector<VectorType>::value>());
+                std::bool_constant<IsBlockVector<VectorType>::value>());
             }
           else
             {
@@ -2900,8 +2897,7 @@ AffineConstraints<number>::distribute(VectorType &vec) const
                 vec_owned_elements,
                 complete_index_set(vec_owned_elements.size()),
                 ghosted_vector,
-                std::integral_constant<bool,
-                                       IsBlockVector<VectorType>::value>());
+                std::bool_constant<IsBlockVector<VectorType>::value>());
             }
 
           for (const ConstraintLine &line : lines)
@@ -4199,7 +4195,7 @@ AffineConstraints<number>::distribute_local_to_global(
   MatrixType                   &global_matrix,
   VectorType                   &global_vector,
   const bool                    use_inhomogeneities_for_rhs,
-  const std::integral_constant<bool, false>) const
+  const std::bool_constant<false>) const
 {
   // FIXME: static_assert MatrixType::value_type == number
 
@@ -4360,7 +4356,7 @@ AffineConstraints<number>::distribute_local_to_global(
   MatrixType                   &global_matrix,
   VectorType                   &global_vector,
   const bool                    use_inhomogeneities_for_rhs,
-  const std::integral_constant<bool, true>) const
+  const std::bool_constant<true>) const
 {
   const bool use_vectors =
     (local_vector.size() == 0 && global_vector.size() == 0) ? false : true;
index 6361218eda3b08b80614fd3dd6349dec1a1ce2aa..1ddbecb8bad049a96d9e2ea82d675fcf0acb2f49 100644 (file)
@@ -359,8 +359,8 @@ namespace TrilinosWrappers
     vmult(VectorType1       &dst,
           const VectorType2 &src,
           const bool         transpose,
-          const std::integral_constant<bool, true>,
-          const std::integral_constant<bool, true>) const;
+          const std::bool_constant<true>,
+          const std::bool_constant<true>) const;
 
     /**
      * Internal version of (T)vmult where the source vector is a block vector
@@ -371,8 +371,8 @@ namespace TrilinosWrappers
     vmult(VectorType1       &dst,
           const VectorType2 &src,
           const bool         transpose,
-          const std::integral_constant<bool, false>,
-          const std::integral_constant<bool, true>) const;
+          const std::bool_constant<false>,
+          const std::bool_constant<true>) const;
 
     /**
      * Internal version of (T)vmult where the source vector is a non-block
@@ -383,8 +383,8 @@ namespace TrilinosWrappers
     vmult(VectorType1       &dst,
           const VectorType2 &src,
           const bool         transpose,
-          const std::integral_constant<bool, true>,
-          const std::integral_constant<bool, false>) const;
+          const std::bool_constant<true>,
+          const std::bool_constant<false>) const;
 
     /**
      * Internal version of (T)vmult where both source vector and the
@@ -396,8 +396,8 @@ namespace TrilinosWrappers
     vmult(VectorType1       &dst,
           const VectorType2 &src,
           const bool         transpose,
-          const std::integral_constant<bool, false>,
-          const std::integral_constant<bool, false>) const;
+          const std::bool_constant<false>,
+          const std::bool_constant<false>) const;
   };
 
 
@@ -446,8 +446,8 @@ namespace TrilinosWrappers
     vmult(dst,
           src,
           false,
-          std::integral_constant<bool, IsBlockVector<VectorType1>::value>(),
-          std::integral_constant<bool, IsBlockVector<VectorType2>::value>());
+          std::bool_constant<IsBlockVector<VectorType1>::value>(),
+          std::bool_constant<IsBlockVector<VectorType2>::value>());
   }
 
 
@@ -459,8 +459,8 @@ namespace TrilinosWrappers
     vmult(dst,
           src,
           true,
-          std::integral_constant<bool, IsBlockVector<VectorType1>::value>(),
-          std::integral_constant<bool, IsBlockVector<VectorType2>::value>());
+          std::bool_constant<IsBlockVector<VectorType1>::value>(),
+          std::bool_constant<IsBlockVector<VectorType2>::value>());
   }
 
 
@@ -470,8 +470,8 @@ namespace TrilinosWrappers
   BlockSparseMatrix::vmult(VectorType1       &dst,
                            const VectorType2 &src,
                            const bool         transpose,
-                           std::integral_constant<bool, true>,
-                           std::integral_constant<bool, true>) const
+                           std::bool_constant<true>,
+                           std::bool_constant<true>) const
   {
     if (transpose == true)
       BaseClass::Tvmult_block_block(dst, src);
@@ -486,8 +486,8 @@ namespace TrilinosWrappers
   BlockSparseMatrix::vmult(VectorType1       &dst,
                            const VectorType2 &src,
                            const bool         transpose,
-                           std::integral_constant<bool, false>,
-                           std::integral_constant<bool, true>) const
+                           std::bool_constant<false>,
+                           std::bool_constant<true>) const
   {
     if (transpose == true)
       BaseClass::Tvmult_nonblock_block(dst, src);
@@ -502,8 +502,8 @@ namespace TrilinosWrappers
   BlockSparseMatrix::vmult(VectorType1       &dst,
                            const VectorType2 &src,
                            const bool         transpose,
-                           std::integral_constant<bool, true>,
-                           std::integral_constant<bool, false>) const
+                           std::bool_constant<true>,
+                           std::bool_constant<false>) const
   {
     if (transpose == true)
       BaseClass::Tvmult_block_nonblock(dst, src);
@@ -518,8 +518,8 @@ namespace TrilinosWrappers
   BlockSparseMatrix::vmult(VectorType1       &dst,
                            const VectorType2 &src,
                            const bool         transpose,
-                           std::integral_constant<bool, false>,
-                           std::integral_constant<bool, false>) const
+                           std::bool_constant<false>,
+                           std::bool_constant<false>) const
   {
     if (transpose == true)
       BaseClass::Tvmult_nonblock_nonblock(dst, src);
index f2abc5c647600cbdf04e1ffa4f6be6d435721335..23f2d5e08b9d3d51f31bc58c821adb1f9de416f9 100644 (file)
@@ -1021,12 +1021,12 @@ namespace internal
           // on the number types we are given. To choose the vectorized
           // version often enough, we need to have all tasks but the last one
           // to be divisible by the vectorization length
-          size_type n_chunks = do_accumulate(
-            op,
-            vec_size,
-            first,
-            outer_results,
-            std::integral_constant<bool, Operation::vectorizes>());
+          size_type n_chunks =
+            do_accumulate(op,
+                          vec_size,
+                          first,
+                          outer_results,
+                          std::bool_constant<Operation::vectorizes>());
 
           AssertIndexRange(n_chunks,
                            vector_accumulation_recursion_threshold + 1);
@@ -1114,7 +1114,7 @@ namespace internal
                   const size_type vec_size,
                   const size_type start_index,
                   ResultType     *outer_results,
-                  std::integral_constant<bool, false>)
+                  std::bool_constant<false>)
     {
       // Create local copy to indicate no aliasing to the compiler
       size_type index = start_index;
@@ -1196,7 +1196,7 @@ namespace internal
                   const size_type vec_size,
                   const size_type start_index,
                   Number         *outer_results,
-                  std::integral_constant<bool, true>)
+                  std::bool_constant<true>)
     {
       // Create local copy to indicate no aliasing to the compiler
       size_type index = start_index;
index afdf62854a2b16c3ca7881ea20a0fa09fd89d8d4..96ea99e85c35186b143b191d5b5fab41caee32f3 100644 (file)
@@ -2159,7 +2159,7 @@ namespace internal
       const Number                          *values_dofs,
       FEEvaluationData<dim, Number, false>  &fe_eval,
       const bool                             sum_into_values_array,
-      std::integral_constant<bool, false>)
+      std::bool_constant<false>)
     {
       (void)sum_into_values_array;
 
@@ -2174,7 +2174,7 @@ namespace internal
       Number                                *values_dofs,
       FEEvaluationData<dim, Number, false>  &fe_eval,
       const bool                             sum_into_values_array,
-      std::integral_constant<bool, true>)
+      std::bool_constant<true>)
     {
       T::integrate(n_components,
                    evaluation_flag,
@@ -2197,7 +2197,7 @@ namespace internal
                                values_dofs,
                                fe_eval,
                                sum_into_values_array,
-                               std::integral_constant<bool, do_integrate>());
+                               std::bool_constant<do_integrate>());
     }
   };
 
index 51cccf098a7525e07cc7f4184430b90f21c1b686..92a43ad4a856456519ea3eb9c982374255372ed9 100644 (file)
@@ -3374,8 +3374,7 @@ FEEvaluationBase<dim, n_components_, Number, is_face, VectorizedArrayType>::
             has_hn_constraints = true;
     }
 
-  std::integral_constant<bool,
-                         internal::is_vectorizable<VectorType, Number>::value>
+  std::bool_constant<internal::is_vectorizable<VectorType, Number>::value>
     vector_selector;
 
   const bool use_vectorized_path =
@@ -3768,8 +3767,7 @@ FEEvaluationBase<dim, n_components_, Number, is_face, VectorizedArrayType>::
   // a vector and puts the data into the local data field or write local data
   // into the vector. Certain operations are no-ops for the given use case.
 
-  std::integral_constant<bool,
-                         internal::is_vectorizable<VectorType, Number>::value>
+  std::bool_constant<internal::is_vectorizable<VectorType, Number>::value>
                                                                vector_selector;
   const internal::MatrixFreeFunctions::DoFInfo::DoFAccessIndex ind =
     is_face ? this->dof_access_index :
index 4a98536180dfa3607c09b9c4f5e2ffd605b5070d..e78ce79939caadba6963a1716e6667785bc89bcc 100644 (file)
@@ -3950,8 +3950,7 @@ namespace internal
 
   template <typename VectorStruct>
   unsigned int
-  n_components_block(const VectorStruct &vec,
-                     std::integral_constant<bool, true>)
+  n_components_block(const VectorStruct &vec, const std::bool_constant<true>)
   {
     unsigned int components = 0;
     for (unsigned int bl = 0; bl < vec.n_blocks(); ++bl)
@@ -3961,7 +3960,7 @@ namespace internal
 
   template <typename VectorStruct>
   unsigned int
-  n_components_block(const VectorStruct &, std::integral_constant<bool, false>)
+  n_components_block(const VectorStruct &, const std::bool_constant<false>)
   {
     return 1;
   }
@@ -3971,7 +3970,7 @@ namespace internal
   n_components(const VectorStruct &vec)
   {
     return n_components_block(
-      vec, std::integral_constant<bool, IsBlockVector<VectorStruct>::value>());
+      vec, std::bool_constant<IsBlockVector<VectorStruct>::value>());
   }
 
   template <typename VectorStruct>
@@ -3981,8 +3980,7 @@ namespace internal
     unsigned int components = 0;
     for (unsigned int comp = 0; comp < vec.size(); ++comp)
       components += n_components_block(
-        vec[comp],
-        std::integral_constant<bool, IsBlockVector<VectorStruct>::value>());
+        vec[comp], std::bool_constant<IsBlockVector<VectorStruct>::value>());
     return components;
   }
 
@@ -3993,8 +3991,7 @@ namespace internal
     unsigned int components = 0;
     for (unsigned int comp = 0; comp < vec.size(); ++comp)
       components += n_components_block(
-        *vec[comp],
-        std::integral_constant<bool, IsBlockVector<VectorStruct>::value>());
+        *vec[comp], std::bool_constant<IsBlockVector<VectorStruct>::value>());
     return components;
   }
 
index 174869ba83b47a5d25c4563b7337b5c436346a9a..7129bb040a8986da3907b6b7198cfd608e60aad1 100644 (file)
@@ -186,8 +186,7 @@ namespace internal
   // a dummy InVector == unsigned int is provided.
   // Thus we have to treat this case as well.
   template <class T, class IsSerialVectorNotSpecialized = void>
-  using not_parallel_vector_t =
-    std::integral_constant<bool, is_serial_vector<T>::value>;
+  using not_parallel_vector_t = std::bool_constant<is_serial_vector<T>::value>;
 
   /**
    * A predicate stating whether something is a vector type. We test this
index 1504b5b3d8f89fc003a4a85d1d167156898603b2..27fbd6403ce6dc31110f9c1cbc677a98286de510 100644 (file)
@@ -307,16 +307,13 @@ namespace internal
                             const unsigned int   dof_index,
                             VectorType          &vec,
                             VectorizedArrayType *dof_values,
-                            std::integral_constant<bool, true>) const
+                            std::bool_constant<true>) const
     {
 #ifdef DEBUG
       // in debug mode, run non-vectorized version because this path
       // has additional checks (e.g., regarding ghosting)
-      process_dofs_vectorized(dofs_per_cell,
-                              dof_index,
-                              vec,
-                              dof_values,
-                              std::integral_constant<bool, false>());
+      process_dofs_vectorized(
+        dofs_per_cell, dof_index, vec, dof_values, std::bool_constant<false>());
 #else
       const Number *vec_ptr = vec.begin() + dof_index;
       for (unsigned int i = 0; i < dofs_per_cell;
@@ -333,7 +330,7 @@ namespace internal
                             const unsigned int   dof_index,
                             const VectorType    &vec,
                             VectorizedArrayType *dof_values,
-                            std::integral_constant<bool, false>) const
+                            std::bool_constant<false>) const
     {
       for (unsigned int i = 0; i < dofs_per_cell; ++i)
         for (unsigned int v = 0; v < VectorizedArrayType::size(); ++v)
@@ -350,7 +347,7 @@ namespace internal
                                       VectorType          &vec,
                                       const unsigned int   constant_offset,
                                       VectorizedArrayType *dof_values,
-                                      std::integral_constant<bool, true>) const
+                                      std::bool_constant<true>) const
     {
       dealii::vectorized_load_and_transpose(dofs_per_cell,
                                             vec.begin() + constant_offset,
@@ -367,7 +364,7 @@ namespace internal
                                       const VectorType    &vec,
                                       const unsigned int   constant_offset,
                                       VectorizedArrayType *dof_values,
-                                      std::integral_constant<bool, false>) const
+                                      std::bool_constant<false>) const
     {
       for (unsigned int d = 0; d < dofs_per_cell; ++d)
         for (unsigned int v = 0; v < VectorizedArrayType::size(); ++v)
@@ -379,12 +376,11 @@ namespace internal
 
     template <typename VectorType>
     void
-    process_dofs_vectorized_transpose(
-      const unsigned int                 dofs_per_cell,
-      const unsigned int                *dof_indices,
-      VectorType                        &vec,
-      VectorizedArrayType               *dof_values,
-      std::integral_constant<bool, true> type) const
+    process_dofs_vectorized_transpose(const unsigned int       dofs_per_cell,
+                                      const unsigned int      *dof_indices,
+                                      VectorType              &vec,
+                                      VectorizedArrayType     *dof_values,
+                                      std::bool_constant<true> type) const
     {
       process_dofs_vectorized_transpose(
         dofs_per_cell, dof_indices, vec, 0, dof_values, type);
@@ -394,12 +390,11 @@ namespace internal
 
     template <typename VectorType>
     void
-    process_dofs_vectorized_transpose(
-      const unsigned int                  dofs_per_cell,
-      const unsigned int                 *dof_indices,
-      const VectorType                   &vec,
-      VectorizedArrayType                *dof_values,
-      std::integral_constant<bool, false> type) const
+    process_dofs_vectorized_transpose(const unsigned int        dofs_per_cell,
+                                      const unsigned int       *dof_indices,
+                                      const VectorType         &vec,
+                                      VectorizedArrayType      *dof_values,
+                                      std::bool_constant<false> type) const
     {
       process_dofs_vectorized_transpose(
         dofs_per_cell, dof_indices, vec, 0, dof_values, type);
@@ -413,7 +408,7 @@ namespace internal
       const unsigned int                                        dofs_per_cell,
       const std::array<Number2 *, VectorizedArrayType::size()> &global_ptr,
       VectorizedArrayType                                      *dof_values,
-      std::integral_constant<bool, true>) const
+      std::bool_constant<true>) const
     {
       dealii::vectorized_load_and_transpose(dofs_per_cell,
                                             global_ptr,
@@ -428,7 +423,7 @@ namespace internal
       const unsigned int,
       const std::array<Number2 *, VectorizedArrayType::size()> &,
       VectorizedArrayType *,
-      std::integral_constant<bool, false>) const
+      std::bool_constant<false>) const
     {
       Assert(false, ExcNotImplemented());
     }
@@ -444,7 +439,7 @@ namespace internal
                        const unsigned int               constant_offset,
                        typename VectorType::value_type *vec_ptr,
                        VectorizedArrayType             &res,
-                       std::integral_constant<bool, true>) const
+                       std::bool_constant<true>) const
     {
       (void)constant_offset;
       (void)vec;
@@ -458,7 +453,7 @@ namespace internal
                          constant_offset,
                          vec_ptr,
                          res,
-                         std::integral_constant<bool, false>());
+                         std::bool_constant<false>());
 #else
       res.gather(vec_ptr, indices);
 #endif
@@ -475,7 +470,7 @@ namespace internal
                        const unsigned int  constant_offset,
                        typename VectorType::value_type *,
                        VectorizedArrayType &res,
-                       std::integral_constant<bool, false>) const
+                       std::bool_constant<false>) const
     {
       for (unsigned int v = 0; v < VectorizedArrayType::size(); ++v)
         res[v] = vector_access(vec, indices[v] + constant_offset);
@@ -559,7 +554,7 @@ namespace internal
                             const unsigned int   dof_index,
                             VectorType          &vec,
                             VectorizedArrayType *dof_values,
-                            std::integral_constant<bool, true>) const
+                            std::bool_constant<true>) const
     {
       Number *vec_ptr = vec.begin() + dof_index;
       for (unsigned int i = 0; i < dofs_per_cell;
@@ -580,7 +575,7 @@ namespace internal
                             const unsigned int   dof_index,
                             VectorType          &vec,
                             VectorizedArrayType *dof_values,
-                            std::integral_constant<bool, false>) const
+                            std::bool_constant<false>) const
     {
       for (unsigned int i = 0; i < dofs_per_cell; ++i)
         for (unsigned int v = 0; v < VectorizedArrayType::size(); ++v)
@@ -598,7 +593,7 @@ namespace internal
                                       VectorType          &vec,
                                       const unsigned int   constant_offset,
                                       VectorizedArrayType *dof_values,
-                                      std::integral_constant<bool, true>) const
+                                      std::bool_constant<true>) const
     {
       vectorized_transpose_and_store(true,
                                      dofs_per_cell,
@@ -616,7 +611,7 @@ namespace internal
                                       VectorType          &vec,
                                       const unsigned int   constant_offset,
                                       VectorizedArrayType *dof_values,
-                                      std::integral_constant<bool, false>) const
+                                      std::bool_constant<false>) const
     {
       for (unsigned int d = 0; d < dofs_per_cell; ++d)
         for (unsigned int v = 0; v < VectorizedArrayType::size(); ++v)
@@ -629,12 +624,11 @@ namespace internal
 
     template <typename VectorType>
     void
-    process_dofs_vectorized_transpose(
-      const unsigned int                 dofs_per_cell,
-      const unsigned int                *dof_indices,
-      VectorType                        &vec,
-      VectorizedArrayType               *dof_values,
-      std::integral_constant<bool, true> type) const
+    process_dofs_vectorized_transpose(const unsigned int       dofs_per_cell,
+                                      const unsigned int      *dof_indices,
+                                      VectorType              &vec,
+                                      VectorizedArrayType     *dof_values,
+                                      std::bool_constant<true> type) const
     {
       process_dofs_vectorized_transpose(
         dofs_per_cell, dof_indices, vec, 0, dof_values, type);
@@ -644,12 +638,11 @@ namespace internal
 
     template <typename VectorType>
     void
-    process_dofs_vectorized_transpose(
-      const unsigned int                  dofs_per_cell,
-      const unsigned int                 *dof_indices,
-      VectorType                         &vec,
-      VectorizedArrayType                *dof_values,
-      std::integral_constant<bool, false> type) const
+    process_dofs_vectorized_transpose(const unsigned int        dofs_per_cell,
+                                      const unsigned int       *dof_indices,
+                                      VectorType               &vec,
+                                      VectorizedArrayType      *dof_values,
+                                      std::bool_constant<false> type) const
     {
       process_dofs_vectorized_transpose(
         dofs_per_cell, dof_indices, vec, 0, dof_values, type);
@@ -663,7 +656,7 @@ namespace internal
       const unsigned int                                  dofs_per_cell,
       std::array<Number2 *, VectorizedArrayType::size()> &global_ptr,
       VectorizedArrayType                                *dof_values,
-      std::integral_constant<bool, true>) const
+      std::bool_constant<true>) const
     {
       vectorized_transpose_and_store(true,
                                      dofs_per_cell,
@@ -679,7 +672,7 @@ namespace internal
       const unsigned int,
       std::array<Number2 *, VectorizedArrayType::size()> &,
       VectorizedArrayType *,
-      std::integral_constant<bool, false>) const
+      std::bool_constant<false>) const
     {
       Assert(false, ExcNotImplemented());
     }
@@ -695,7 +688,7 @@ namespace internal
                        const unsigned int               constant_offset,
                        typename VectorType::value_type *vec_ptr,
                        VectorizedArrayType             &res,
-                       std::integral_constant<bool, true>) const
+                       std::bool_constant<true>) const
     {
       (void)constant_offset;
       (void)vec_ptr;
@@ -724,7 +717,7 @@ namespace internal
                        const unsigned int  constant_offset,
                        typename VectorType::value_type *,
                        VectorizedArrayType &res,
-                       std::integral_constant<bool, false>) const
+                       std::bool_constant<false>) const
     {
       for (unsigned int v = 0; v < VectorizedArrayType::size(); ++v)
         vector_access_add(vec, indices[v] + constant_offset, res[v]);
@@ -804,7 +797,7 @@ namespace internal
                             const unsigned int   dof_index,
                             VectorType          &vec,
                             VectorizedArrayType *dof_values,
-                            std::integral_constant<bool, true>) const
+                            std::bool_constant<true>) const
     {
       Number *vec_ptr = vec.begin() + dof_index;
       for (unsigned int i = 0; i < dofs_per_cell;
@@ -820,7 +813,7 @@ namespace internal
                             const unsigned int   dof_index,
                             VectorType          &vec,
                             VectorizedArrayType *dof_values,
-                            std::integral_constant<bool, false>) const
+                            std::bool_constant<false>) const
     {
       for (unsigned int i = 0; i < dofs_per_cell; ++i)
         for (unsigned int v = 0; v < VectorizedArrayType::size(); ++v)
@@ -837,7 +830,7 @@ namespace internal
                                       VectorType          &vec,
                                       const unsigned int   constant_offset,
                                       VectorizedArrayType *dof_values,
-                                      std::integral_constant<bool, true>) const
+                                      std::bool_constant<true>) const
     {
       vectorized_transpose_and_store(false,
                                      dofs_per_cell,
@@ -855,7 +848,7 @@ namespace internal
                                       VectorType          &vec,
                                       const unsigned int   constant_offset,
                                       VectorizedArrayType *dof_values,
-                                      std::integral_constant<bool, false>) const
+                                      std::bool_constant<false>) const
     {
       for (unsigned int i = 0; i < dofs_per_cell; ++i)
         for (unsigned int v = 0; v < VectorizedArrayType::size(); ++v)
@@ -867,12 +860,11 @@ namespace internal
 
     template <typename VectorType>
     void
-    process_dofs_vectorized_transpose(
-      const unsigned int                 dofs_per_cell,
-      const unsigned int                *dof_indices,
-      VectorType                        &vec,
-      VectorizedArrayType               *dof_values,
-      std::integral_constant<bool, true> type) const
+    process_dofs_vectorized_transpose(const unsigned int       dofs_per_cell,
+                                      const unsigned int      *dof_indices,
+                                      VectorType              &vec,
+                                      VectorizedArrayType     *dof_values,
+                                      std::bool_constant<true> type) const
     {
       process_dofs_vectorized_transpose(
         dofs_per_cell, dof_indices, vec, 0, dof_values, type);
@@ -882,12 +874,11 @@ namespace internal
 
     template <typename VectorType, bool booltype>
     void
-    process_dofs_vectorized_transpose(
-      const unsigned int                  dofs_per_cell,
-      const unsigned int                 *dof_indices,
-      VectorType                         &vec,
-      VectorizedArrayType                *dof_values,
-      std::integral_constant<bool, false> type) const
+    process_dofs_vectorized_transpose(const unsigned int        dofs_per_cell,
+                                      const unsigned int       *dof_indices,
+                                      VectorType               &vec,
+                                      VectorizedArrayType      *dof_values,
+                                      std::bool_constant<false> type) const
     {
       process_dofs_vectorized_transpose(
         dofs_per_cell, dof_indices, vec, 0, dof_values, type);
@@ -901,7 +892,7 @@ namespace internal
       const unsigned int                                  dofs_per_cell,
       std::array<Number2 *, VectorizedArrayType::size()> &global_ptr,
       VectorizedArrayType                                *dof_values,
-      std::integral_constant<bool, true>) const
+      std::bool_constant<true>) const
     {
       vectorized_transpose_and_store(false,
                                      dofs_per_cell,
@@ -917,7 +908,7 @@ namespace internal
       const unsigned int,
       std::array<Number2 *, VectorizedArrayType::size()> &,
       VectorizedArrayType *,
-      std::integral_constant<bool, false>) const
+      std::bool_constant<false>) const
     {
       Assert(false, ExcNotImplemented());
     }
@@ -931,7 +922,7 @@ namespace internal
                        const unsigned int               constant_offset,
                        typename VectorType::value_type *vec_ptr,
                        VectorizedArrayType             &res,
-                       std::integral_constant<bool, true>) const
+                       std::bool_constant<true>) const
     {
       (void)vec_ptr;
       (void)constant_offset;
@@ -949,7 +940,7 @@ namespace internal
                        const unsigned int  constant_offset,
                        typename VectorType::value_type *,
                        VectorizedArrayType &res,
-                       std::integral_constant<bool, false>) const
+                       std::bool_constant<false>) const
     {
       for (unsigned int v = 0; v < VectorizedArrayType::size(); ++v)
         vector_access(vec, indices[v] + constant_offset) = res[v];
index f523f5b32b901fb2dd91e3b357617924c8082755..19b94ec3f7d4c15d9a5ab198447b619bca556390 100644 (file)
@@ -61,7 +61,7 @@ DEAL_II_NAMESPACE_OPEN
       MatrixType &,                                           \
       VectorType &,                                           \
       bool,                                                   \
-      std::integral_constant<bool, false>) const
+      std::bool_constant<false>) const
 
 #define INSTANTIATE_DLTG_BLOCK_VECTORMATRIX(MatrixType, VectorType) \
   template void AffineConstraints<MatrixType::value_type>::         \
@@ -72,7 +72,7 @@ DEAL_II_NAMESPACE_OPEN
       MatrixType &,                                                 \
       VectorType &,                                                 \
       bool,                                                         \
-      std::integral_constant<bool, true>) const
+      std::bool_constant<true>) const
 
 #define INSTANTIATE_DLTG_MATRIX(MatrixType)                              \
   template void                                                          \
index 855f4af5debd219e9c660d1af2fa98be7790da47..3dad71cdd1d6bd44393f5eba844f260d32f8c41a 100644 (file)
@@ -108,7 +108,7 @@ for (S : REAL_AND_COMPLEX_SCALARS; M : AFFINE_CONSTRAINTS_MATRIX_TEMPL)
       M<S> &,
       Vector<S> &,
       bool,
-      std::integral_constant<bool, false>) const;
+      std::bool_constant<false>) const;
 
     template void AffineConstraints<S>::distribute_local_to_global<M<S>>(
       const FullMatrix<S> &,
@@ -154,7 +154,7 @@ for (S : REAL_AND_COMPLEX_SCALARS; T : DEAL_II_VEC_TEMPLATES)
             DiagonalMatrix<T<S>> &,
             T<S> &,
             bool,
-            std::integral_constant<bool, false>) const;
+            std::bool_constant<false>) const;
 
     template void AffineConstraints<S>::distribute_local_to_global<
       DiagonalMatrix<LinearAlgebra::distributed::T<S>>,
@@ -165,7 +165,7 @@ for (S : REAL_AND_COMPLEX_SCALARS; T : DEAL_II_VEC_TEMPLATES)
       DiagonalMatrix<LinearAlgebra::distributed::T<S>> &,
       LinearAlgebra::distributed::T<S> &,
       bool,
-      std::integral_constant<bool, false>) const;
+      std::bool_constant<false>) const;
 
     template void AffineConstraints<S>::distribute_local_to_global<
       DiagonalMatrix<LinearAlgebra::distributed::T<S>>,
@@ -175,7 +175,7 @@ for (S : REAL_AND_COMPLEX_SCALARS; T : DEAL_II_VEC_TEMPLATES)
             DiagonalMatrix<LinearAlgebra::distributed::T<S>> &,
             T<S> &,
             bool,
-            std::integral_constant<bool, false>) const;
+            std::bool_constant<false>) const;
   }
 
 // BlockSparseMatrix:
@@ -190,7 +190,7 @@ for (S : REAL_AND_COMPLEX_SCALARS)
                  BlockSparseMatrix<S> &,
                  Vector<S> &,
                  bool,
-                 std::integral_constant<bool, true>) const;
+                 std::bool_constant<true>) const;
 
     template void AffineConstraints<S>::distribute_local_to_global<
       BlockSparseMatrix<S>,
@@ -200,7 +200,7 @@ for (S : REAL_AND_COMPLEX_SCALARS)
                       BlockSparseMatrix<S> &,
                       BlockVector<S> &,
                       bool,
-                      std::integral_constant<bool, true>) const;
+                      std::bool_constant<true>) const;
 
     template void
     AffineConstraints<S>::distribute_local_to_global<BlockSparseMatrix<S>>(

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.