Argon 0.1.0
Loading...
Searching...
No Matches
Argon< ScalarType > Class Template Reference
Inheritance diagram for Argon< ScalarType >:
Collaboration diagram for Argon< ScalarType >:

Public Types

using vector_type = simd::Vec128_t<ScalarType>
using lane_type = const argon::Lane<vector_type>
using dot_type = std::conditional_t<std::is_signed_v<ScalarType>, int32_t, uint32_t>
 The 32-bit accumulator of DotProduct: int32_t for signed lanes, uint32_t for unsigned.
using dot_long_type = std::conditional_t<std::is_signed_v<ScalarType>, int64_t, uint64_t>
 The 64-bit accumulator of DotProductLong and DotProductRoundHigh.
Public Types inherited from argon::Vector< simd::Vec128_t< ScalarType > >
using const_lane_type
 The type of a single lane of the SIMD vector.
using lane_type
 The type of a single lane of the SIMD vector.
using scalar_type
 The scalar type of the SIMD vector.
using vector_type
 The SIMD vector type.
using argon_type
 The Argon type for the SIMD vector.
using mask_type
 The mask vector type (all ones / all zeros per lane), see Predicate::ToMask.
using argon_bool_type
 The type comparisons return.
using offset_type
 Per-lane gather/scatter offsets.

Public Member Functions

constexpr Argon ()=default
 Leave the lanes uninitialised; value-initialisation (Argon<T>{}) zeroes them.
constexpr Argon (vector_type vector)
 Construct from the underlying intrinsic vector.
constexpr Argon (typename T::scalar_type scalar)
 Duplicate a scalar across every lane.
template<size_t LaneIndex>
constexpr Argon (argon::ConstLane< LaneIndex, vector_type > lane)
 Duplicate lane LaneIndex of lane's vector across every lane.
template<typename... ArgTypes>
constexpr Argon (ArgTypes... args)
 Construct from one value per lane, each converted to the lane type.
ace Argon (argon::Vector< vector_type > vec)
 Construct from an underlying argon::Vector.
ace Argon (std::array< ScalarType, 4 > value_list)
 Construct from four values: lane i takes value_list[i].
template<typename S = ScalarType>
ace Argon (ArgonHalf< S > low, ArgonHalf< S > high)
 Construct by combining a low and high 64-bit half-vector.
ace Argon (argon::Lane< vector_type > b)
ace Argon (argon::ConstLane< 0, vector_type > b)
template<simd::is_vector_type intrinsic_type>
ace Argon (argon::Lane< intrinsic_type > b)
template<typename new_scalar_type>
ace Argon< new_scalar_type > As () const
 Reinterpret the vector bits as a vector of a different element type.
ace Argon< ScalarType > Reverse ()
 Reverse the order of all elements across the full 128-bit vector.
template<typename U>
ace Argon< ScalarType > MultiplyAddLong (ArgonHalf< U > b, ArgonHalf< U > c)
 Multiply two narrower half-vectors and add the widened result to this vector (vector × vector).
template<typename U, typename C>
ace Argon< ScalarType > MultiplyAddLong (ArgonHalf< U > b, C c)
 Multiply two narrower vectors and add the widened result (vector × raw intrinsic).
template<typename U>
ace Argon< ScalarType > MultiplyAddLong (ArgonHalf< U > b, U c)
 Multiply a half-vector by a scalar and add the widened result (vector × scalar).
template<typename U>
ace Argon< ScalarType > MultiplyAddLong (ArgonHalf< U > b, typename ArgonHalf< U >::lane_type c)
 Multiply a half-vector by a lane and add the widened result (vector × lane).
template<typename U>
ace Argon< ScalarType > MultiplySubtractLong (ArgonHalf< U > b, ArgonHalf< U > c)
 Multiply two narrower half-vectors and subtract the widened result from this vector (vector × vector).
template<typename U>
ace Argon< ScalarType > MultiplySubtractLong (ArgonHalf< U > b, U c)
 Multiply a half-vector by a scalar and subtract the widened result (vector × scalar).
template<typename U>
ace Argon< ScalarType > MultiplySubtractLong (ArgonHalf< U > b, typename ArgonHalf< U >::lane_type c)
 Multiply a half-vector by a lane and subtract the widened result (vector × lane).
ace auto AddNarrow (Argon< ScalarType > b) const
 Add and narrow: add b to this vector and truncate each lane to the next-smaller type.
ace auto AddRoundNarrow (Argon< ScalarType > b) const
 Add, round, and narrow: add b, round the result, and truncate to the next-smaller type.
ace auto SubtractNarrow (Argon< ScalarType > b) const
 Subtract and narrow: subtract b and truncate each lane to the next-smaller type.
ace auto SubtractRoundNarrow (Argon< ScalarType > b) const
 Subtract, round, and narrow: subtract b, round the result, and truncate to the next-smaller type.
template<size_t n>
ace auto ShiftRightNarrow () const
 Shift each lane right by n bits and narrow the result to the next-smaller type.
template<size_t n>
ace auto ShiftRightSaturateNarrow () const
 Shift right, saturate, and narrow: shift each lane right by n bits with unsigned saturation.
template<size_t n>
ace auto ShiftRightRoundSaturateNarrow () const
 Shift right, round, saturate, and narrow.
template<size_t n>
ace auto ShiftRightRoundNarrow () const
 Shift right, round, and narrow.
ace auto Narrow () const
 Truncate each lane to the next-smaller element type (no saturation).
ace auto SaturateNarrow () const
 Saturate and narrow each lane to the next-smaller element type.
template<typename NextSmallerType>
ace Argon< ScalarType > MultiplyDoubleAddSaturateLong (ArgonHalf< NextSmallerType > b, ArgonHalf< NextSmallerType > c)
 Multiply, double, add, and saturate long: this + saturate(2 * b * c) widening to ScalarType.
ace ArgonHalf< ScalarType > GetHigh () const
 Return the upper 64 bits as an ArgonHalf.
ace ArgonHalf< ScalarType > GetLow () const
 Return the lower 64 bits as an ArgonHalf.
template<typename S = ScalarType>
ace Argon< argon::helpers::NextLarger_t< S > > WidenBottom () const
 Widen the even (bottom) lanes to the next larger type. MVE: vmovlb.
template<typename S = ScalarType>
ace Argon< argon::helpers::NextLarger_t< S > > WidenTop () const
 Widen the odd (top) lanes to the next larger type. MVE: vmovlt.
template<int n, typename S = ScalarType>
ace Argon< argon::helpers::NextLarger_t< S > > ShiftLeftLongBottom () const
 Widen the even (bottom) lanes and shift them left by n. MVE: vshllb.
template<int n, typename S = ScalarType>
ace Argon< argon::helpers::NextLarger_t< S > > ShiftLeftLongTop () const
 Widen the odd (top) lanes and shift them left by n. MVE: vshllt.
template<typename S = ScalarType>
ace Argon< argon::helpers::NextLarger_t< S > > MultiplyLongBottom (Argon< S > b) const
 Multiply the even (bottom) lanes, producing full-width products. MVE: vmullb.
