|
|
constexpr | vector () |
| | Default constructor sets all entries to zero.
|
| template<typename other_t> |
| constexpr auto | compare (const other_t &rhs) const noexcept |
| | Elementwise comparison.
|
| constexpr const auto & | get () const |
| | Return the underlying storage array.
|
| template<typename other_t> |
| constexpr bool | operator!= (const other_t &rhs) const noexcept |
| | Inequality operator.
|
| constexpr decltype(auto) | operator*= (scalar_type factor) noexcept |
| | Operator*=.
|
template<std::size_t M>
requires (vector<N, scalar_t, array_t>::simd_size() == vector<M, scalar_t, array_t>::simd_size()) |
| constexpr const vector & | operator= (const vector< M, scalar_t, array_t > &lhs) |
| | Assignment operator from a vector with the same underlying storage.
|
template<typename... Scalars>
requires (concepts::simd_scalar<scalar_t> && (sizeof...(Scalars) == N) && ((concepts::simd_scalar<Scalars> || std::convertible_to<Scalars, scalar_t>) && ...)) |
| constexpr | vector (Scalars &&...scals) |
| | Construct from element values vals .
|
template<typename... Values>
requires (!concepts::simd_scalar<scalar_t> && (sizeof...(Values) > 1) && ((concepts::value<Values> || std::convertible_to<Values, scalar_t>) && ...)) |
| constexpr | vector (Values &&...vals) |
| | In order to avoid uninitialized values, which deteriorate the performance in explicitly vectorized code, the underlying data array is filled with zeroes if too few arguments are given.
|
| constexpr | vector (array_type &&vals) |
| | Construct from existing array storage vals.
|
| constexpr | vector (const array_type &vals) |
| constexpr | operator array_type & () |
| | Conversion operator from wrapper to underlying data array.
|
| constexpr | operator const array_type & () const |
| | Convert the wrapper to its underlying const data array.
|
| constexpr decltype(auto) | operator[] (std::size_t i) |
| | Subscript operator[].
|
| constexpr decltype(auto) | operator[] (std::size_t i) const |
template<std::size_t N, concepts::scalar scalar_t, template< typename, std::size_t > class array_t>
class detray::algebra::storage::vector< N, scalar_t, array_t >
Vector wrapper for AoS vs interleaved SoA data.
scalar_t can e.g. be a SIMD vector.
template<std::size_t N, concepts::scalar scalar_t, template< typename, std::size_t > class array_t>
template<typename... Scalars>
requires (concepts::simd_scalar<scalar_t> && (sizeof...(Scalars) == N) && ((concepts::simd_scalar<Scalars> || std::convertible_to<Scalars, scalar_t>) && ...))
Construct from element values vals .
Construct vector in SoA layout from simd scalars
- Parameters
-
| scals | Element values, one for each logical vector component. |
template<std::size_t N, concepts::scalar scalar_t, template< typename, std::size_t > class array_t>
template<typename... Values>
requires (!concepts::simd_scalar<scalar_t> && (sizeof...(Values) > 1) && ((concepts::value<Values> || std::convertible_to<Values, scalar_t>) && ...))
In order to avoid uninitialized values, which deteriorate the performance in explicitly vectorized code, the underlying data array is filled with zeroes if too few arguments are given.
- Parameters
-
| vals | Element values; any unused storage lanes are initialized to zero where supported by the storage size. |