vir-simd 0.4.189
Parallelism TS 2 extensions and simd fallback implementation
Loading...
Searching...
No Matches
vir::simd_tuple< T, N > Class Template Reference

simd-like interface for tuples of vectorized data members of T. More...

#include <simdize.h>

Public Types

using value_type = T
 The element type of this simd-like type.
 
using mask_type = typename std::tuple_element_t<0, tuple_type>::mask_type
 The associated simd_mask type.
 

Public Member Functions

template<reflectable_struct U>
requires (struct_size_v<U> == struct_size_v<T> and detail::test_all_of<std::is_constructible, std::tuple_element, tuple_type, struct_element, U>(tuple_size_idx_seq).value)
constexpr explicit (not detail::test_all_of< std::is_convertible, struct_element, U, std::tuple_element, tuple_type >(tuple_size_idx_seq).value) simd_tuple(const U &init)
 
template<std::contiguous_iterator It, typename Flags = stdx::element_aligned_tag>
requires std::same_as<std::iter_value_t<It>, T>
constexpr simd_tuple (It it, Flags={})
 
template<std::contiguous_iterator It, typename Flags = stdx::element_aligned_tag>
requires std::output_iterator<It, T>
constexpr void copy_to (It it, Flags={}) const
 

Static Public Attributes

static constexpr auto size = vir::cw<N>
 The number of elements (of value_type) contained in objects of this type.
 

Detailed Description

template<reflectable_struct T, int N>
requires requires { typename detail::make_simd_tuple<T, N>::type; }
class vir::simd_tuple< T, N >

simd-like interface for tuples of vectorized data members of T.

Warning
Do not use this class template directly, use simdize instead.

Constructor & Destructor Documentation

◆ simd_tuple()

template<reflectable_struct T, int N>
template<std::contiguous_iterator It, typename Flags = stdx::element_aligned_tag>
requires std::same_as<std::iter_value_t<It>, T>
vir::simd_tuple< T, N >::simd_tuple ( It it,
Flags = {} )
inlineconstexpr

Copies all values from the range starting at it into *this.

Precondition: [it, it + N) is a valid range.

Member Function Documentation

◆ explicit()

template<reflectable_struct T, int N>
template<reflectable_struct U>
requires (struct_size_v<U> == struct_size_v<T> and detail::test_all_of<std::is_constructible, std::tuple_element, tuple_type, struct_element, U>(tuple_size_idx_seq).value)
vir::simd_tuple< T, N >::explicit ( not detail::test_all_of< std::is_convertible, struct_element, U, std::tuple_element, tuple_type >(tuple_size_idx_seq). value) const &
inlineconstexpr

Constructs from a compatible aggregate. Potentially broadcasts all or some elements.

◆ copy_to()

template<reflectable_struct T, int N>
template<std::contiguous_iterator It, typename Flags = stdx::element_aligned_tag>
requires std::output_iterator<It, T>
void vir::simd_tuple< T, N >::copy_to ( It it,
Flags = {} ) const
inlineconstexpr

Copies all values from *this to the range starting at it.

Precondition: [it, it + N) is a valid range.


The documentation for this class was generated from the following file: