Dune Core Modules (unstable)

simd.hh File Reference

Abstractions for support of dedicated SIMD data types. More...

#include <cassert>
#include <cstddef>
#include <type_traits>
#include <utility>
#include <dune/common/conditional.hh>
#include <dune/common/debugalign.hh>
#include <dune/common/rangeutilities.hh>
#include <dune/common/typetraits.hh>
#include <dune/common/vc.hh>

Go to the source code of this file.

Classes

struct  Dune::SimdScalarTypeTraits< AlignedNumber< T, align > >
 deduce the underlying scalar data type of an AlignedNumber More...
 

Namespaces

 Dune
 Dune namespace.
 

Typedefs

template<typename V >
using Dune::SimdIndex = typename SimdIndexTypeTraits< V >::type
 An simd vector of indices corresponding to a simd vector V. More...
 
template<typename V >
using Dune::SimdMask = typename SimdMaskTypeTraits< V >::type
 A simd vector of truth values corresponding to a simd vector V. More...
 

Functions

template<class T >
std::size_t Dune::lanes (const T &)
 get the number of lanes of a simd vector (scalar version)
 
template<class T >
Dune::lane (std::size_t l, const T &v)
 access a lane of a simd vector (scalar version)
 
template<class T >
T & Dune::lane (std::size_t l, T &v)
 access a lane of a simd vector (scalar version)
 
template<class T >
void Dune::assign (T &dst, const T &src, bool mask)
 masked Simd assignment (scalar version) More...
 

Detailed Description

Abstractions for support of dedicated SIMD data types.

Libraries like Vc (https://github.com/VcDevel/Vc) add high-level data types for SIMD (or vectorization) support in C++. Most of these operations mimic the behavior of a numerical data type. Some boolean operations can not be implemented in a compatible way to trivial data types.

This header contains additional abstractions to help writing code that works with trivial numerical data types (like double) and Vc vectorization data types.

See also the conditional.hh and range_utils.hh headers.

Deprecated:
Use the newer simd architecture from dune/common/simd/simd.hh instead.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.80.0 (Apr 25, 22:37, 2024)