DUNE-FEM (unstable)

Dune::Simd::Overloads Namespace Reference

Namespace for the overloads and specializations that make up a SIMD implementation. More...

Classes

struct  ADLTag
 Tag used to force late-binding lookup in Dune::Simd::Overloads. More...
 
struct  LaneCount
 should be derived from a Dune::index_constant More...
 
struct  LaneCount< V, std::enable_if_t< VcImpl::IsVector< V >::value > >
 should be derived from an Dune::index_constant More...
 
struct  RebindType
 should have a member type type More...
 
struct  RebindType< bool, V, std::enable_if_t< VcImpl::IsVector< V >::value &&!VcImpl::IsMask< V >::value > >
 should have a member type type More...
 
struct  RebindType< S, M, std::enable_if_t< VcImpl::IsMask< M >::value &&VcImpl::IsVectorizable< S >::value &&!std::is_same< S, Scalar< typename M::Vector > >::value > >
 should have a member type type More...
 
struct  RebindType< S, V, std::enable_if_t< VcImpl::IsVector< V >::value &&!VcImpl::IsMask< V >::value &&VcImpl::IsVectorizable< S >::value &&!std::is_same< S, Scalar< V > >::value > >
 should have a member type type More...
 
struct  RebindType< S, V, std::enable_if_t< VcImpl::IsVector< V >::value &&!VcImpl::IsVectorizable< S >::value &&!std::is_same< S, bool >::value &&!std::is_same< S, Scalar< V > >::value > >
 should have a member type type More...
 
struct  RebindType< Scalar< typename M::Vector >, M, std::enable_if_t< VcImpl::IsMask< M >::value > >
 should have a member type type More...
 
struct  RebindType< Simd::Scalar< V >, V, std::enable_if_t< VcImpl::IsVector< V >::value > >
 should have a member type type More...
 
struct  ScalarType
 should have a member type type More...
 
struct  ScalarType< V, std::enable_if_t< VcImpl::IsVector< V >::value > >
 should have a member type type 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 >
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 >
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 >
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 >
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()

template<class V >
V Dune::Simd::Overloads::lane ( ADLTag< 2 >  ,
std::size_t  ,
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.

Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 20, 23:30, 2024)