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
24 typedef typename GridFunctionSpace::Traits::Backend Backend;
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<
166 std::is_base_of<impl::WrapperBase,T>::value,
169 >::type::template evaluate<T>::type;
176 using Native =
typename native_type<T>::type;
182 Native<T> native(T&& t);
188 typename std::enable_if<
189 std::is_base_of<impl::WrapperBase,T>::value,
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);
Dune namespace.
Definition: alignedallocator.hh:13