From dafe31072b28f4800a2440afcc93738f08089d3e Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Thu, 21 Mar 2024 09:47:17 +0100 Subject: [PATCH] FEEvaluation: Make sure that compiler can identify no-overlap of pointers --- include/deal.II/matrix_free/fe_evaluation.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/deal.II/matrix_free/fe_evaluation.h b/include/deal.II/matrix_free/fe_evaluation.h index a8247d1a44..d99940cc42 100644 --- a/include/deal.II/matrix_free/fe_evaluation.h +++ b/include/deal.II/matrix_free/fe_evaluation.h @@ -5052,19 +5052,21 @@ FEEvaluationBase:: this->values_quad_submitted = true; # endif - const std::size_t nqp = this->n_quadrature_points; + const std::size_t nqp = this->n_quadrature_points; + VectorizedArrayType *values = this->values_quad + q_point; + if (this->cell_type <= internal::MatrixFreeFunctions::affine) { const VectorizedArrayType JxW = this->J_value[0] * this->quadrature_weights[q_point]; for (unsigned int comp = 0; comp < n_components; ++comp) - this->values_quad[comp * nqp + q_point] = val_in[comp] * JxW; + values[comp * nqp] = val_in[comp] * JxW; } else { const VectorizedArrayType JxW = this->J_value[q_point]; for (unsigned int comp = 0; comp < n_components; ++comp) - this->values_quad[comp * nqp + q_point] = val_in[comp] * JxW; + values[comp * nqp] = val_in[comp] * JxW; } } -- 2.39.5