template<typename S = ScalarType>
ace Argon< argon::helpers::NextLarger_t< S > > MultiplyLongTop (Argon< S > b) const
 Multiply the odd (top) lanes, producing full-width products. MVE: vmullt.
template<typename S = ScalarType>
ace Argon< argon::helpers::NextSmaller_t< S > > NarrowBottom (Argon< argon::helpers::NextSmaller_t< S > > dest) const
 Narrow each lane (keeping its low half) into the even (bottom) lanes of dest.
template<typename S = ScalarType>
ace Argon< argon::helpers::NextSmaller_t< S > > NarrowTop (Argon< argon::helpers::NextSmaller_t< S > > dest) const
 Narrow each lane (keeping its low half) into the odd (top) lanes of dest.
template<typename S = ScalarType>
ace Argon< argon::helpers::NextSmaller_t< S > > SaturateNarrowBottom (Argon< argon::helpers::NextSmaller_t< S > > dest) const
 Narrow each lane with saturation into the even (bottom) lanes of dest. MVE: vqmovnb.
template<typename S = ScalarType>
ace Argon< argon::helpers::NextSmaller_t< S > > SaturateNarrowTop (Argon< argon::helpers::NextSmaller_t< S > > dest) const
 Narrow each lane with saturation into the odd (top) lanes of dest. MVE: vqmovnt.
 ARGON_SHIFT_NARROW (ShiftRightRoundNarrowBottom, shift_right_narrow_round_bottom, InsertBottom, this->template ShiftRightRound< n >()) ARGON_SHIFT_NARROW(ShiftRightRoundNarrowTop
 Shift each lane right by n and narrow it into the even (bottom) lanes of dest. MVE: vshrnb.
this template ShiftRightRound ()) ARGON_SHIFT_NARROW(ShiftRightSaturateNarrowBottom
 Shift each lane right by n and narrow it with saturation into the bottom lanes of dest.
this template SaturateToNarrow (this->template ShiftRight< n >())) ARGON_SHIFT_NARROW(ShiftRightSaturateNarrowTop
 Shift each lane right by n and narrow it with saturation into the top lanes of dest. MVE: vqshrnt.
this template SaturateToNarrow (this->template ShiftRight< n >())) ARGON_SHIFT_NARROW(ShiftRightRoundSaturateNarrowBottom
 Shift each lane right by n with rounding and narrow it with saturation into the bottom lanes of dest.
this template SaturateToNarrow (this->template ShiftRightRound< n >())) ARGON_SHIFT_NARROW(ShiftRightRoundSaturateNarrowTop
 Shift each lane right by n with rounding and narrow it with saturation into the top lanes of dest.
this template SaturateToNarrow (this->template ShiftRightRound< n >())) using DotForm
 The forms of DotProduct and friends.
template<DotForm form = DotForm::Plain, typename S = ScalarType>
ace dot_type DotProduct (Argon< S > b, dot_type acc=0) const
 Sum acc and the products of every lane of this vector with the matching lane of b.
template<DotForm form = DotForm::Plain, typename S = ScalarType>
ace dot_long_type DotProductLong (Argon< S > b, dot_long_type acc=0) const
 As DotProduct, with products and sum in 64 bits.
template<DotForm form = DotForm::Plain, typename S = ScalarType>
ace dot_long_type DotProductRoundHigh (Argon< S > b, dot_long_type acc=0) const
 As DotProductLong, but with each product divided by 256 and rounded: acc + Σ ⌊(pᵢ + 128) / 256⌋.
template<typename S = ScalarType>
ace std::pair< dot_type, dot_type > ComplexDotProduct (Argon< S > b) const
 The complex dot product Σ a·b of vectors of interleaved (real, imaginary) pairs, as {real, imaginary}.
template<typename N, typename S = ScalarType>
void StoreNarrow (N *ptr) const
 Store the low bits of each lane as the narrower integer type N. MVE: vstrb / vstrh.
template<typename N, typename S = ScalarType>
void StoreNarrow (N *ptr, typename Argon< S >::argon_bool_type active) const
 Store the low bits of the active lanes as N; memory for inactive lanes is not written.
template<typename N, typename S = ScalarType, typename... PredicateType>
void StoreScatterOffsetIndexNarrow (N *base, typename Argon< S >::offset_type offsets, PredicateType... active) const
 Scatter the low bits of each lane as N to base[offsets[i]]. MVE: vstrb / vstrh scatter.
template<typename N, typename S = ScalarType, typename... PredicateType>
void StoreScatterOffsetBytesNarrow (N *base, typename Argon< S >::offset_type offsets, PredicateType... active) const
 Scatter the low bits of each lane as N to base plus a byte offset per lane.
template<typename S = ScalarType>
ace Argon< S > ComplexAddRotate90 (Argon< S > b) const
 a + i·b for each complex pair: re = a.re − b.im, im = a.im + b.re. MVE / FCMA: vcadd #90.
template<typename S = ScalarType>
ace Argon< S > ComplexAddRotate270 (Argon< S > b) const
 a − i·b for each complex pair: re = a.re + b.im, im = a.im − b.re. MVE / FCMA: vcadd #270.
template<typename S = ScalarType>
ace Argon< S > ComplexAddRotate90Halve (Argon< S > b) const
 (a + i·b) / 2 without overflow. Signed integer lanes. MVE: vhcadd #90.
template<typename S = ScalarType>
ace Argon< S > ComplexAddRotate270Halve (Argon< S > b) const
 (a − i·b) / 2 without overflow. Signed integer lanes. MVE: vhcadd #270.
template<int rotation, typename S = ScalarType>
ace Argon< S > ComplexMultiplyAdd (Argon< S > b, Argon< S > c) const
 Accumulate one rotation of the complex product of b and c into this vector, exactly as vcmla.
template<typename S = ScalarType>
ace Argon< S > ComplexMultiply (Argon< S > b) const
 The complex product a·b of each pair. Float lanes. MVE / FCMA: two vcmla.
template<typename S = ScalarType>
ace Argon< S > ComplexMultiplyConjugate (Argon< S > b) const
 The complex product a·conj(b) of each pair. Float lanes. MVE / FCMA: two vcmla.
template<typename S = ScalarType>
ace Argon< S > BitReverse (int bits) const
 The low bits bits of each lane, reversed; the other bits are zero.
template<typename S = ScalarType>
ace Argon< S > AddWithCarry (Argon< S > b, uint32_t &carry) const
 Add b and carry (0 or 1) to the vector as 128-bit numbers; carry becomes the carry out.
template<typename S = ScalarType>
ace Argon< S > SubtractWithBorrow (Argon< S > b, uint32_t &borrow) const
 Subtract b and borrow (0 or 1) from the vector as 128-bit numbers; borrow becomes the borrow out.
template<int n, typename S = ScalarType>
ace Argon< S > ShiftLeftWithCarry (uint32_t &carry) const
 Shift the whole vector, as a 128-bit number, left by n bits: the low n bits of carry shift in at the bottom, and carry becomes the n bits shifted out of the top.
template<typename U>
ace Argon< U > ConvertTo () const
 Convert each lane to a different element type.
template<typename U, int fracbits>
ace Argon< U > ConvertTo () const
 Convert each lane to a different type using a fixed-point fractional bit count.
