// if both begin() and local_element()
// exist, then begin() + offset == local_element(offset)
template <typename T, typename Number>
- struct vectorizable
+ struct is_vectorizable
{
static constexpr bool value =
has_begin<T>::value && has_local_element<T>::value &&
ExcNotImplemented("Masking currently not implemented for "
"non-contiguous DoF storage"));
+ std::integral_constant<bool,
+ internal::is_vectorizable<VectorType, Number>::value>
+ vector_selector;
+
const unsigned int dofs_per_component =
this->data->dofs_per_component_on_cell;
if (dof_info->index_storage_variants
for (unsigned int i = 0; i < dofs_per_component;
++i, dof_indices += n_vectorization)
for (unsigned int comp = 0; comp < n_components; ++comp)
- operation.process_dof_gather(
- dof_indices,
- *src[comp],
- 0,
- values_dofs[comp][i],
- std::integral_constant<
- bool,
- std::is_same<typename VectorType::value_type,
- Number>::value>());
+ operation.process_dof_gather(dof_indices,
+ *src[comp],
+ 0,
+ values_dofs[comp][i],
+ vector_selector);
else
for (unsigned int comp = 0; comp < n_components; ++comp)
for (unsigned int i = 0; i < dofs_per_component;
++i, dof_indices += n_vectorization)
operation.process_dof_gather(
- dof_indices,
- *src[0],
- 0,
- values_dofs[comp][i],
- std::integral_constant<
- bool,
- std::is_same<typename VectorType::value_type,
- Number>::value>());
+ dof_indices, *src[0], 0, values_dofs[comp][i], vector_selector);
return;
}
// 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,
- std::is_same<typename VectorType::value_type, Number>::value>
+ std::integral_constant<bool,
+ internal::is_vectorizable<VectorType, Number>::value>
vector_selector;
const internal::MatrixFreeFunctions::DoFInfo::DoFAccessIndex ind =
is_face ? dof_access_index :
temp1 = this->scratch_data;
internal::VectorReader<Number> reader;
- std::integral_constant<
- bool,
- std::is_same<typename VectorType::value_type, Number>::value>
+ std::integral_constant<bool,
+ internal::is_vectorizable<VectorType, Number>::value>
vector_selector;
// case 1: contiguous and interleaved indices
# endif
internal::VectorDistributorLocalToGlobal<Number> writer;
- std::integral_constant<
- bool,
- std::is_same<typename VectorType::value_type, Number>::value>
+ std::integral_constant<bool,
+ internal::is_vectorizable<VectorType, Number>::value>
vector_selector;
// case 1: contiguous and interleaved indices
<< std::endl
<< "TrilinosWrappers::MPI::Vector = "
<< internal::has_begin<TrilinosWrappers::MPI::Vector>::value << std::endl;
- // check vectorizable:
+ // check is_vectorizable:
deallog
- << "vectorizable:" << std::endl
+ << "is_vectorizable:" << std::endl
<< "LinearAlgebra::distributed::Vector<double> && double = "
- << internal::vectorizable<LinearAlgebra::distributed::Vector<double>,
- double>::value
+ << internal::is_vectorizable<LinearAlgebra::distributed::Vector<double>,
+ double>::value
<< std::endl
<< "LinearAlgebra::distributed::Vector<double> && float = "
- << internal::vectorizable<LinearAlgebra::distributed::Vector<double>,
- float>::value
+ << internal::is_vectorizable<LinearAlgebra::distributed::Vector<double>,
+ float>::value
<< std::endl
<< "TrilinosWrappers::MPI::Vector && double = "
- << internal::vectorizable<TrilinosWrappers::MPI::Vector, double>::value
+ << internal::is_vectorizable<TrilinosWrappers::MPI::Vector, double>::value
<< std::endl;
deallog << "OK" << std::endl;