3 #ifndef DUNE_COMMON_SIMD_IO_HH 4 #define DUNE_COMMON_SIMD_IO_HH 17 #include <type_traits> 32 Inserter(
const T &value) : value_(value) {}
34 template<
class Stream,
35 class = std::enable_if_t<std::is_base_of<std::ios_base,
37 friend Stream&
operator<<(Stream &out,
const Inserter &ins)
39 const char *sep =
"<";
50 template<class V, class = std::enable_if_t<Simd::lanes<V>() != 1> > 51 Inserter<V> io(const V &v) 56 template<class V, class = std::enable_if_t<Simd::lanes<V>() == 1> > 57 Simd::Scalar<V> io(const V &v) 59 return Simd::lane(0, v); 92 return SimdImpl::Inserter<V>{ v }; 108 return SimdImpl::io(v); 118 #endif // DUNE_COMMON_SIMD_IO_HH std::ostream & operator<<(std::ostream &s, const bigunsignedint< k > &x)
Definition: bigunsignedint.hh:301
constexpr std::size_t lanes()
Number of lanes in a SIMD type.
Definition: simd/interface.hh:305
decltype(auto) lane(std::size_t l, V &&v)
Extract an element of a SIMD type.
Definition: simd/interface.hh:324
constexpr AutonomousValue< T > autoCopy(T &&v)
Autonomous copy of an expression's value for use in auto type deduction.
Definition: typetraits.hh:650
Utilities for reduction like operations on ranges.
Dune namespace
Definition: alignedallocator.hh:12
static constexpr IntegralRange< std::decay_t< T > > range(T &&from, U &&to) noexcept
free standing function for setting up a range based for loop over an integer range for (auto i: range...
Definition: rangeutilities.hh:288
Traits for type conversions and type information.
Include file for users of the SIMD abstraction layer.