ace Argon< ScalarType > Reverse () const
 Reverse the order of all elements in the 128-bit vector.
template<typename CommutableOpType>
ScalarType Reduce (CommutableOpType op) const
 Fold all lanes into a single scalar using a commutative binary operation.
ScalarType ReduceAdd () const
 Sum all lanes and return the scalar result.
ScalarType ReduceAdd (typename T::argon_bool_type active) const
 Sum the active lanes and return the scalar result.
ScalarType ReduceMax () const
 Return the maximum value across all lanes.
ScalarType ReduceMin () const
 Return the minimum value across all lanes.
template<typename S = ScalarType>
ace std::make_unsigned_t< S > ReduceMaxAbs (std::make_unsigned_t< S > init=0) const
 The largest magnitude across the lanes, or init if that is larger: a peak meter.
template<typename S = ScalarType>
ace std::make_unsigned_t< S > ReduceMinAbs (std::make_unsigned_t< S > init=std::numeric_limits< std::make_unsigned_t< S > >::max()) const
 The smallest magnitude across the lanes, or init if that is smaller.
template<typename S = ScalarType>
ace Argon< S > MaxAbs (Argon< std::make_signed_t< S > > b) const
 Each lane's maximum of this (unsigned) vector and the magnitude of b: running peak tracking, peak = peak.MaxAbs(samples).
template<typename S = ScalarType>
ace Argon< S > MinAbs (Argon< std::make_signed_t< S > > b) const
 Each lane's minimum of this (unsigned) vector and the magnitude of b. MVE: vmina.
ace Argon< ScalarType > SwapDoublewords () const
 Swap the upper and lower 64-bit halves of the vector.
Public Member Functions inherited from argon::Vector< simd::Vec128_t< ScalarType > >
constexpr Vector ()=default
 The default constructor for the Vector class.
constexpr Vector (Vector &&other)=default
 Move constructor for the Vector class.
constexpr Vector (const Vector &other)=default
 Copy constructor for the Vector class.
constexpr Vector & operator= (Vector &&other)=default
 Move assignment operator for the Vector class.
constexpr Vector & operator= (const Vector &other)=default
 Copy assignment operator for the Vector class.
ace Vector (simd::Vec128_t< ScalarType > vector)
 Constructs a Vector from a SIMD vector type.
ace Vector (scalar_type scalar)
 Constructs a Vector from a scalar value.
ace Vector (argon::Lane< simd::Vec128_t< ScalarType > > lane)
 Constructs a Vector from a Lane object.
ace Vector (argon::ConstLane< LaneIndex, simd::Vec128_t< ScalarType > > lane)
 Constructs a Vector from a ConstLane object.
ace Vector (ArgTypes... args)
 Constructs a Vector from one value per lane.
ace argon_type operator- () const
 Negate the SIMD vector and return the result.
ace argon_type operator+ (argon_type b) const
 Add a vector and return the result.
ace argon_type operator- (argon_type b) const
 Subtract a vector and return the result.
ace argon_type operator* (argon_type b) const
 Multiply a vector and return the result.
ace argon_type operator/ (argon_type b) const
 Divide a vector and return the result.
ace argon_bool_type operator== (argon_type b) const
 Compare two vectors for equality.
ace argon_bool_type operator!= (argon_type b) const
 Compare two vectors for inequality.
ace argon_bool_type operator< (argon_type b) const
 Compare two vectors, checking if this vector is less than the other.
ace argon_bool_type operator> (argon_type b) const
 Compare two vectors, checking if this vector is greater than the other.
ace argon_bool_type operator<= (argon_type b) const
 Compare two vectors, checking if this vector is less than or equal to the other.
ace argon_bool_type operator>= (argon_type b) const
 Compare two vectors, checking if this vector is greater than or equal to the other.
ace argon_type operator++ () const
 Increment the vector by 1 and return the result.
ace argon_type operator-- () const
 Decrement the vector by 1 and return the result.
ace argon_type operator& (argon_type b) const
 Bitwise AND two vectors and return the result.
ace argon_type operator| (argon_type b) const
 Bitwise OR two vectors and return the result.
ace argon_type operator^ (argon_type b) const
 Bitwise XOR two vectors and return the result.
ace argon_type operator~ () const
 Bitwise NOT the vector and return the result.
ace Lane< const simd::Vec128_t< ScalarType > > operator[] (const size_t i) const
 Access a lane of the vector by index.
ace lane_type operator[] (const size_t i)
 Access a lane of the vector by index.
ace argon_type operator>> (const int i) const
 Shift the elements of the vector to the right by a specified number of bits.
ace argon_type operator<< (const int i) const
 Shift the elements of the vector to the left by a specified number of bits.
constexpr simd::Vec128_t< ScalarType > vec () const
 Get the underlying SIMD vector.
constexpr operator simd::Vec128_t< ScalarType > () const
 Convert the vector to the underlying SIMD vector type.
ace std::array< scalar_type, lanes > to_array () const
 Convert the vector to an array of scalar values.
ace Lane< const simd::Vec128_t< ScalarType > > GetLane (const size_t i) const
 Get a single lane of the vector by index.
ace lane_type GetLane (const size_t i)
ace Lane< const simd::Vec128_t< ScalarType > > GetLane (const int i) const
 Get a single lane of the vector by index.
ace lane_type GetLane (const int i)
ace ConstLane< LaneIndex, const simd::Vec128_t< ScalarType > > GetLane () const
 Get a single lane of the vector by index.
ace const_lane_type< LaneIndex > GetLane ()
ace const_lane_type< lanes - 1 > LastLane ()
 Get the last lane of the vector.
ace argon_type ShiftRight (const int i) const
 Shift the elements of the vector to the right by a specified number of bits.
ace argon_type ShiftLeft (const int i) const
 Shift the elements of the vector to the left by a specified number of bits.
ace argon_type Negate () const
 Bitwise negate the vector and return the result.
ace argon_type Add (argon_type b) const
 Add two vectors.
ace argon_type AddHalve (argon_type b) const
 Adds two vectors, halving the result.
ace argon_type AddHalveRound (argon_type b) const
 Adds two vectors, halving and rounding the result.
ace argon_type AddSaturate (argon_type b) const
 Adds two vectors, saturating the result.
ace argon_type Subtract (argon_type b) const
 Subtract two vectors.
ace argon_type SubtractHalve (argon_type b) const
 Subtract two vectors, halving the result.
ace argon_type SubtractSaturate (argon_type b) const
 Subtract two vectors, saturating the result.
ace argon_type SubtractAbs (argon_type b) const
 Subtract two vectors, taking the absolute value of the result.
ace argon_type SubtractAbsAdd (argon_type b, argon_type c) const
 Subtract two vectors, taking the absolute value of the result and adding a third vector.
ace argon_type Multiply (argon_type b) const
 Multiply two vectors.
ace argon_type Multiply (scalar_type b) const
 Multiply a vector by a scalar value.
ace argon_type Multiply (lane_type b) const
 Multiply a vector by a lane value.
ace argon_type Multiply (const_lane_type< LaneIndex > b) const
 Multiply a vector by a lane value.
ace argon_type MultiplyAdd (argon_type b, argon_type c) const
 Multiply two vectors and add a third vector.
