16#ifndef dealii_matrix_free_type_traits_h
17#define dealii_matrix_free_type_traits_h
41 using local_element_t =
decltype(std::declval<const T>().local_element(0));
51 using add_local_element_t =
52 decltype(std::declval<T>().add_local_element(0,
typename T::value_type()));
55 constexpr bool has_add_local_element =
63 using set_local_element_t =
64 decltype(std::declval<T>().set_local_element(0,
typename T::value_type()));
67 constexpr bool has_set_local_element =
75 using partitioners_are_compatible_t =
76 decltype(std::declval<const T>().partitioners_are_compatible(
77 std::declval<Utilities::MPI::Partitioner>()));
80 constexpr bool has_partitioners_are_compatible =
88 using begin_t =
decltype(std::declval<const T>().begin());
98 using shared_vector_data_t =
99 decltype(std::declval<const T>().shared_vector_data());
101 template <
typename T>
102 constexpr bool has_shared_vector_data =
117 template <
typename T>
118 using update_ghost_values_start_t =
119 decltype(std::declval<const T>().update_ghost_values_start(0));
121 template <
typename T>
122 constexpr bool has_update_ghost_values_start =
129 template <
typename T>
130 using compress_start_t =
133 template <
typename T>
134 constexpr bool has_compress_start =
143 template <
typename T>
144 constexpr bool has_exchange_on_subset =
145 has_begin<T> && has_local_element<T> && has_partitioners_are_compatible<T>;
151 template <
typename T>
152 using communication_block_size_t =
decltype(T::communication_block_size);
154 template <
typename T>
155 constexpr bool has_communication_block_size =
163 template <
typename VectorType>
170 template <
typename VectorType>
171 using is_serial_vector_type =
172 decltype(std::enable_if_t<is_serial_vector<VectorType>::value,
int>());
179 template <
typename VectorType>
180 constexpr bool is_not_parallel_vector =
190 template <
typename VectorType>
191 struct is_serial_vector_or_array
193 static const bool value =
194 is_supported_operation<is_serial_vector_type, VectorType>;
201 template <
typename Number>
202 struct is_serial_vector_or_array<::
ArrayView<Number>>
204 static const bool value =
true;
208 template <
typename VectorType>
209 const bool is_serial_vector_or_array<VectorType>::value;
218 template <
typename T,
typename Number>
219 struct is_vectorizable
221 static const bool value =
223 (has_local_element<T> || is_serial_vector_or_array<T>::value) &&
224 std::is_same_v<typename T::value_type, Number>;
228 template <
typename T,
typename Number>
229 const bool is_vectorizable<T, Number>::value;
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
constexpr bool is_supported_operation