14#ifndef dealii_matrix_free_type_traits_h
15#define dealii_matrix_free_type_traits_h
39 using local_element_t =
decltype(std::declval<const T>().local_element(0));
49 using add_local_element_t =
50 decltype(std::declval<T>().add_local_element(0,
typename T::value_type()));
53 constexpr bool has_add_local_element =
61 using set_local_element_t =
62 decltype(std::declval<T>().set_local_element(0,
typename T::value_type()));
65 constexpr bool has_set_local_element =
73 using partitioners_are_compatible_t =
74 decltype(std::declval<const T>().partitioners_are_compatible(
75 std::declval<Utilities::MPI::Partitioner>()));
78 constexpr bool has_partitioners_are_compatible =
86 using begin_t =
decltype(std::declval<const T>().begin());
96 using shared_vector_data_t =
97 decltype(std::declval<const T>().shared_vector_data());
100 constexpr bool has_shared_vector_data =
115 template <
typename T>
116 using update_ghost_values_start_t =
117 decltype(std::declval<const T>().update_ghost_values_start(0));
119 template <
typename T>
120 constexpr bool has_update_ghost_values_start =
127 template <
typename T>
128 using compress_start_t =
131 template <
typename T>
132 constexpr bool has_compress_start =
141 template <
typename T>
142 constexpr bool has_exchange_on_subset =
143 has_begin<T> && has_local_element<T> && has_partitioners_are_compatible<T>;
149 template <
typename T>
150 using assignment_operator_t =
151 decltype(std::declval<T>().operator=(
typename T::value_type()));
153 template <
typename T>
154 constexpr bool has_assignment_operator =
161 template <
typename T>
162 using communication_block_size_t =
decltype(T::communication_block_size);
164 template <
typename T>
165 constexpr bool has_communication_block_size =
173 template <
typename VectorType>
174 using is_vector_type =
decltype(is_serial_vector<VectorType>::value);
180 template <
typename VectorType>
181 using is_serial_vector_type =
182 decltype(std::enable_if_t<is_serial_vector<VectorType>::value,
int>());
189 template <
typename VectorType>
190 constexpr bool is_not_parallel_vector =
200 template <
typename VectorType>
201 struct is_serial_vector_or_array
203 static const bool value =
204 is_supported_operation<is_serial_vector_type, VectorType>;
211 template <
typename Number>
212 struct is_serial_vector_or_array<::ArrayView<Number>>
214 static const bool value =
true;
218 template <
typename VectorType>
219 const bool is_serial_vector_or_array<VectorType>::value;
228 template <
typename T,
typename Number>
229 struct is_vectorizable
231 static const bool value =
233 (has_local_element<T> || is_serial_vector_or_array<T>::value) &&
234 std::is_same_v<typename T::value_type, Number>;
238 template <
typename T,
typename Number>
239 const bool is_vectorizable<T, Number>::value;
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
const bool IsBlockVector< VectorType >::value
constexpr bool is_supported_operation