Go to the documentation of this file. 1 #ifndef DUNE_COMMON_SIMD_IO_HH
2 #define DUNE_COMMON_SIMD_IO_HH
15 #include <type_traits>
32 template<
class Stream,
33 class = std::enable_if_t<std::is_base_of<std::ios_base,
37 const char *sep =
"<";
48 template<class V, class = std::enable_if_t<Simd::lanes<V>() != 1> >
49 Inserter<V> io(const V &v)
54 template<class V, class = std::enable_if_t<Simd::lanes<V>() == 1> >
55 Simd::Scalar<V> io(const V &v)
57 return Simd::lane(0, v);
90 return SimdImpl::Inserter<V>{ v };
106 return SimdImpl::io(v);
116 #endif // DUNE_COMMON_SIMD_IO_HH
constexpr std::size_t lanes()
Number of lanes in a SIMD type.
Definition: simd/interface.hh:303
Include file for users of the SIMD abstraction layer.
Inserter(const T &value)
Definition: io.hh:30
static StaticIntegralRange< T, to, from > range(std::integral_constant< T, from >, std::integral_constant< T, to >) noexcept
Definition: rangeutilities.hh:297
Traits for type conversions and type information.
constexpr AutonomousValue< T > autoCopy(T &&v)
Autonomous copy of an expression's value for use in auto type deduction.
Definition: typetraits.hh:723
decltype(auto) lane(std::size_t l, V &&v)
Extract an element of a SIMD type.
Definition: simd/interface.hh:322
friend Stream & operator<<(Stream &out, const Inserter &ins)
Definition: io.hh:35
Utilities for reduction like operations on ranges.
Dune namespace.
Definition: alignedallocator.hh:13