ace argon_type MultiplyAdd (argon_type b, scalar_type c) const
 Multiply a vector by a scalar value and add a third vector.
ace argon_type MultiplyAdd (scalar_type b, argon_type c) const
 Multiply a vector by a scalar value and add a third vector.
ace argon_type MultiplyAdd (argon_type b, lane_type c) const
 Multiply a vector by a lane value and add a third vector.
ace argon_type MultiplyAdd (lane_type b, argon_type c) const
 Multiply a vector by a lane value and add a third vector.
ace argon_type MultiplyAdd (argon_type b, const_lane_type< LaneIndex > c) const
 Multiply a vector by a lane value and add a third vector.
ace argon_type MultiplyAdd (const_lane_type< LaneIndex > b, argon_type c) const
 Multiply a vector by a lane value and add a third vector.
ace argon_type MultiplySubtract (argon_type b, argon_type c) const
 Multiply two vectors and subtract from a third vector.
ace argon_type MultiplySubtract (argon_type b, scalar_type c) const
 Multiply a vector by a scalar value and subtract from a third vector.
ace argon_type MultiplySubtract (scalar_type b, argon_type c) const
 Multiply a vector by a scalar value and subtract from a third vector.
ace argon_type MultiplySubtract (argon_type b, lane_type c) const
 Multiply a vector by a lane value and subtract from a third vector.
ace argon_type MultiplyFixedQMax (argon_type v) const
 Multiply two QMax fixed-point vectors, returning a fixed-point product.
ace argon_type MultiplyFixedQMax (scalar_type s) const
 Multiply a QMax fixed-point vector by a scalar value, returning a fixed-point product.
ace argon_type MultiplyFixedQMax (lane_type l) const
 Multiply a QMax fixed-point vector by a lane value, returning a fixed-point product.
ace argon_type MultiplyRoundFixedQMax (argon_type v) const
 Multiply two fixed-point vectors, returning a fixed-point product.
ace argon_type MultiplyRoundFixedQMax (scalar_type s) const
 Multiply a fixed-point vector by a scalar value, returning a fixed-point product.
ace argon_type MultiplyRoundFixedQMax (lane_type l) const
 Multiply a fixed-point vector by a lane value, returning a fixed-point product.
ace argon_type Absolute () const
 Get the absolute value of the vector.
ace argon_type ReciprocalEstimate () const
 1 / value, using an estimate for speed
ace argon_type ReciprocalSqrtEstimate () const
 1 / sqrt(value), using an estimate for speed
ace argon_type ReciprocalStep (argon_type b) const
 Newton-Raphson step for reciprocal refinement: (2 - a * b) / 2.
ace argon_type ReciprocalSqrtStep (argon_type b) const
 Newton-Raphson step for reciprocal-sqrt refinement: (3 - a * b) / 2.
ace argon_type ReciprocalEstimateRefine (int n_iters=1) const
 Compute a refined reciprocal estimate using Newton-Raphson iterations.
ace argon_type ReciprocalSqrtEstimateRefine (int n_iters=1) const
 Compute a refined reciprocal-sqrt estimate using Newton-Raphson iterations.
ace argon_type MultiplyAddFixedQMax (argon_type b, arg_type c) const
 Multiply-add three fixed-point vectors, returning a fixed-point sum.
ace argon_type MultiplyRoundAddFixedQMax (argon_type b, arg_type c) const
 Multiply-round-add three fixed-point vectors, returning a fixed-point sum.
ace argon_type Divide (argon_type b) const
 Divide two vectors.
ace argon_type Modulo (argon_type b) const
 Get the modulo of two vectors.
ace argon_type Modulo (scalar_type b) const
 Get the modulo of a vector and a scalar value.
ace argon_type Max (argon_type b) const
 Compare the lanes of two vectors, copying the larger of each lane to the result.
ace argon_type Min (argon_type b) const
 Compare the lanes of two vectors, copying the smaller of each lane to the result.
ace argon_type MaxNumber (argon_type b) const
 The larger of each lane by IEEE 754 maxNum, as Arm's vmaxnm: a quiet NaN in one operand gives the other (NaN only where both are), and +0 is larger than -0.
ace argon_type MinNumber (argon_type b) const
 The smaller of each lane by IEEE 754 minNum, as Arm's vminnm: a quiet NaN in one operand gives the other (NaN only where both are), and -0 is smaller than +0.
ace argon_type NumberMinMax (argon_type b) const
 MaxNumber/MinNumber from compares and selects, where there is no vmaxnm/vminnm.
ace argon_bool_type Equal (argon_type b) const
 Compare the lanes of two vectors, returning a predicate active where a == b.
ace argon_bool_type GreaterThanOrEqual (argon_type b) const
 Compare the lanes of two vectors, returning a predicate active where a is greater than or equal to b.
ace argon_bool_type LessThanOrEqual (argon_type b) const
 Compare the lanes of two vectors, returning a predicate active where a is less than or equal to b.
ace argon_bool_type GreaterThan (argon_type b) const
 Compare the lanes of two vectors, returning a predicate active where a is greater than b.
ace argon_bool_type LessThan (argon_type b) const
 Compare the lanes of two vectors, returning a predicate active where a is less than b.
ace argon_type ShiftLeft (helpers::ArgonFor_t< simd::make_signed_t< Bool_t< simd::Vec128_t< ScalarType > > > > b) const
 Shift the elemnets of the vector to the left by a specified number of bits.
ace argon_type ShiftLeft (std::make_signed_t< simd::Scalar_t< Bool_t< simd::Vec128_t< ScalarType > > > > n) const
 Shift the elements of the vector to the left by a specified number of bits.
ace argon_type ShiftByVector (int count) const
 vshl by count in every lane: left for positive counts, right (arithmetic or logical) for negative ones.
ace argon_type ShiftLeft () const
 Shift the elements of the vector to the left by a specified number of bits.
ace argon_type ShiftLeftSaturate (helpers::ArgonFor_t< simd::make_signed_t< Bool_t< simd::Vec128_t< ScalarType > > > > b) const
 Shift the elements of the vector to the left by a specified number of bits, saturating the result.
ace argon_type ShiftLeftRound (argon_type b) const
 Shift the elements of the vector to the left by a specified number of bits, rounding the result.
ace argon_type ShiftLeftRoundSaturate (argon_type b) const
 Shift the elements of the vector to the left by a specified number of bits, rounding and saturating the result.
ace argon_type ShiftLeftSaturate () const
 Shift the elements of the vector to the left by a specified number of bits, saturating the result.
ace argon_type ShiftLeftInsert (argon_type b) const
 Shift the elements of the vector to the left by a specified number of bits, and then OR the result with another vector masked to the number of shift bits.
ace argon_type ShiftRight () const
 Shift the elements of the vector to the right by a specified number of bits.
ace argon_type ShiftRightRound () const
 Shift the elements of the vector to the right by a specified number of bits, rounding the result.
ace argon_type ShiftRightAccumulate (argon_type b) const
 Shift the elements of the b vector to the right by a specified number of bits, and then add the result to this vector.
ace argon_type ShiftRightAccumulateRound (argon_type b) const
 Shift the elements of the b vector to the right by a specified number of bits, and then add the result to this vector.
