boost::simd::pack< T, N, ABI > Class Template Reference

Description

template<typename T, std::size_t N, typename ABI>
class boost::simd::pack< T, N, ABI >

High-level interface for manipulating SIMD data.

For a given pair T and N, provides an interface to manipulate SIMD data with the best storage possible depending on your hardware.

Precondition
N must be a power of two.
T models Vectorizable
Template Parameters
TType of the stored elements
NNumber of element stored
ABIBinary flag to prevent ABI issue

Public Types

template<typename U >
using rebind = pack< U, N >
 pack type rebinding alias
 
template<std::size_t M>
using resize = pack< T, M >
 pack type resizing alias
 
template<typename U , std::size_t M>
using retype = pack< U, M >
 pack type retyping alias
 

Public Member Functions

 pack () noexcept
 Default constructor. More...
 
 pack (pack const &rhs) noexcept
 Copy constructor.
 
 pack (T const *ptr) noexcept
 Construct a pack from aligned, contiguous memory. More...
 
template<typename U , typename = typename std::enable_if< !std::is_same < storage_type , std::array<U,N> >::value >::type>
 pack (std::array< U, N > const &a)
 Construct a pack from a standard array of element. More...
 
template<typename Iterator , typename = typename std::enable_if<is_iterator<Iterator>::value>::type>
 pack (Iterator b, Iterator e)
 Construct a pack from a range of element. More...
 
template<typename T0 , typename T1 , typename... Ts>
 pack (T0 const &v0, T1 const &v1, Ts const &... vn)
 Construct a pack from a set of scalar values. More...
 
template<typename U , typename = typename std::enable_if< !std::is_pointer<U>::value >::type, typename = typename std::enable_if<std::is_convertible<U, value_type>::value>::type>
 pack (U const &value) noexcept
 Construct a pack by replicating a scalar value. More...
 
template<typename U , typename = typename std::enable_if<std::is_convertible<U, value_type>::value>::type>
packoperator= (U const &value) noexcept
 Scalar assignment operator.
 
packoperator= (pack const &rhs) noexcept
 Pack assignment operator.
 
 pack (storage_type const &reg) noexcept
 Conversion from underlying storage data.
 
packoperator= (storage_type const &reg) noexcept
 Assignment from underlying storage data.
 
 operator storage_type () const noexcept
 Conversion to underlying storage data.
 
storage_type & storage () noexcept
 Get reference to internal storage.
 
storage_type const & storage () const noexcept
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
reference operator[] (std::size_t i)
 Random-access to the pack elements. More...
 
const_reference operator[] (std::size_t i) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<std::uint64_t Index>
value_type operator[] (tt::integral_constant< std::uint64_t, Index > const &)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<std::uint64_t Index>
value_type operator[] (tt::integral_constant< std::uint64_t, Index > const &) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
iterator begin () noexcept
 Returns an iterator to the beginning of the pack.
 
const_iterator begin () const noexcept
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
iterator end () noexcept
 Returns an iterator to the end of the pack.
 
const_iterator end () const noexcept
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
const_iterator cbegin () const noexcept
 Returns a constant iterator to the beginning of the pack.
 
const_iterator cend () const noexcept
 Returns a constant iterator to the end of the pack.
 
reverse_iterator rbegin () noexcept
 Returns a reverse iterator to the beginning of the pack.
 
const_reverse_iterator rbegin () const noexcept
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
reverse_iterator rend () noexcept
 Returns a reverse iterator to the end of the pack.
 
const_reverse_iterator rend () const noexcept
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
const_reverse_iterator crbegin () const noexcept
 Returns a constant reverse iterator to the beginning of the pack.
 
const_reverse_iterator crend () const noexcept
 Returns a constant reverse iterator to the end of the pack.
 
bool empty () const noexcept
 Empty status for pack.
 
void swap (pack &rhs) noexcept
 Swap data between two packs.
 

Static Public Member Functions

static size_type size () noexcept
 Retrieve the pack's cardinal, i.e the number of element in the pack.
 
static size_type max_size () noexcept
 Retrieve the pack's maximum size, i.e the number of element in the pack.