Dune Core Modules (unstable)
Namespace for the overloads and specializations that make up a SIMD implementation. More...
Functions | |
Overloadable and default functions | |
This group contains functions that you, as an abstraction developer, must implement. All functions that are deleted must be provided, functions that have a default implementation may be left unimplemented if the default behaviour is satisfactory. | |
template<class V > | |
decltype(auto) | lane (ADLTag< 0 >, std::size_t l, V v)=delete |
implements Simd::lane() | |
template<class V > | |
constexpr V | implCast (ADLTag< 0 >, MetaType< V >, const V &u) |
implements Simd::implCast<V>(V) | |
template<class V , class U > | |
constexpr V | implCast (ADLTag< 0 >, MetaType< V >, const U &u) |
implements Simd::implCast<V>(U) | |
template<class V , class S > | |
auto | broadcast (ADLTag< 0 >, MetaType< V >, S s) |
implements Simd::broadcast<V>() | |
template<class V > | |
V | cond (ADLTag< 0 >, const Mask< V > &mask, const V &ifTrue, const V &ifFalse)=delete |
implements Simd::cond() | |
template<class V > | |
auto | max (ADLTag< 0 >, const V &v1, const V &v2) |
implements binary Simd::max() | |
template<class V > | |
auto | min (ADLTag< 0 >, const V &v1, const V &v2) |
implements binary Simd::min() | |
template<class Mask > | |
bool | anyTrue (ADLTag< 0 >, const Mask &mask)=delete |
implements Simd::anyTrue() | |
template<class Mask > | |
bool | allTrue (ADLTag< 0 >, const Mask &mask) |
implements Simd::allTrue() More... | |
template<class Mask > | |
bool | anyFalse (ADLTag< 0 >, const Mask &mask) |
implements Simd::anyFalse() More... | |
template<class Mask > | |
bool | allFalse (ADLTag< 0 >, const Mask &mask) |
implements Simd::allFalse() More... | |
template<class V > | |
auto | max (ADLTag< 0 >, const V &v) |
implements Simd::maxValue() | |
template<class V > | |
auto | min (ADLTag< 0 >, const V &v) |
implements Simd::minValue() | |
template<class V > | |
Mask< V > | mask (ADLTag< 0, std::is_same< V, Mask< V > >::value >, const V &v) |
implements Simd::mask() | |
template<class V > | |
auto | mask (ADLTag< 0, !std::is_same< V, Mask< V > >::value >, const V &v) |
implements Simd::mask() | |
template<class V1 , class V2 > | |
auto | maskOr (ADLTag< 0 >, const V1 &v1, const V2 &v2) |
implements Simd::maskOr() | |
template<class V1 , class V2 > | |
auto | maskAnd (ADLTag< 0 >, const V1 &v1, const V2 &v2) |
implements Simd::maskAnd() | |
Specialized classes and overloaded functions | |
template<class V > | |
V | lane (ADLTag< 2 >, std::size_t, V v) |
implements Simd::lane() More... | |
template<class V > | |
V & | lane (ADLTag< 3 >, std::size_t, V &v) |
bool | anyTrue (ADLTag< 2 >, bool mask) |
implements Simd::anyTrue() | |
bool | allTrue (ADLTag< 2 >, bool mask) |
implements Simd::allTrue() | |
bool | anyFalse (ADLTag< 2 >, bool mask) |
implements Simd::anyFalse() | |
bool | allFalse (ADLTag< 2 >, bool mask) |
implements Simd::allFalse() | |
template<class V > | |
VcImpl::Proxy< V > | lane (ADLTag< 5, VcImpl::IsVector< V >::value >, std::size_t l, V &v) |
implements Simd::lane() | |
template<class V > | |
Scalar< V > | lane (ADLTag< 5, VcImpl::IsVector< V >::value >, std::size_t l, const V &v) |
implements Simd::lane() | |
template<class V , class = std::enable_if_t<!std::is_reference<V>::value>> | |
Scalar< V > | lane (ADLTag< 5, VcImpl::IsVector< V >::value >, std::size_t l, V &&v) |
implements Simd::lane() | |
template<class V > | |
V | cond (ADLTag< 5, VcImpl::IsVector< V >::value &&!VcImpl::IsMask< V >::value >, const Mask< V > &mask, const V &ifTrue, const V &ifFalse) |
implements Simd::cond() | |
template<class V > | |
V | cond (ADLTag< 5, VcImpl::IsMask< V >::value >, const V &mask, const V &ifTrue, const V &ifFalse) |
implements Simd::cond() | |
template<class V > | |
auto | max (ADLTag< 5, VcImpl::IsVector< V >::value &&!VcImpl::IsMask< V >::value >, const V &v1, const V &v2) |
implements binary Simd::max() | |
template<class M > | |
auto | max (ADLTag< 5, VcImpl::IsMask< M >::value >, const M &m1, const M &m2) |
implements binary Simd::max() | |
template<class V > | |
auto | min (ADLTag< 5, VcImpl::IsVector< V >::value &&!VcImpl::IsMask< V >::value >, const V &v1, const V &v2) |
implements binary Simd::min() | |
template<class M > | |
auto | min (ADLTag< 5, VcImpl::IsMask< M >::value >, const M &m1, const M &m2) |
implements binary Simd::min() | |
template<class M > | |
bool | anyTrue (ADLTag< 5, VcImpl::IsMask< M >::value >, const M &mask) |
implements Simd::anyTrue() | |
template<class M > | |
bool | allTrue (ADLTag< 5, VcImpl::IsMask< M >::value >, const M &mask) |
implements Simd::allTrue() | |
template<class M > | |
bool | allFalse (ADLTag< 5, VcImpl::IsMask< M >::value >, const M &mask) |
implements Simd::allFalse() | |
template<class V > | |
auto | max (ADLTag< 5, VcImpl::IsVector< V >::value &&!VcImpl::IsMask< V >::value >, const V &v) |
implements Simd::maxValue() | |
template<class M > | |
bool | max (ADLTag< 5, VcImpl::IsMask< M >::value >, const M &mask) |
implements Simd::maxValue() | |
template<class V > | |
auto | min (ADLTag< 5, VcImpl::IsVector< V >::value &&!VcImpl::IsMask< V >::value >, const V &v) |
implements Simd::minValue() | |
template<class M > | |
bool | min (ADLTag< 5, VcImpl::IsMask< M >::value >, const M &mask) |
implements Simd::minValue() | |
template<class S1 , class V2 > | |
auto | maskAnd (ADLTag< 5, std::is_same< Mask< S1 >, bool >::value &&VcImpl::IsVector< V2 >::value >, const S1 &s1, const V2 &v2) |
implements Simd::maskAnd() | |
template<class V1 , class S2 > | |
auto | maskAnd (ADLTag< 5, VcImpl::IsVector< V1 >::value &&std::is_same< Mask< S2 >, bool >::value >, const V1 &v1, const S2 &s2) |
implements Simd::maskAnd() | |
template<class S1 , class V2 > | |
auto | maskOr (ADLTag< 5, std::is_same< Mask< S1 >, bool >::value &&VcImpl::IsVector< V2 >::value >, const S1 &s1, const V2 &v2) |
implements Simd::maskOr() | |
template<class V1 , class S2 > | |
auto | maskOr (ADLTag< 5, VcImpl::IsVector< V1 >::value &&std::is_same< Mask< S2 >, bool >::value >, const V1 &v1, const S2 &s2) |
implements Simd::maskOr() | |
Detailed Description
Namespace for the overloads and specializations that make up a SIMD implementation.
This namespace contains three sets of things: the struct ADLTag, which is used to look up functions in this namespace using argument-dependet lookup, traits classes that must be specialized by abstraction implementations, and functions that must/can be overloaded by abstraction implementations.
- Note
- Only introduce new names into this namespace to extend the interface. This applies in particular to people in the "abstraction developer" role; they may meddle in this namespace only by providing overloads and/or specializations for existing names (and for
ADLTag
even that is prohibited).
Function Documentation
◆ lane()
V Dune::Simd::Overloads::lane | ( | ADLTag< 2 > | , |
std::size_t | , | ||
V | v | ||
) |
implements Simd::lane()
This binds to rvalues and const lvalues. It would bind to non-const lvalues too, but those are caught by the overload with ADLTag<3>. Using a universal reference here would bind to any argument with a perfect match. This would mean ambiguous overloads with other abstractions, if those only declare overloads for const TheirType &
and TheirType &
, because because universal references match perfectly.