ace argon_type ShiftRightInsert (argon_type b) const
 Shift the elements of the vector to the right by a specified number of bits, ORing the result with the vector masked to the number of shift bits.
ace argon_type LoadToLane (const scalar_type *ptr)
 Load a lane from a pointer.
ace void StoreTo (scalar_type *ptr) const
 Store the vector to a pointer.
ace void StoreTo (scalar_type *ptr, argon_bool_type active) const
 Store the active lanes of the vector to a pointer; memory for inactive lanes is not written.
ace void StoreScatterOffsetBytes (scalar_type *base, offset_type offsets) const
 Scatter the lanes to base plus a byte offset per lane.
ace void StoreScatterOffsetBytes (scalar_type *base, offset_type offsets, argon_bool_type active) const
 Scatter the active lanes to base plus a byte offset per lane; inactive lanes are not written.
ace void StoreScatterOffsetIndex (scalar_type *base, offset_type offsets) const
 Scatter the lanes to base[offsets[i]].
ace void StoreScatterOffsetIndex (scalar_type *base, offset_type offsets, argon_bool_type active) const
 Scatter the active lanes to base[offsets[i]]; inactive lanes are not written.
ace void StoreLaneTo (scalar_type *ptr)
 Store a lane of the vector to a pointer.
ace argon_type PairwiseAdd (argon_type b) const
 Pairwise ops.
ace argon_type PairwiseMax (argon_type b) const
 Select the maximum of each pair of lanes in the two vectors.
ace argon_type PairwiseMin (argon_type b) const
 Select the maximum of each pair of lanes in the two vectors.
ace argon_type BitwiseNot () const
 Bitwise ops.
ace argon_type BitwiseAnd (argon_type b) const
 Bitwise AND of the vector with another vector.
ace argon_type BitwiseOr (argon_type b) const
 Bitwise OR of the vector with another vector.
ace argon_type BitwiseXor (argon_type b) const
 Bitwise XOR of the vector with another vector.
ace argon_type BitwiseOrNot (argon_type b) const
 Bitwise OR of the vector with the NOT of another vector.
ace argon_type BitwiseAndNot (argon_type b) const
 Bitwise AND of the vector with the NOT of another vector.
ace argon_type BitwiseClear (argon_type b) const
 Bitwise AND of the vector with the NOT of another vector.
ace ArgType BitwiseSelect (ArgType true_value, ArgType false_value) const
 Bitwise select between two vectors, using the current vector as a mask.
ace ArgType Select (ArgType true_value, ArgType false_value) const
 Bitwise select between two vectors, using the current vector as a mask.
ace argon_bool_type CompareTestNonzero (argon_type b) const
 Compare the lanes of (a & b) with zero, returning a predicate active where they share a set bit.
ace argon_bool_type TestNonzero () const
 Return a predicate active where the lane is nonzero.
ace argon_type MultiplyAdd (argon_type b, argon_type c, argon_bool_type active) const
 MultiplyAdd under a predicate: lanes outside active keep this vector's value, the accumulator (as ACLE's vfmaq_m).
ace argon_type MultiplyAdd (argon_type b, scalar_type c, argon_bool_type active) const
 MultiplyAdd under a predicate: lanes outside active keep this vector's value, the accumulator (as ACLE's vfmaq_m).
ace argon_type MultiplySubtract (argon_type b, argon_type c, argon_bool_type active) const
 MultiplySubtract under a predicate: lanes outside active keep this vector's value (as ACLE's vfmsq_m).
ace argon_bool_type Equal (argon_type b, argon_bool_type active) const
 Compare only the lanes of active: a predicate active where active holds and a == b.
ace argon_bool_type GreaterThan (argon_type b, argon_bool_type active) const
 Compare only the lanes of active: a predicate active where active holds and a > b.
ace argon_bool_type GreaterThanOrEqual (argon_type b, argon_bool_type active) const
 Compare only the lanes of active: a predicate active where active holds and a >= b.
ace argon_bool_type LessThan (argon_type b, argon_bool_type active) const
 Compare only the lanes of active: a predicate active where active holds and a < b.
ace argon_bool_type LessThanOrEqual (argon_type b, argon_bool_type active) const
 Compare only the lanes of active: a predicate active where active holds and a <= b.
ace helpers::ArgonFor_t< simd::make_signed_t< Bool_t< simd::Vec128_t< ScalarType > > > > CountLeadingSignBits () const
 Count the number of consecutive bits following the sign bit that are set to the same value as the sign bit.
ace argon_type CountLeadingZeroBits () const
 Count the number of consecutive top bits that are set to zero.
ace argon_type CountActiveBits () const
 Count the number of bits that are set to one in the vector.
ace argon_type Popcount () const
 Count the number of bits that are set to one in the vector.
ace argon_type Extract (argon_type b) const
 Extract n elements from the lower end of the operand, and the remaining elements from the top end of this vector, combining them into the result vector.
ace argon_type Reverse64bit () const
ace argon_type Reverse32bit () const
ace argon_type Reverse16bit () const
ace std::array< argon_type, 2 > ZipWith (argon_type b) const
 Zip two vectors together, returning two vectors of pairs.
std::array< argon_type, 2 > UnzipWith (argon_type b)
 Unzip two vectors, returning two vectors of pairs.
std::array< argon_type, 2 > TransposeWith (argon_type b) const
 Perform a 2x2 matrix transpose on two vectors, returning two vectors of pairs.
ace argon_type map (FuncType body) const
ace argon_type map_with_index (FuncType body) const
ace argon_type map2 (argon_type other, FuncType body) const
ace argon_type each_lane (FuncType body)
ace argon_type each_lane_with_index (FuncType body)
ace void if_lane (FuncType true_branch)
ace void if_else_lane (FuncType true_branch, FuncType false_branch)
ace void if_lane_with_index (FuncType true_branch)
ace void if_else_lane_with_index (FuncType1 true_branch, FuncType2 false_branch)
ace bool any () const
 Whether any lane is nonzero.
ace bool all () const
 Whether every lane is nonzero.
std::tuple_element_t< Index, argon_type > get ()
constexpr operator simd::Vec128_t< ScalarType > () const
 Convert the vector to the underlying SIMD vector type.

Static Public Member Functions

static ace Argon< ScalarType > Combine (ArgonHalf< ScalarType > low, ArgonHalf< ScalarType > high)
 Combine two 64-bit half-vectors into a single 128-bit vector.
template<int step = 1, typename S = ScalarType>
static ace Argon< S > CircularIndices (uint32_t &offset, uint32_t size)
 The next lanes indices of a forward walk through a circular buffer of size elements.
template<int step = 1, typename S = ScalarType>
static ace Argon< S > CircularIndicesDown (uint32_t &offset, uint32_t size)
 The next lanes indices of a backward walk through a circular buffer of size elements.
template<typename N, typename S = ScalarType>
static ace Argon< S > LoadWiden (const N *ptr)
 Load lanes elements of the narrower integer type N and extend each to a lane. MVE: vldrb / vldrh.
template<typename N, typename S = ScalarType>
static ace Argon< S > LoadWiden (const N *ptr, typename Argon< S >::argon_bool_type active)
 Load and extend the active lanes; inactive lanes are zero and their memory is not read.
