dune-common 2.12-git
Loading...
Searching...
No Matches

SIMD abstractions for std::experimental::simd More...

#include <dune-common-config.hh>
#include <cstddef>
#include <type_traits>
#include <utility>
#include <experimental/simd>
#include <dune/common/indices.hh>
#include <dune/common/simd/base.hh>
#include <dune/common/simd/defaults.hh>
#include <dune/common/simd/loop.hh>
#include <dune/common/simd/valueproxy.hh>
#include <dune/common/typetraits.hh>

Go to the source code of this file.

Classes

struct  Dune::Simd::StdSimdImpl::IsMask< V >
 true for std::experimental::simd_mask types More...
 
struct  Dune::Simd::StdSimdImpl::IsVector< V >
 true for std::experimental::simd and simd_mask types More...
 
struct  Dune::Simd::StdSimdImpl::IsVectorizable< T >
 true for the element types of std::experimental::simd More...
 
struct  Dune::Simd::StdSimdImpl::VectorType< V, class >
 the vector type of a vector or mask type More...
 
struct  Dune::Simd::StdSimdImpl::VectorType< M, std::enable_if_t< IsMask< M >::value > >
 
struct  Dune::Simd::StdSimdImpl::ProxyOperations< Proxy, ValueType >
 Operations of lane proxies with std::experimental::simd types. More...
 
struct  Dune::Simd::Overloads::ScalarType< V, std::enable_if_t< StdSimdImpl::IsVector< V >::value > >
 should have a member type type More...
 
struct  Dune::Simd::Overloads::RebindType< Simd::Scalar< V >, V, std::enable_if_t< StdSimdImpl::IsVector< V >::value > >
 should have a member type type More...
 
struct  Dune::Simd::Overloads::RebindType< bool, V, std::enable_if_t< StdSimdImpl::IsVector< V >::value &&!StdSimdImpl::IsMask< V >::value > >
 should have a member type type More...
 
struct  Dune::Simd::Overloads::RebindType< Scalar< typename M::simd_type >, M, std::enable_if_t< StdSimdImpl::IsMask< M >::value > >
 should have a member type type More...
 
struct  Dune::Simd::Overloads::RebindType< S, V, std::enable_if_t< StdSimdImpl::IsVector< V >::value &&StdSimdImpl::IsVectorizable< S >::value &&!std::is_same< S, Scalar< typename StdSimdImpl::VectorType< V >::type > >::value > >
 should have a member type type More...
 
struct  Dune::Simd::Overloads::RebindType< S, V, std::enable_if_t< StdSimdImpl::IsVector< V >::value &&!StdSimdImpl::IsVectorizable< S >::value &&!std::is_same< S, bool >::value &&!std::is_same< S, Scalar< V > >::value > >
 should have a member type type More...
 
struct  Dune::Simd::Overloads::LaneCount< V, std::enable_if_t< StdSimdImpl::IsVector< V >::value > >
 should be derived from an Dune::index_constant More...
 
struct  Dune::IsNumber< std::experimental::simd< T, Abi > >
 

Namespaces

namespace  Dune
 Dune namespace
 
namespace  Dune::Simd
 Namespace for vectorization interface functions used by library developers.
 
namespace  Dune::Simd::StdSimdImpl
 
namespace  Dune::Simd::Overloads
 Namespace for the overloads and specializations that make up a SIMD implementation.
 

Macros

#define DUNE_SIMD_STDSIMD_BINARY(OP)
 
#define DUNE_SIMD_STDSIMD_ASSIGN(OP)
 

Typedefs

template<class V >
using Dune::Simd::StdSimdImpl::Proxy = Impl::ValueProxy< V, ProxyOperations >
 A reference-like proxy for lanes of std::experimental::simd types.
 

Functions

Specialized classes and overloaded functions
template<class V >
StdSimdImpl::Proxy< V > Dune::Simd::Overloads::lane (ADLTag< 5, StdSimdImpl::IsVector< V >::value >, std::size_t l, V &v)
 implements Simd::lane()
 
