Loading...
Searching...
No Matches
test.hh File Reference

Common tests for simd abstraction implementations. More...

`#include <algorithm>`
`#include <cstddef>`
`#include <iostream>`
`#include <sstream>`
`#include <string>`
`#include <type_traits>`
`#include <typeindex>`
`#include <typeinfo>`
`#include <unordered_set>`
`#include <utility>`
`#include <dune/common/classname.hh>`
`#include <dune/common/hybridutilities.hh>`
`#include <dune/common/rangeutilities.hh>`
`#include <dune/common/simd/io.hh>`
`#include <dune/common/simd/loop.hh>`
`#include <dune/common/simd/simd.hh>`
`#include <dune/common/std/type_traits.hh>`
`#include <dune/common/typelist.hh>`
`#include <dune/common/typetraits.hh>`

Go to the source code of this file.

## Classes

struct | Dune::Simd::EndMark
| final element marker for RebindList More...
class | Dune::Simd::UnitTest

## Namespaces

namespace | Dune
| Dune namespace
namespace | Dune::Simd
| Namespace for vectorization interface functions used by library developers.

## Macros

#define | DUNE_SIMD_CHECK(expr)
#define | DUNE_SIMD_CHECK_OP(expr)
#define | DUNE_SIMD_POSTFIX_OP(NAME, SYMBOL)
#define | DUNE_SIMD_PREFIX_OP(NAME, SYMBOL)
#define | DUNE_SIMD_OPNAME (className<Op(V)>())
#define | DUNE_SIMD_INFIX_OP(NAME, SYMBOL)
#define | DUNE_SIMD_ASSIGN_OP(NAME, SYMBOL)
#define | DUNE_SIMD_REPL_OP(NAME, REPLFN, SYMBOL)
#define | DUNE_SIMD_OPNAME (className<OpInfixComma(T1, T2)>())
#define | DUNE_SIMD_OPNAME (className<Op(V1, V2)>())
#define | DUNE_SIMD_OPNAME (className<Op(V1, T2)>())
#define | DUNE_SIMD_OPNAME (className<Op(V1, T2)>())
#define | DUNE_SIMD_OPNAME (className<Op(V1, P2)>())
#define | DUNE_SIMD_DO(M1, M2, M3, V1, V2, V3, NAME)

## Typedefs

template<class... Types>
using | Dune::Simd::RebindList
| A list of types with the final element removed.
template<class T>
using | Dune::Simd::IsLoop = typename Impl::IsLoop<T>::type
| check whether a type is an instance of LoopSIMD

## Detailed Description

Common tests for simd abstraction implementations.

This file is an interface header and may be included without restrictions.

## Macro Definition Documentation

## DUNE_SIMD_ASSIGN_OP

#define DUNE_SIMD_ASSIGN_OP | ( |  | NAME,
|  |  | SYMBOL )

Value:
struct OpInfix##NAME \
{ \
template<class V1, class V2> \
decltype(auto) operator()(V1&& v1, V2&& v2) const \
{ \
return std::forward<V1>(v1) SYMBOL std::forward<V2>(v2); \
} \
template<class S1, class S2> \
auto scalar(S1& s1, S2&& s2) const \
-> decltype(s1 SYMBOL std::forward<S2>(s2)); \
}

## DUNE_SIMD_CHECK

#define DUNE_SIMD_CHECK | ( |  | expr | ) |

Value:
((expr) ? void() : complain(__FILE__, __LINE__, __func__, #expr))

## DUNE_SIMD_CHECK_OP

#define DUNE_SIMD_CHECK_OP | ( |  | expr | ) |

Value:
((expr) ? void() : complain(__FILE__, __LINE__, __func__, \
DUNE_SIMD_OPNAME, #expr))
DUNE_SIMD_OPNAME
#define DUNE_SIMD_OPNAME

## DUNE_SIMD_DO

#define DUNE_SIMD_DO | ( |  | M1,
|  |  | M2,
|  |  | M3,
|  |  | V1,
|  |  | V2,
|  |  | V3,
|  |  | NAME )

Value:
checker(bool_constant<isMask ? do_##M1 : do_##V1>{}, \
bool_constant<isMask ? do_##M2 : do_##V2>{}, \
bool_constant<isMask ? do_##M3 : do_##V3>{}, \
Op##NAME{})

## DUNE_SIMD_INFIX_OP

#define DUNE_SIMD_INFIX_OP | ( |  | NAME,
|  |  | SYMBOL )

Value:
struct OpInfix##NAME \
{ \
template<class V1, class V2> \
decltype(auto) operator()(V1&& v1, V2&& v2) const \
{ \
return std::forward<V1>(v1) SYMBOL std::forward<V2>(v2); \
} \
template<class S1, class S2> \
auto scalar(S1&& s1, S2&& s2) const \
-> decltype(std::forward<S1>(s1) SYMBOL std::forward<S2>(s2)); \
}

## DUNE_SIMD_OPNAME [1/6]

#define DUNE_SIMD_OPNAME (className<Op(V1, P2)>())

## DUNE_SIMD_OPNAME [2/6]

#define DUNE_SIMD_OPNAME (className<Op(V1, T2)>())

## DUNE_SIMD_OPNAME [3/6]

#define DUNE_SIMD_OPNAME (className<Op(V1, T2)>())

## DUNE_SIMD_OPNAME [4/6]

#define DUNE_SIMD_OPNAME (className<Op(V1, V2)>())

## DUNE_SIMD_OPNAME [5/6]

#define DUNE_SIMD_OPNAME (className<OpInfixComma(T1, T2)>())

## DUNE_SIMD_OPNAME [6/6]

#define DUNE_SIMD_OPNAME (className<Op(V)>())

## DUNE_SIMD_POSTFIX_OP

#define DUNE_SIMD_POSTFIX_OP | ( |  | NAME,
|  |  | SYMBOL )

Value:
struct OpPostfix##NAME \
{ \
template<class V> \
auto operator()(V&& v) const \
-> decltype(std::forward<V>(v) SYMBOL) \
{ \
return std::forward<V>(v) SYMBOL; \
} \
}

## DUNE_SIMD_PREFIX_OP

#define DUNE_SIMD_PREFIX_OP | ( |  | NAME,
|  |  | SYMBOL )

Value:
struct OpPrefix##NAME \
{ \
template<class V> \
auto operator()(V&& v) const \
-> decltype(SYMBOL std::forward<V>(v)) \
{ \
return SYMBOL std::forward<V>(v); \
} \
}

## DUNE_SIMD_REPL_OP

#define DUNE_SIMD_REPL_OP | ( |  | NAME,
|  |  | REPLFN,
|  |  | SYMBOL )

Value:
struct OpInfix##NAME \
{ \
template<class V1, class V2> \
decltype(auto) operator()(V1&& v1, V2&& v2) const \
{ \
return Simd::REPLFN(std::forward<V1>(v1), std::forward<V2>(v2)); \
} \
template<class S1, class S2> \
auto scalar(S1&& s1, S2&& s2) const \
-> decltype(std::forward<S1>(s1) SYMBOL std::forward<S2>(s2)); \
}