template<typename N, typename S = ScalarType, typename... PredicateType>
static ace Argon< S > LoadGatherOffsetIndexWiden (const N *base, typename Argon< S >::offset_type offsets, PredicateType... active)
 Gather base[offsets[i]] of the narrower type N, extending each to a lane. MVE: vldrb / vldrh gather.
template<typename N, typename S = ScalarType, typename... PredicateType>
static ace Argon< S > LoadGatherOffsetBytesWiden (const N *base, typename Argon< S >::offset_type offsets, PredicateType... active)
 Gather N from base plus a byte offset per lane, extending each to a lane.
Static Public Member Functions inherited from argon::Vector< simd::Vec128_t< ScalarType > >
static ace argon_type LoadScalar (const scalar_type *ptr)
 Constructs a Vector from a scalar pointer.
static ace argon_type FromScalar (scalar_type scalar)
 Constructs a Vector from a scalar value.
static ace argon_type FromLane (argon::Lane< IntrinsicType > lane)
 Constructs a Vector from a Lane object.
static ace argon_type FromLane (argon::ConstLane< LaneIndex, simd::Vec128_t< ScalarType > > lane)
 Constructs a Vector from a ConstLane object.
static ace argon_type Iota (scalar_type start)
 Constructs a Vector from an incrementing sequence.
static ace argon_type Generate (FuncType body)
 Constructs a Vector from a function that generates values.
static ace argon_type GenerateWithIndex (FuncType body)
 Constructs a Vector from a function that generates values with an index.
static ace argon_type Load (const scalar_type *ptr)
 Load a vector from a pointer.
static ace argon_type LoadCopy (const scalar_type *ptr)
 Load a vector from a pointer, duplicating the value across all lanes.
static ace argon_type Load (const scalar_type *ptr, argon_bool_type active)
 Load the active lanes of a vector from a pointer; inactive lanes are zero and their memory is not read.
static ace argon_type LoadGatherOffsetBytes (const scalar_type *base, offset_type offsets)
 Gather a vector from base plus a byte offset per lane.
static ace argon_type LoadGatherOffsetBytes (const scalar_type *base, offset_type offsets, argon_bool_type active)
 Gather the active lanes from base plus a byte offset per lane; inactive lanes are zero and not read.
static ace argon_type LoadGatherOffsetIndex (const scalar_type *base, offset_type offsets)
 Gather a vector from base[offsets[i]].
static ace argon_type LoadGatherOffsetIndex (const scalar_type *base, offset_type offsets, argon_bool_type active)
 Gather the active lanes from base[offsets[i]]; inactive lanes are zero and not read.
static ace std::array< argon_type, stride > LoadInterleaved (const scalar_type *ptr)
 Load multiple vectors from a pointer, de-interleaving.
static ace std::array< argon_type, stride > LoadCopyInterleaved (const scalar_type *ptr)
 Load multiple vectors from a pointer, duplicating the value across all lanes.
static ace std::array< argon_type, Stride > LoadToLaneInterleaved (simd::MultiVector_t< simd::Vec128_t< ScalarType >, Stride > multi, const scalar_type *ptr)
 Load a value from a pointer into a vector at the lane index lane, de-interleaving.
static ace std::array< argon_type, stride > LoadToLaneInterleaved (std::array< argon_type, stride > multi, const scalar_type *ptr)
 Load a value from a pointer into a vector at the lane index lane, de-interleaving.
static ace std::array< argon_type, stride > LoadGatherOffsetIndexInterleaved (const scalar_type *base_ptr, helpers::ArgonFor_t< simd::make_unsigned_t< Bool_t< simd::Vec128_t< ScalarType > > > > offset_vector)
 Perform a Load-Gather of interleaved elements.
static ace std::array< argon_type, n > LoadMulti (const scalar_type *ptr)
 Load n vectors from a single contiguous set of memory.
static ace int size ()
 Get the number of elements.

Public Attributes

 shift_right_narrow_round_top
 InsertTop
this template shift_right_narrow_saturate_bottom
this template InsertBottom
this template shift_right_narrow_saturate_top
this template InsertTop
this template shift_right_narrow_round_saturate_bottom
this template shift_right_narrow_round_saturate_top

Static Public Attributes

static constexpr size_t bytes = 16
static constexpr size_t lanes = bytes / sizeof(ScalarType)
Static Public Attributes inherited from argon::Vector< simd::Vec128_t< ScalarType > >
static constexpr bool extension_arithmetic
 Whether arithmetic may use the compiler's generic vector extensions (see ARGON_GCC_AARCH32_FLOAT).
static constexpr bool mve_platform
 Whether this is the MVE (Helium) platform.
static constexpr bool mve_float
 Float lanes on Helium, which go through MVE intrinsics where GCC mishandles the vector extensions.
static constexpr bool native_maxnm
 Whether MaxNumber/MinNumber are single instructions (vmaxnm/vminnm) for these lanes: every float lane on Helium and Armv8 NEON, half lanes on NEON only with FP16 vector arithmetic.
static constexpr bool fixup_float_compare
 Whether float comparisons need the inline vcgt/vcge (see ARGON_GCC_AARCH32_FLOAT).
static constexpr size_t lanes
 The number of lanes in the SIMD vector.

Additional Inherited Members

Protected Member Functions inherited from argon::Vector< simd::Vec128_t< ScalarType > >
ace void Scatter (scalar_type *base, offset_type offsets, PredicateType... active) const
 Scatter by byte or element offsets, optionally only the lanes of one predicate.
Static Protected Member Functions inherited from argon::Vector< simd::Vec128_t< ScalarType > >
static ace PointerType * LaneAddress (PointerType *base, OffsetType offset)
 The address of one gathered / scattered lane: base plus a byte offset, or base indexed by an element offset.
static ace argon_type Gather (const scalar_type *base, offset_type offsets, PredicateType... active)
 Gather by byte or element offsets, optionally only the lanes of one predicate (inactive lanes are zero).
static ace decltype(auto) LaneValue (ArgType &&arg)
 Convert an arithmetic constructor argument to the lane type, passing anything else through.
static ace argon_type IotaHelper (scalar_type start, std::index_sequence< Ints... >)
Protected Attributes inherited from argon::Vector< simd::Vec128_t< ScalarType > >
simd::Vec128_t< ScalarType > vec_

Constructor & Destructor Documentation

◆ Argon() [1/2]

template<typename ScalarType>
ace Argon< ScalarType >::Argon ( std::array< ScalarType, 4 > value_list)
inline

Construct from four values: lane i takes value_list[i].

With 32-bit lanes the four values are the whole vector. With 8- and 16-bit lanes they fill lanes 0-3 and the other lanes are zero. With 64-bit lanes the vector holds the first two values.

◆ Argon() [2/2]

template<typename ScalarType>
template<typename S = ScalarType>
ace Argon< ScalarType >::Argon ( ArgonHalf< S > low,
ArgonHalf< S > high )
inline

Construct by combining a low and high 64-bit half-vector.

A template, so that brace-initialising from two scalars (Argon<int64_t>{a, b}) doesn't instantiate ArgonHalf<ScalarType> to try converting them.

