From: Wolfgang Bangerth Date: Thu, 26 Oct 2023 00:19:24 +0000 (-0600) Subject: Use std::bool_constant instead of std::integral_constant. X-Git-Tag: relicensing~360^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b576e78e0d69091e4e6f3e369425481ecd8bc14;p=dealii.git Use std::bool_constant instead of std::integral_constant. --- diff --git a/include/deal.II/base/aligned_vector.h b/include/deal.II/base/aligned_vector.h index c6af1ed46e..deec926d0d 100644 --- a/include/deal.II/base/aligned_vector.h +++ b/include/deal.II/base/aligned_vector.h @@ -953,8 +953,9 @@ namespace internal 0, (end - begin) * sizeof(T)); else - copy_construct_or_assign( - begin, end, std::integral_constant()); + copy_construct_or_assign(begin, + end, + std::bool_constant()); } 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) const + std::bool_constant) 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) const + std::bool_constant) 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()); + default_construct_or_assign(begin, + end, + std::bool_constant()); } 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) const + std::bool_constant) 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) const + std::bool_constant) const { for (std::size_t i = begin; i < end; ++i) new (&destination_[i]) T; diff --git a/include/deal.II/lac/affine_constraints.h b/include/deal.II/lac/affine_constraints.h index bd0cc60391..55715f1f19 100644 --- a/include/deal.II/lac/affine_constraints.h +++ b/include/deal.II/lac/affine_constraints.h @@ -2223,7 +2223,7 @@ private: MatrixType &global_matrix, VectorType &global_vector, const bool use_inhomogeneities_for_rhs, - const std::integral_constant) const; + const std::bool_constant) 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) const; + const std::bool_constant) const; /** * Internal helper function for distribute_local_to_global function. diff --git a/include/deal.II/lac/affine_constraints.templates.h b/include/deal.II/lac/affine_constraints.templates.h index 63da4a9e9b..fe265b8594 100644 --- a/include/deal.II/lac/affine_constraints.templates.h +++ b/include/deal.II/lac/affine_constraints.templates.h @@ -2440,7 +2440,7 @@ namespace internal void set_zero_in_parallel(const std::vector &cm, VectorType &vec, - std::integral_constant) + std::bool_constant) { set_zero_parallel(cm, vec, 0); } @@ -2450,7 +2450,7 @@ namespace internal void set_zero_in_parallel(const std::vector &cm, VectorType &vec, - std::integral_constant) + std::bool_constant) { 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 &cm, VectorType &vec) { set_zero_in_parallel( - cm, - vec, - std::integral_constant::value>()); + cm, vec, std::bool_constant::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 /*is_block_vector*/) + const std::bool_constant /*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 /*is_block_vector*/) + const std::bool_constant /*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 &output, - const std::integral_constant /*is_block_vector*/) + const std::bool_constant /*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 /*is_block_vector*/) + const std::bool_constant /*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 /*is_block_vector*/) + const std::bool_constant /*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()); + std::bool_constant()); block_start += vec.block(b).size(); } @@ -2882,8 +2880,7 @@ AffineConstraints::distribute(VectorType &vec) const vec_owned_elements, needed_elements_for_distribute, ghosted_vector, - std::integral_constant::value>()); + std::bool_constant::value>()); } else { @@ -2900,8 +2897,7 @@ AffineConstraints::distribute(VectorType &vec) const vec_owned_elements, complete_index_set(vec_owned_elements.size()), ghosted_vector, - std::integral_constant::value>()); + std::bool_constant::value>()); } for (const ConstraintLine &line : lines) @@ -4199,7 +4195,7 @@ AffineConstraints::distribute_local_to_global( MatrixType &global_matrix, VectorType &global_vector, const bool use_inhomogeneities_for_rhs, - const std::integral_constant) const + const std::bool_constant) const { // FIXME: static_assert MatrixType::value_type == number @@ -4360,7 +4356,7 @@ AffineConstraints::distribute_local_to_global( MatrixType &global_matrix, VectorType &global_vector, const bool use_inhomogeneities_for_rhs, - const std::integral_constant) const + const std::bool_constant) const { const bool use_vectors = (local_vector.size() == 0 && global_vector.size() == 0) ? false : true; diff --git a/include/deal.II/lac/trilinos_block_sparse_matrix.h b/include/deal.II/lac/trilinos_block_sparse_matrix.h index 6361218eda..1ddbecb8ba 100644 --- a/include/deal.II/lac/trilinos_block_sparse_matrix.h +++ b/include/deal.II/lac/trilinos_block_sparse_matrix.h @@ -359,8 +359,8 @@ namespace TrilinosWrappers vmult(VectorType1 &dst, const VectorType2 &src, const bool transpose, - const std::integral_constant, - const std::integral_constant) const; + const std::bool_constant, + const std::bool_constant) 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, - const std::integral_constant) const; + const std::bool_constant, + const std::bool_constant) 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, - const std::integral_constant) const; + const std::bool_constant, + const std::bool_constant) 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, - const std::integral_constant) const; + const std::bool_constant, + const std::bool_constant) const; }; @@ -446,8 +446,8 @@ namespace TrilinosWrappers vmult(dst, src, false, - std::integral_constant::value>(), - std::integral_constant::value>()); + std::bool_constant::value>(), + std::bool_constant::value>()); } @@ -459,8 +459,8 @@ namespace TrilinosWrappers vmult(dst, src, true, - std::integral_constant::value>(), - std::integral_constant::value>()); + std::bool_constant::value>(), + std::bool_constant::value>()); } @@ -470,8 +470,8 @@ namespace TrilinosWrappers BlockSparseMatrix::vmult(VectorType1 &dst, const VectorType2 &src, const bool transpose, - std::integral_constant, - std::integral_constant) const + std::bool_constant, + std::bool_constant) 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, - std::integral_constant) const + std::bool_constant, + std::bool_constant) 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, - std::integral_constant) const + std::bool_constant, + std::bool_constant) 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, - std::integral_constant) const + std::bool_constant, + std::bool_constant) const { if (transpose == true) BaseClass::Tvmult_nonblock_nonblock(dst, src); diff --git a/include/deal.II/lac/vector_operations_internal.h b/include/deal.II/lac/vector_operations_internal.h index f2abc5c647..23f2d5e08b 100644 --- a/include/deal.II/lac/vector_operations_internal.h +++ b/include/deal.II/lac/vector_operations_internal.h @@ -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()); + size_type n_chunks = + do_accumulate(op, + vec_size, + first, + outer_results, + std::bool_constant()); 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) + std::bool_constant) { // 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) + std::bool_constant) { // Create local copy to indicate no aliasing to the compiler size_type index = start_index; diff --git a/include/deal.II/matrix_free/evaluation_kernels.h b/include/deal.II/matrix_free/evaluation_kernels.h index afdf62854a..96ea99e85c 100644 --- a/include/deal.II/matrix_free/evaluation_kernels.h +++ b/include/deal.II/matrix_free/evaluation_kernels.h @@ -2159,7 +2159,7 @@ namespace internal const Number *values_dofs, FEEvaluationData &fe_eval, const bool sum_into_values_array, - std::integral_constant) + std::bool_constant) { (void)sum_into_values_array; @@ -2174,7 +2174,7 @@ namespace internal Number *values_dofs, FEEvaluationData &fe_eval, const bool sum_into_values_array, - std::integral_constant) + std::bool_constant) { T::integrate(n_components, evaluation_flag, @@ -2197,7 +2197,7 @@ namespace internal values_dofs, fe_eval, sum_into_values_array, - std::integral_constant()); + std::bool_constant()); } }; diff --git a/include/deal.II/matrix_free/fe_evaluation.h b/include/deal.II/matrix_free/fe_evaluation.h index 51cccf098a..92a43ad4a8 100644 --- a/include/deal.II/matrix_free/fe_evaluation.h +++ b/include/deal.II/matrix_free/fe_evaluation.h @@ -3374,8 +3374,7 @@ FEEvaluationBase:: has_hn_constraints = true; } - std::integral_constant::value> + std::bool_constant::value> vector_selector; const bool use_vectorized_path = @@ -3768,8 +3767,7 @@ FEEvaluationBase:: // 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::value> + std::bool_constant::value> vector_selector; const internal::MatrixFreeFunctions::DoFInfo::DoFAccessIndex ind = is_face ? this->dof_access_index : diff --git a/include/deal.II/matrix_free/matrix_free.h b/include/deal.II/matrix_free/matrix_free.h index 4a98536180..e78ce79939 100644 --- a/include/deal.II/matrix_free/matrix_free.h +++ b/include/deal.II/matrix_free/matrix_free.h @@ -3950,8 +3950,7 @@ namespace internal template unsigned int - n_components_block(const VectorStruct &vec, - std::integral_constant) + n_components_block(const VectorStruct &vec, const std::bool_constant) { unsigned int components = 0; for (unsigned int bl = 0; bl < vec.n_blocks(); ++bl) @@ -3961,7 +3960,7 @@ namespace internal template unsigned int - n_components_block(const VectorStruct &, std::integral_constant) + n_components_block(const VectorStruct &, const std::bool_constant) { return 1; } @@ -3971,7 +3970,7 @@ namespace internal n_components(const VectorStruct &vec) { return n_components_block( - vec, std::integral_constant::value>()); + vec, std::bool_constant::value>()); } template @@ -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::value>()); + vec[comp], std::bool_constant::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::value>()); + *vec[comp], std::bool_constant::value>()); return components; } diff --git a/include/deal.II/matrix_free/type_traits.h b/include/deal.II/matrix_free/type_traits.h index 174869ba83..7129bb040a 100644 --- a/include/deal.II/matrix_free/type_traits.h +++ b/include/deal.II/matrix_free/type_traits.h @@ -186,8 +186,7 @@ namespace internal // a dummy InVector == unsigned int is provided. // Thus we have to treat this case as well. template - using not_parallel_vector_t = - std::integral_constant::value>; + using not_parallel_vector_t = std::bool_constant::value>; /** * A predicate stating whether something is a vector type. We test this diff --git a/include/deal.II/matrix_free/vector_access_internal.h b/include/deal.II/matrix_free/vector_access_internal.h index 1504b5b3d8..27fbd6403c 100644 --- a/include/deal.II/matrix_free/vector_access_internal.h +++ b/include/deal.II/matrix_free/vector_access_internal.h @@ -307,16 +307,13 @@ namespace internal const unsigned int dof_index, VectorType &vec, VectorizedArrayType *dof_values, - std::integral_constant) const + std::bool_constant) 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()); + process_dofs_vectorized( + dofs_per_cell, dof_index, vec, dof_values, std::bool_constant()); #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) const + std::bool_constant) 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) const + std::bool_constant) 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) const + std::bool_constant) 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 void - process_dofs_vectorized_transpose( - const unsigned int dofs_per_cell, - const unsigned int *dof_indices, - VectorType &vec, - VectorizedArrayType *dof_values, - std::integral_constant 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 type) const { process_dofs_vectorized_transpose( dofs_per_cell, dof_indices, vec, 0, dof_values, type); @@ -394,12 +390,11 @@ namespace internal template 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 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 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 &global_ptr, VectorizedArrayType *dof_values, - std::integral_constant) const + std::bool_constant) const { dealii::vectorized_load_and_transpose(dofs_per_cell, global_ptr, @@ -428,7 +423,7 @@ namespace internal const unsigned int, const std::array &, VectorizedArrayType *, - std::integral_constant) const + std::bool_constant) 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) const + std::bool_constant) const { (void)constant_offset; (void)vec; @@ -458,7 +453,7 @@ namespace internal constant_offset, vec_ptr, res, - std::integral_constant()); + std::bool_constant()); #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) const + std::bool_constant) 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) const + std::bool_constant) 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) const + std::bool_constant) 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) const + std::bool_constant) 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) const + std::bool_constant) 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 void - process_dofs_vectorized_transpose( - const unsigned int dofs_per_cell, - const unsigned int *dof_indices, - VectorType &vec, - VectorizedArrayType *dof_values, - std::integral_constant 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 type) const { process_dofs_vectorized_transpose( dofs_per_cell, dof_indices, vec, 0, dof_values, type); @@ -644,12 +638,11 @@ namespace internal template void - process_dofs_vectorized_transpose( - const unsigned int dofs_per_cell, - const unsigned int *dof_indices, - VectorType &vec, - VectorizedArrayType *dof_values, - std::integral_constant 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 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 &global_ptr, VectorizedArrayType *dof_values, - std::integral_constant) const + std::bool_constant) const { vectorized_transpose_and_store(true, dofs_per_cell, @@ -679,7 +672,7 @@ namespace internal const unsigned int, std::array &, VectorizedArrayType *, - std::integral_constant) const + std::bool_constant) 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) const + std::bool_constant) 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) const + std::bool_constant) 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) const + std::bool_constant) 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) const + std::bool_constant) 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) const + std::bool_constant) 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) const + std::bool_constant) 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 void - process_dofs_vectorized_transpose( - const unsigned int dofs_per_cell, - const unsigned int *dof_indices, - VectorType &vec, - VectorizedArrayType *dof_values, - std::integral_constant 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 type) const { process_dofs_vectorized_transpose( dofs_per_cell, dof_indices, vec, 0, dof_values, type); @@ -882,12 +874,11 @@ namespace internal template void - process_dofs_vectorized_transpose( - const unsigned int dofs_per_cell, - const unsigned int *dof_indices, - VectorType &vec, - VectorizedArrayType *dof_values, - std::integral_constant 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 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 &global_ptr, VectorizedArrayType *dof_values, - std::integral_constant) const + std::bool_constant) const { vectorized_transpose_and_store(false, dofs_per_cell, @@ -917,7 +908,7 @@ namespace internal const unsigned int, std::array &, VectorizedArrayType *, - std::integral_constant) const + std::bool_constant) 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) const + std::bool_constant) 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) const + std::bool_constant) const { for (unsigned int v = 0; v < VectorizedArrayType::size(); ++v) vector_access(vec, indices[v] + constant_offset) = res[v]; diff --git a/source/lac/affine_constraints.cc b/source/lac/affine_constraints.cc index f523f5b32b..19b94ec3f7 100644 --- a/source/lac/affine_constraints.cc +++ b/source/lac/affine_constraints.cc @@ -61,7 +61,7 @@ DEAL_II_NAMESPACE_OPEN MatrixType &, \ VectorType &, \ bool, \ - std::integral_constant) const + std::bool_constant) const #define INSTANTIATE_DLTG_BLOCK_VECTORMATRIX(MatrixType, VectorType) \ template void AffineConstraints:: \ @@ -72,7 +72,7 @@ DEAL_II_NAMESPACE_OPEN MatrixType &, \ VectorType &, \ bool, \ - std::integral_constant) const + std::bool_constant) const #define INSTANTIATE_DLTG_MATRIX(MatrixType) \ template void \ diff --git a/source/lac/affine_constraints.inst.in b/source/lac/affine_constraints.inst.in index 855f4af5de..3dad71cdd1 100644 --- a/source/lac/affine_constraints.inst.in +++ b/source/lac/affine_constraints.inst.in @@ -108,7 +108,7 @@ for (S : REAL_AND_COMPLEX_SCALARS; M : AFFINE_CONSTRAINTS_MATRIX_TEMPL) M &, Vector &, bool, - std::integral_constant) const; + std::bool_constant) const; template void AffineConstraints::distribute_local_to_global>( const FullMatrix &, @@ -154,7 +154,7 @@ for (S : REAL_AND_COMPLEX_SCALARS; T : DEAL_II_VEC_TEMPLATES) DiagonalMatrix> &, T &, bool, - std::integral_constant) const; + std::bool_constant) const; template void AffineConstraints::distribute_local_to_global< DiagonalMatrix>, @@ -165,7 +165,7 @@ for (S : REAL_AND_COMPLEX_SCALARS; T : DEAL_II_VEC_TEMPLATES) DiagonalMatrix> &, LinearAlgebra::distributed::T &, bool, - std::integral_constant) const; + std::bool_constant) const; template void AffineConstraints::distribute_local_to_global< DiagonalMatrix>, @@ -175,7 +175,7 @@ for (S : REAL_AND_COMPLEX_SCALARS; T : DEAL_II_VEC_TEMPLATES) DiagonalMatrix> &, T &, bool, - std::integral_constant) const; + std::bool_constant) const; } // BlockSparseMatrix: @@ -190,7 +190,7 @@ for (S : REAL_AND_COMPLEX_SCALARS) BlockSparseMatrix &, Vector &, bool, - std::integral_constant) const; + std::bool_constant) const; template void AffineConstraints::distribute_local_to_global< BlockSparseMatrix, @@ -200,7 +200,7 @@ for (S : REAL_AND_COMPLEX_SCALARS) BlockSparseMatrix &, BlockVector &, bool, - std::integral_constant) const; + std::bool_constant) const; template void AffineConstraints::distribute_local_to_global>(