Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEEvaluationBase::read_write_operation Chose correct code path for neighbors and activated mask #14119

Merged
merged 1 commit into from
Jul 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 10 additions & 4 deletions include/deal.II/matrix_free/fe_evaluation.h
Original file line number Diff line number Diff line change
Expand Up @@ -3346,9 +3346,11 @@ FEEvaluationBase<dim, n_components_, Number, is_face, VectorizedArrayType>::
std::array<unsigned int, VectorizedArrayType::size()> cells =
this->get_cell_ids();

for (unsigned int v = 0; v < n_lanes; ++v)
if (mask[v] == false)
cells[v] = numbers::invalid_unsigned_int;
const bool masking_is_active = mask.count() < n_lanes;
if (masking_is_active)
for (unsigned int v = 0; v < n_lanes; ++v)
if (mask[v] == false)
cells[v] = numbers::invalid_unsigned_int;

bool has_hn_constraints = false;

Expand All @@ -3370,6 +3372,10 @@ FEEvaluationBase<dim, n_components_, Number, is_face, VectorizedArrayType>::
internal::is_vectorizable<VectorType, Number>::value>
vector_selector;

const bool is_neighbor_cells = !is_face && !this->is_interior_face();
const bool use_non_vectorized_path =
masking_is_active || is_neighbor_cells || has_hn_constraints;

const std::size_t dofs_per_component = this->data->dofs_per_component_on_cell;
std::array<VectorizedArrayType *, n_components> values_dofs;
for (unsigned int c = 0; c < n_components; ++c)
Expand All @@ -3382,7 +3388,7 @@ FEEvaluationBase<dim, n_components_, Number, is_face, VectorizedArrayType>::
internal::MatrixFreeFunctions::DoFInfo::dof_access_cell]
[this->cell] == internal::MatrixFreeFunctions::DoFInfo::
IndexStorageVariants::interleaved &&
(has_hn_constraints == false))
(use_non_vectorized_path == false))
{
const unsigned int *dof_indices =
this->dof_info->dof_indices_interleaved.data() +
Expand Down