Member Function Documentation

◆ AddNarrow()

template<typename ScalarType>
ace auto Argon< ScalarType >::AddNarrow ( Argon< ScalarType > b) const
inline

Add and narrow: add b to this vector and truncate each lane to the next-smaller type.

Returns
An ArgonHalf-width vector of the next-smaller element type.

◆ AddWithCarry()

template<typename ScalarType>
template<typename S = ScalarType>
ace Argon< S > Argon< ScalarType >::AddWithCarry ( Argon< S > b,
uint32_t & carry ) const
inline

Add b and carry (0 or 1) to the vector as 128-bit numbers; carry becomes the carry out.

MVE: vadc.

◆ ARGON_SHIFT_NARROW()

template<typename ScalarType>
Argon< ScalarType >::ARGON_SHIFT_NARROW ( ShiftRightRoundNarrowBottom ,
shift_right_narrow_round_bottom ,
InsertBottom ,
this->template ShiftRightRound< n > () )

Shift each lane right by n and narrow it into the even (bottom) lanes of dest. MVE: vshrnb.

Shift each lane right by n and narrow it into the odd (top) lanes of dest. MVE: vshrnt.

Shift each lane right by n with rounding and narrow it into the bottom lanes of dest. MVE: vrshrnb.

Shift each lane right by n with rounding and narrow it into the top lanes of dest. MVE: vrshrnt.

◆ As()

template<typename ScalarType>
template<typename new_scalar_type>
ace Argon< new_scalar_type > Argon< ScalarType >::As ( ) const
inline

Reinterpret the vector bits as a vector of a different element type.

Template Parameters
new_scalar_typeThe target element type.
Returns
The same 128 bits viewed as Argon<new_scalar_type>.

◆ BitReverse()

template<typename ScalarType>
template<typename S = ScalarType>
ace Argon< S > Argon< ScalarType >::BitReverse ( int bits) const
inline

The low bits bits of each lane, reversed; the other bits are zero.

For an FFT of 2^k points, Iota(i).BitReverse(k) gives the bit-reversed permutation indices.

bits of the lane width or more reverses the whole lane, and 0 gives 0. MVE: vbrsr.

◆ CircularIndices()

template<typename ScalarType>
template<int step = 1, typename S = ScalarType>
ace Argon< S > Argon< ScalarType >::CircularIndices ( uint32_t & offset,
uint32_t size )
inlinestatic

The next lanes indices of a forward walk through a circular buffer of size elements.

Each lane takes offset, then offset advances by step, wrapping to 0 when it reaches size. offset is left at the index after the last lane. As with the instruction, offset and size should be multiples of step with offset < size; otherwise the index never equals size, and never wraps. MVE: viwdup.

Template Parameters
step1, 2, 4 or 8.

◆ CircularIndicesDown()

template<typename ScalarType>
template<int step = 1, typename S = ScalarType>
ace Argon< S > Argon< ScalarType >::CircularIndicesDown ( uint32_t & offset,
uint32_t size )
inlinestatic

The next lanes indices of a backward walk through a circular buffer of size elements.

Each lane takes offset; then offset wraps to size if it is 0, and retreats by step. offset is left at the index after the last lane. offset and size should be multiples of step with offset < size. MVE: vdwdup.

Template Parameters
step1, 2, 4 or 8.

◆ Combine()

template<typename ScalarType>
ace Argon< ScalarType > Argon< ScalarType >::Combine ( ArgonHalf< ScalarType > low,
ArgonHalf< ScalarType > high )
inlinestatic

Combine two 64-bit half-vectors into a single 128-bit vector.

Parameters
lowThe lower 64 bits.
highThe upper 64 bits.

◆ ComplexDotProduct()

template<typename ScalarType>
template<typename S = ScalarType>
ace std::pair< dot_type, dot_type > Argon< ScalarType >::ComplexDotProduct ( Argon< S > b) const
inline

The complex dot product Σ a·b of vectors of interleaved (real, imaginary) pairs, as {real, imaginary}.

Real: DotProduct<Subtract>. Imaginary: DotProduct<Exchange>. For Σ a·conj(b), the real part is DotProduct() and the imaginary part DotProduct<SubtractExchange>().

◆ ComplexMultiplyAdd()

template<typename ScalarType>
template<int rotation, typename S = ScalarType>
ace Argon< S > Argon< ScalarType >::ComplexMultiplyAdd ( Argon< S > b,
Argon< S > c ) const
inline

Accumulate one rotation of the complex product of b and c into this vector, exactly as vcmla.

rotation 0: re += b.re·c.re, im += b.re·c.im. 90: re −= b.im·c.im, im += b.im·c.re. 180: re −= b.re·c.re, im −= b.re·c.im. 270: re += b.im·c.im, im −= b.im·c.re. Rotations 0 then 90 accumulate b·c; 0 then 270 with the operands swapped, a·conj(b). Float lanes.

◆ ConvertTo() [1/2]

template<typename ScalarType>
template<typename U, int fracbits>
ace Argon< U > Argon< ScalarType >::ConvertTo ( ) const
inline

Convert each lane to a different type using a fixed-point fractional bit count.

Template Parameters
UThe destination element type (float, int32_t, or uint32_t).
fracbitsThe number of fractional bits in the fixed-point representation.

◆ ConvertTo() [2/2]

template<typename ScalarType>
template<typename U>
ace Argon< U > Argon< ScalarType >::ConvertTo ( ) const
inline

Convert each lane to a different element type.

Template Parameters
UThe destination element type.

◆ DotProduct()

template<typename ScalarType>
template<DotForm form = DotForm::Plain, typename S = ScalarType>
ace dot_type Argon< ScalarType >::DotProduct ( Argon< S > b,
dot_type acc = 0 ) const
inline

Sum acc and the products of every lane of this vector with the matching lane of b.

Template Parameters
formPlain: Σ a[i]·b[i]. Exchange: Σ a[2i]·b[2i+1] + a[2i+1]·b[2i]. Subtract: Σ a[2i]·b[2i] − a[2i+1]·b[2i+1]. SubtractExchange: Σ a[2i+1]·b[2i] − a[2i]·b[2i+1].

Products and the sum wrap at 32 bits. MVE: vmladav[a][x], vmlsdav[a][x].

◆ DotProductLong()

template<typename ScalarType>
template<DotForm form = DotForm::Plain, typename S = ScalarType>
ace dot_long_type Argon< ScalarType >::DotProductLong ( Argon< S > b,
dot_long_type acc = 0 ) const
inline

As DotProduct, with products and sum in 64 bits.

16- and 32-bit lanes.

MVE: vmlaldav[a][x], vmlsldav[a][x].

◆ DotProductRoundHigh()

template<typename ScalarType>
template<DotForm form = DotForm::Plain, typename S = ScalarType>
ace dot_long_type Argon< ScalarType >::DotProductRoundHigh ( Argon< S > b,
dot_long_type acc = 0 ) const
inline

As DotProductLong, but with each product divided by 256 and rounded: acc + Σ ⌊(pᵢ + 128) / 256⌋.

This keeps the high bits of 32×32-bit products, for high-precision Q31 filters. 32-bit lanes.

