From: Martin Kronbichler Date: Thu, 21 Mar 2024 08:47:17 +0000 (+0100) Subject: FEEvaluation: Make sure that compiler can identify no-overlap of pointers X-Git-Tag: v9.6.0-rc1~463^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dafe31072b28f4800a2440afcc93738f08089d3e;p=dealii.git FEEvaluation: Make sure that compiler can identify no-overlap of pointers --- 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; } }