template<class V >
Scalar< V > Dune::Simd::Overloads::lane (ADLTag< 5, StdSimdImpl::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 > Dune::Simd::Overloads::lane (ADLTag< 5, StdSimdImpl::IsVector< V >::value >, std::size_t l, V &&v)
 implements Simd::lane()
 
template<class V >
V Dune::Simd::Overloads::cond (ADLTag< 5, StdSimdImpl::IsVector< V >::value >, const Mask< V > &mask, const V &ifTrue, const V &ifFalse)
 implements Simd::cond()
 
template<class V >
V Dune::Simd::Overloads::max (ADLTag< 5, StdSimdImpl::IsVector< V >::value &&!StdSimdImpl::IsMask< V >::value >, const V &v1, const V &v2)
 implements binary Simd::max()
 
template<class M >
M Dune::Simd::Overloads::max (ADLTag< 5, StdSimdImpl::IsMask< M >::value >, const M &m1, const M &m2)
 implements binary Simd::max()
 
template<class V >
V Dune::Simd::Overloads::min (ADLTag< 5, StdSimdImpl::IsVector< V >::value &&!StdSimdImpl::IsMask< V >::value >, const V &v1, const V &v2)
 implements binary Simd::min()
 
template<class M >
M Dune::Simd::Overloads::min (ADLTag< 5, StdSimdImpl::IsMask< M >::value >, const M &m1, const M &m2)
 implements binary Simd::min()
 
template<class M >
bool Dune::Simd::Overloads::anyTrue (ADLTag< 5, StdSimdImpl::IsMask< M >::value >, const M &mask)
 implements Simd::anyTrue()
 
template<class M >
bool Dune::Simd::Overloads::allTrue (ADLTag< 5, StdSimdImpl::IsMask< M >::value >, const M &mask)
 implements Simd::allTrue()
 
template<class M >
bool Dune::Simd::Overloads::allFalse (ADLTag< 5, StdSimdImpl::IsMask< M >::value >, const M &mask)
 implements Simd::allFalse()
 
template<class V >
auto Dune::Simd::Overloads::max (ADLTag< 5, StdSimdImpl::IsVector< V >::value &&!StdSimdImpl::IsMask< V >::value >, const V &v)
 implements Simd::maxValue()
 
template<class M >
bool Dune::Simd::Overloads::max (ADLTag< 5, StdSimdImpl::IsMask< M >::value >, const M &mask)
 implements Simd::maxValue()
 
template<class V >
auto Dune::Simd::Overloads::min (ADLTag< 5, StdSimdImpl::IsVector< V >::value &&!StdSimdImpl::IsMask< V >::value >, const V &v)
 implements Simd::minValue()
 
template<class M >
bool Dune::Simd::Overloads::min (ADLTag< 5, StdSimdImpl::IsMask< M >::value >, const M &mask)
 implements Simd::minValue()
 
template<class S1 , class V2 >
auto Dune::Simd::Overloads::maskAnd (ADLTag< 5, std::is_same< Mask< S1 >, bool >::value &&StdSimdImpl::IsVector< V2 >::value >, const S1 &s1, const V2 &v2)
 implements Simd::maskAnd()
 
template<class V1 , class S2 >
auto Dune::Simd::Overloads::maskAnd (ADLTag< 5, StdSimdImpl::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 Dune::Simd::Overloads::maskOr (ADLTag< 5, std::is_same< Mask< S1 >, bool >::value &&StdSimdImpl::IsVector< V2 >::value >, const S1 &s1, const V2 &v2)
 implements Simd::maskOr()
 
template<class V1 , class S2 >
auto Dune::Simd::Overloads::maskOr (ADLTag< 5, StdSimdImpl::IsVector< V1 >::value &&std::is_same< Mask< S2 >, bool >::value >, const V1 &v1, const S2 &s2)
 implements Simd::maskOr()
 

Detailed Description

SIMD abstractions for std::experimental::simd

Macro Definition Documentation

◆ DUNE_SIMD_STDSIMD_ASSIGN

#define DUNE_SIMD_STDSIMD_ASSIGN (   OP)
Value:
template<class T, class Abi> \
friend auto operator OP(stdx::simd<T, Abi> &l, Proxy&& r) \
-> decltype(l OP std::declval<value_type>()) \
{ \
return l OP value_type(r); \
}

◆ DUNE_SIMD_STDSIMD_BINARY

#define DUNE_SIMD_STDSIMD_BINARY (   OP)
Value:
template<class T, class Abi> \
friend auto operator OP(const stdx::simd<T, Abi> &l, Proxy&& r) \
-> decltype(l OP std::declval<value_type>()) \
{ \
return l OP value_type(r); \
} \
template<class T, class Abi> \
friend auto operator OP(Proxy&& l, const stdx::simd<T, Abi> &r) \
-> decltype(std::declval<value_type>() OP r) \
{ \
return value_type(l) OP r; \
}