MVE: vrmlaldavh[a][x], vrmlsldavh[a][x]. The rounding is per product (so 128 + 128 gives 2, not 1), as QEMU models the instruction.

◆ LoadWiden()

template<typename ScalarType>
template<typename N, typename S = ScalarType>
ace Argon< S > Argon< ScalarType >::LoadWiden ( const N * ptr,
typename Argon< S >::argon_bool_type active )
inlinestatic

Load and extend the active lanes; inactive lanes are zero and their memory is not read.

MVE: vldrb/vldrh with a predicate.

◆ MaxAbs()

template<typename ScalarType>
template<typename S = ScalarType>
ace Argon< S > Argon< ScalarType >::MaxAbs ( Argon< std::make_signed_t< S > > b) const
inline

Each lane's maximum of this (unsigned) vector and the magnitude of b: running peak tracking, peak = peak.MaxAbs(samples).

MVE: vmaxa.

◆ MultiplyAddLong()

template<typename ScalarType>
template<typename U>
ace Argon< ScalarType > Argon< ScalarType >::MultiplyAddLong ( ArgonHalf< U > b,
ArgonHalf< U > c )
inline

Multiply two narrower half-vectors and add the widened result to this vector (vector × vector).

Template Parameters
UThe narrower element type (must be the next-smaller type of ScalarType).

◆ NarrowBottom()

template<typename ScalarType>
template<typename S = ScalarType>
ace Argon< argon::helpers::NextSmaller_t< S > > Argon< ScalarType >::NarrowBottom ( Argon< argon::helpers::NextSmaller_t< S > > dest) const
inline

Narrow each lane (keeping its low half) into the even (bottom) lanes of dest.

MVE: vmovnb.

Parameters
destThe narrow vector whose odd (top) lanes are kept.

◆ NarrowTop()

template<typename ScalarType>
template<typename S = ScalarType>
ace Argon< argon::helpers::NextSmaller_t< S > > Argon< ScalarType >::NarrowTop ( Argon< argon::helpers::NextSmaller_t< S > > dest) const
inline

Narrow each lane (keeping its low half) into the odd (top) lanes of dest.

MVE: vmovnt.

Parameters
destThe narrow vector whose even (bottom) lanes are kept.

◆ Reduce()

template<typename ScalarType>
template<typename CommutableOpType>
ScalarType Argon< ScalarType >::Reduce ( CommutableOpType op) const
inline

Fold all lanes into a single scalar using a commutative binary operation.

Template Parameters
CommutableOpTypeA callable (Argon, Argon) -> Argon (e.g., addition, max).
Parameters
opThe commutative binary operation.
Returns
The scalar result after all lanes have been folded.

◆ ReduceAdd()

template<typename ScalarType>
ScalarType Argon< ScalarType >::ReduceAdd ( typename T::argon_bool_type active) const
inline

Sum the active lanes and return the scalar result.

MVE (integer lanes up to 32 bits): vaddv with the predicate. Otherwise the inactive lanes are zeroed and the vector summed.

Parameters
activeThe lanes to sum.

◆ ReduceMaxAbs()

template<typename ScalarType>
template<typename S = ScalarType>
ace std::make_unsigned_t< S > Argon< ScalarType >::ReduceMaxAbs ( std::make_unsigned_t< S > init = 0) const
inline

The largest magnitude across the lanes, or init if that is larger: a peak meter.

Signed integer lanes.

The result is unsigned, so the magnitude of the most negative value fits. MVE: vmaxav.

◆ ReduceMinAbs()

template<typename ScalarType>
template<typename S = ScalarType>
ace std::make_unsigned_t< S > Argon< ScalarType >::ReduceMinAbs ( std::make_unsigned_t< S > init = std::numeric_limits<std::make_unsigned_t<S>>::max()) const
inline

The smallest magnitude across the lanes, or init if that is smaller.

Signed integer lanes.

MVE: vminav.

◆ Reverse() [1/2]

template<typename ScalarType>
ace Argon< ScalarType > Argon< ScalarType >::Reverse ( )
inline

Reverse the order of all elements across the full 128-bit vector.

Reverses within each 64-bit half, then swaps the two halves.

◆ Reverse() [2/2]

template<typename ScalarType>
ace Argon< ScalarType > Argon< ScalarType >::Reverse ( ) const
inline

Reverse the order of all elements in the 128-bit vector.

Reverses elements within each 64-bit doubleword, then swaps the two doublewords.

◆ SaturateToNarrow() [1/2]

template<typename ScalarType>
this template Argon< ScalarType >::SaturateToNarrow ( this->template ShiftRight< n > ())

Shift each lane right by n with rounding and narrow it with saturation into the bottom lanes of dest.

MVE: vqrshrnb.

◆ SaturateToNarrow() [2/2]

template<typename ScalarType>
this template Argon< ScalarType >::SaturateToNarrow ( this->template ShiftRightRound< n > ())

Shift each lane right by n with rounding and narrow it with saturation into the top lanes of dest.

MVE: vqrshrnt.

◆ ShiftLeftWithCarry()

template<typename ScalarType>
template<int n, typename S = ScalarType>
ace Argon< S > Argon< ScalarType >::ShiftLeftWithCarry ( uint32_t & carry) const
inline

Shift the whole vector, as a 128-bit number, left by n bits: the low n bits of carry shift in at the bottom, and carry becomes the n bits shifted out of the top.

MVE: vshlc.

Template Parameters
n1 to 32.

◆ ShiftRightNarrow()

template<typename ScalarType>
template<size_t n>
ace auto Argon< ScalarType >::ShiftRightNarrow ( ) const
inline

Shift each lane right by n bits and narrow the result to the next-smaller type.

Template Parameters
nShift amount (must be in range [1, sizeof(ScalarType)*8]).

◆ ShiftRightRound()

template<typename ScalarType>
this template Argon< ScalarType >::ShiftRightRound ( )

Shift each lane right by n and narrow it with saturation into the bottom lanes of dest.

MVE: vqshrnb.

◆ ShiftRightRoundNarrow()

template<typename ScalarType>
template<size_t n>
ace auto Argon< ScalarType >::ShiftRightRoundNarrow ( ) const
inline

Shift right, round, and narrow.

Template Parameters
nShift amount.

◆ ShiftRightRoundSaturateNarrow()

template<typename ScalarType>
template<size_t n>
ace auto Argon< ScalarType >::ShiftRightRoundSaturateNarrow ( ) const
inline

Shift right, round, saturate, and narrow.

Template Parameters
nShift amount.

◆ ShiftRightSaturateNarrow()

template<typename ScalarType>
template<size_t n>
ace auto Argon< ScalarType >::ShiftRightSaturateNarrow ( ) const
inline

Shift right, saturate, and narrow: shift each lane right by n bits with unsigned saturation.

Template Parameters
nShift amount.

◆ SubtractWithBorrow()

template<typename ScalarType>
template<typename S = ScalarType>
ace Argon< S > Argon< ScalarType >::SubtractWithBorrow ( Argon< S > b,
uint32_t & borrow ) const
inline

Subtract b and borrow (0 or 1) from the vector as 128-bit numbers; borrow becomes the borrow out.

MVE: vsbc (whose carry flag is the inverse of a borrow).


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