Loading...
Searching...
No Matches
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< T >
struct | Dune::SimdScalarTypeTraits< AlignedNumber< T, align > >
| deduce the underlying scalar data type of an AlignedNumber More...
struct | Dune::SimdIndexTypeTraits< V, typename >
struct | Dune::SimdMaskTypeTraits< V, typename >

## Namespaces

namespace | Dune
| Dune namespace

## Typedefs

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

## 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>
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)
template<class T>
void | Dune::swap (T &v1, T &v2, bool mask)

## 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.