1 #ifndef DUNE_PDELAB_BACKEND_INTERFACE_HH 2 #define DUNE_PDELAB_BACKEND_INTERFACE_HH 17 template<
typename Backend,
typename Gr
idFunctionSpace,
typename FieldType>
18 struct BackendVectorSelectorHelper
21 template<
typename Gr
idFunctionSpace,
typename FieldType>
22 struct BackendVectorSelector
25 typedef typename BackendVectorSelectorHelper<Backend, GridFunctionSpace, FieldType>::Type Type;
28 template<
typename Backend,
typename VU,
typename VV,
typename E>
29 struct BackendMatrixSelector
31 typedef typename Backend::template MatrixHelper<VV,VU,E>::type Type;
51 template<
typename NativeContainer>
56 using native_type = NativeContainer;
59 static auto access_native(U&& u) -> decltype(u.native())
69 "u.native() must return a cv-qualified xvalue of type T" 105 template<
typename Gr
idFunctionSpace,
typename FieldType>
106 using Vector =
typename impl::BackendVectorSelector<GridFunctionSpace, FieldType>::Type;
126 template<
typename Backend,
typename VU,
typename VV,
typename E>
127 using Matrix =
typename impl::BackendMatrixSelector<Backend, VU, VV, E>::Type;
154 struct lazy_native_type
160 using type =
typename U::native_type;
165 using type =
typename std::conditional<
169 >::type::template evaluate<T>::type;
176 using Native =
typename native_type<T>::type;
188 typename std::enable_if<
194 return impl::Wrapper<Native<T>>::access_native(t);
199 typename std::enable_if<
200 std::is_base_of<impl::WrapperBase,T>::value,
205 return impl::Wrapper<Native<T>>::access_native(t);
210 typename std::enable_if<
211 !std::is_base_of<impl::WrapperBase,typename std::decay<T>::type>
::value,
212 decltype(std::forward<T>(std::declval<T&&>()))
216 return std::forward<T>(t);
225 #endif // DUNE_PDELAB_BACKEND_INTERFACE_HH static const unsigned int value
Definition: gridfunctionspace/tags.hh:139
typename impl::BackendMatrixSelector< Backend, VU, VV, E >::Type Matrix
alias of the return type of BackendMatrixSelector
Definition: backend/interface.hh:127
typename impl::BackendVectorSelector< GridFunctionSpace, FieldType >::Type Vector
alias of the return type of BackendVectorSelector
Definition: backend/interface.hh:106
For backward compatibility – Do not use this!
Definition: adaptivity.hh:27
std::enable_if< std::is_base_of< impl::WrapperBase, T >::value, Native< T > &>::type native(T &t)
Definition: backend/interface.hh:192
B Backend
Definition: gridfunctionspace.hh:127
typename native_type< T >::type Native
Alias of the native container type associated with T or T itself if it is not a backend wrapper...
Definition: backend/interface.hh:176