dune-common 2.12-git
Loading...
Searching...
No Matches
valueproxy.hh File Reference

A proxy for lanes of SIMD types with operator[] More...

#include <concepts>
#include <cstddef>
#include <type_traits>
#include <utility>
#include <dune/common/typetraits.hh>

Go to the source code of this file.

Namespaces

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

Macros

#define DUNE_SIMD_VALUEPROXY_ASSIGNMENT(OP)
 
#define DUNE_SIMD_VALUEPROXY_BINARY(OP)
 
#define DUNE_SIMD_VALUEPROXY_ASSIGN(OP)
 

Detailed Description

A proxy for lanes of SIMD types with operator[]

This file is meant for implementers of SIMD abstractions; it should not be needed by users of the abstraction.

Macro Definition Documentation

◆ DUNE_SIMD_VALUEPROXY_ASSIGN

#define DUNE_SIMD_VALUEPROXY_ASSIGN (   OP)
Value:
template<std::derived_from<V> W> \
friend auto operator OP(W &l, ValueProxy &&r) \
-> decltype(l OP std::declval<value_type>()) \
{ \
return l OP r.get(); \
}

◆ DUNE_SIMD_VALUEPROXY_ASSIGNMENT

#define DUNE_SIMD_VALUEPROXY_ASSIGNMENT (   OP)
Value:
template<class T, \
class = decltype(std::declval<value_type&>() OP \
autoCopy(std::declval<T>()) )> \
ValueProxy operator OP(T &&o) && \
{ \
value_type x = get(); \
x OP autoCopy(std::forward<T>(o)); \
set(x); \
return { idx_, vec_ }; \
}
STL namespace.

◆ DUNE_SIMD_VALUEPROXY_BINARY

#define DUNE_SIMD_VALUEPROXY_BINARY (   OP)