Union ScalarToSimd#

Union Documentation#

union ScalarToSimd#
#include <vectorImpl.hpp>

A union mapping N scalars to an array of SIMD packets. The number of packets stored is equal to \((N + L - 1) / L\), where \(L\) is the packet width of the scalar type.

Template Parameters
  • Scalar_ – The scalar type to store

  • N – The number of scalars to store

Public Types

using Scalar = Scalar_#
using Packet = typename typetraits::TypeInfo<Scalar>::Packet#

Public Members

std::array<Scalar, N> scalar#
std::array<Packet, length> simd#

Public Static Attributes

static constexpr size_t packetWidth = typetraits::TypeInfo<Scalar>::packetWidth#
static constexpr size_t length = (N + packetWidth - 1) / packetWidth#