Functions¶
A¶
functionabs(const T1 &) Returns the absolute value of x.functionabsmax(const T1 &, const T2 &) Returns the greater in magnitude of two values.functionabsmin(const T1 &, const T2 &) Returns the smaller in magnitude of two values.functionadd(const T &) Identity add (single argument).functionadd(const T1 &, const T2 &, const Ts &...) Returns sum of all the arguments passed to a function.functionadd(initialvalue<T>) Identity element foradd(returns zero).functionaddsub(const vec<T, N> &, const vec<T, N> &) Returns a vector witha+bin the low half anda-bin the high half.functionall(const mask<T, N> &) Returns true if all elements are true.functionallonesvector() Return a vector of the given type and size with all bits set to 1.functionallonesvector(vec_shape<T, N>) Return a vector matching the given shape with all bits set to 1.functionallonesvector(vec<T, N>) Return a vector matching the type of the given vector with all bits set to 1.functionany(const mask<T, N> &) Returns true if any element is true.functionapply(Fn &&) Generate a vector by calling a nullary functionNtimes.functionapply(Fn &&, const T &, Args &&...) Apply a function to a scalar (pass-through overload).functionapply(Fn &&, const vec<T, N> &, Args &&...) Apply a scalar function element-wise to a vector.
B¶
functionbitcast(const From &) Reinterpret the bits ofvalueas typeTo.functionbitcast(const vec<From, N> &) Reinterpret the bits of a vector as a vector of a different element type.functionbitness_const(const char *, const char *) Selects between 32-bit and 64-bit compile-time constants.functionbitness_const(const T &, const T &) Selects between 32-bit and 64-bit compile-time constants.functionbitpermute(const vec<T, N> &) Permute the elements of a vector according to a bit permutation.functionbitreverse(const vec<T, N> &) Reorders the elements of a vector by reversing the bits of their indices.functionbitreverse(u32) Reverses the lowestbitsbits of the given unsigned integer.functionbitreverse(u32, size_t) Reverses the lowestbitsbits of the given unsigned integer at runtime.functionbitwiseand(const T1 &, const T2 &) Bitwise AND ofxandy.functionbitwiseand(double, double)functionbitwiseand(float, float)functionbitwiseand(initialvalue<T>) Identity element forbitwiseand(returns all ones).functionbitwiseandnot(const T1 &, const T2 &) Bitwise AND-NOT ofxandy.functionbitwiseandnot(double, double)functionbitwiseandnot(float, float)functionbitwiseandnot(initialvalue<T>) Identity element forbitwiseandnot(returns all ones).functionbitwisenot(const T1 &) Bitwise NOT ofx.functionbitwisenot(double)functionbitwisenot(float)functionbitwiseor(const T1 &, const T2 &) Bitwise OR ofxandy.functionbitwiseor(double, double)functionbitwiseor(float, float)functionbitwiseor(initialvalue<T>) Identity element forbitwiseor(returns zero).functionbitwisexor(const T1 &, const T2 &) Bitwise XOR (exclusive OR) ofxandy.functionbitwisexor(double, double)functionbitwisexor(float, float)functionbitwisexor(initialvalue<T>) Identity element forbitwisexor(returns zero).functionblend(const vec<T, N> &, const vec<T, N> &, elements_t<Indices...>) Blends lanes fromxandyaccording to a repeating selector pattern.functionblock_process(size_t, csizes_t<widths...>, Fn &&) Processes a range using a sequence of decreasing block widths.functionbroadcast(const Ts &...) Broadcasts a pack of scalar values into a vector of lengthNout.functionbroadcast(T) Broadcast a scalar to allNelements of a vector.functionbroadcastto(const From &) Broadcast-cast a scalar toTo(deep rebind).functionbroadcastto(const vec<Tin, N> &) Broadcast-cast a vector to a different element type.functionbroadcastto(const vec<Tin, N> &) Identity broadcast-cast for a vector (same element type).functionbroadcastto(const vec<vec<Tin, N1>, N2> &) Broadcast-cast a nested vector to a different element type.functionbroadcastto(const vec<vec<Tin, N1>, N2> &) Identity broadcast-cast for a nested vector (same element type).
C¶
functioncast(const From &) Cast a scalar value toTo(deep rebind).functioncast(const vec<Tin, N> &) Cast a vector to a different element type.functioncast(const vec<Tin, N> &) Identity cast for a vector (same element type).functioncast(const vec<vec<Tin, N1>, N2> &) Cast a nested vector to a different element type.functioncast(const vec<vec<Tin, N1>, N2> &) Identity cast for a nested vector (same element type).functionccomp(const vec<T, N> &) Composes a vector ofN/2complex values from a flattenedN-elementreal vector.functioncconj(const T1 &) Returns the complex conjugate of the complex number xfunctioncdecom(const vec<complex<T>, N> &) Decomposes a vector ofNcomplex values into a flattened2N-elementreal vector.functioncdupimag(const vec<complex<T>, N> &) Returns vector of complex values with imaginary part duplicatedfunctioncdupreal(const vec<complex<T>, N> &) Returns vector of complex values with real part duplicatedfunctionceil(const T1 &) Returns the smallest integer value not less thanx.functionclamp(const T1 &, const T2 &) Returns the first argument clamped to a range [0, hi]functionclamp(const T1 &, const T2 &, const T3 &) Returns the first argument clamped to a range [lo, hi]functioncnegimag(const vec<complex<T>, N> &) Returns vector of complex values with imaginary part negatedfunctioncnegreal(const vec<complex<T>, N> &) Returns vector of complex values with real part negatedfunctioncolumn(const vec<vec<T, N1>, N2> &) Extracts a single column from a vector-of-vectors.functioncombine(const vec<T, N1> &, const vec<T, N2> &) Combines two vectors by selecting lanes fromxorybased on index.functionconcat2(const vec<T, N1> &, const vec<T, N2> &) Concatenates two vectors into a single vector.functionconcat4(const vec<T, N> &, const vec<T, N> &, const vec<T, N> &, const vec<T, N> &) Concatenates four equal-length vectors into a single vector.functionconcat_and_slice(const vec<T, N1> &, const vec<T, N2> &) Concatenates two vectors of unequal length (first shorter) and extracts a slice.functionconcat_and_slice(const vec<T, N> &, const vec<T, N> &) Concatenates two equal-length vectors and extracts a slice of lengthcount.functionconcat(const vec<T, Ns> &...) Concatenates any number of vectors into a single vector.functioncopysign(const vec<T, N> &, const vec<T, N> &) Composexwith the magnitude ofxand the sign ofy.functioncpu_name(cpu_t) Returns the name of the given CPU instruction set.functioncswapreim(const vec<complex<T>, N> &) Returns vector of complex values with real and imaginary parts swappedfunctionctranspose(const vec<T, N> &) Complex transpose: transposes pairs of adjacent lanes viewed as complex (real, imag).functionctransposeinverse(const vec<T, N> &) Inverse complex transpose.functioncub(const T1 &) Returns cube of x.
D¶
functiondigitreverse4(const vec<T, N> &) Reorders the elements of a vector by reversing base-4 (quaternary) digits of their indices.functiondigitreverse4(u32) Reverses the digits of the given unsigned integer in base-4 (quaternary), using the lowestbitsdigits.functiondigitreverse(const vec<T, N> &) Reorders the elements of a vector by reversing the digits of their indices in the specified radix.functiondiv(const T1 &, const T2 &) Division ofxbyy.functiondup(const vec<T, N> &) Duplicates each element ofxinto a pair of adjacent lanes.functiondupeven(const vec<T, N> &) Duplicates each even-indexed element into the following odd-indexed lane.functionduphalves(const vec<T, N> &) Duplicates the contents ofxto form a vector twice as long.functionduphigh(const vec<T, N> &) Duplicates the upper half ofxto fill the whole vector.functionduplow(const vec<T, N> &) Duplicates the lower half ofxto fill the whole vector.functiondupodd(const vec<T, N> &) Duplicates each odd-indexed element into the preceding even-indexed lane.
E¶
functionenumerate() Generates a vector with an arithmetic sequence of values.functionenumerate(vec_shape<T, N>) Shape-driven overload of enumerate() for type deduction.functionenumerate(vec_shape<T, N>, std::type_identity_t<T>) Generates a vector with an arithmetic sequence using a runtime step.functionequal(const T1 &, const T2 &) Element-wise equality comparison.functioneven(const vec<T, N> &) Extracts the even-indexed elements ofx(with optional grouping).functionextend(const vec<T, 1> &) Extends a single-element vector to lengthNoutby repeating its value.functionextend(const vec<T, N> &) Resizes a multi-element vector to lengthNoutby cyclic repetition or truncation.functionextend(const vec<T, N> &) Identity overload of extend() for theNout==Ncase.
F¶
functionfbitcast(const From &) Reinterpret the bits of a scalarvalueas its floating-point counterpart type.functionfbitcast(const vec<From, N> &) Reinterpret the bits of a vector as a vector of its floating-point counterpart type.functionflatten(const vec<From, N> &)functionfloor(const T1 &) Returns the largest integer value not greater thanx.functionfmadd(const T1 &, const T2 &, const T3 &) Fused multiply-add.functionfmod(const T &, const T &) Returns the floating-point remainder of dividingxbyy.functionfmsub(const T1 &, const T2 &, const T3 &) Fused multiply-subtract.functionfract(const T1 &) Returns the fractional part ofx.functionfrom_maskbits(T) Interpretsvalueas a signed integer and tests the sign bit.
G¶
functiongather_stride(const T *) GathersNoutelements frombaseat compile-time strideStride.functiongather_stride(const T *, size_t) GathersNoutgroups ofgroupsizecontiguous elements frombaseseparated bystride.functiongather(const T *) Gathers elements frombaseat the given compile-time indices.functiongather(const T *, const vec<IT, N> &) GathersNgroups ofgroupsizecontiguous elements frombaseusing a vector of offsets.functiongather(const T *, const vec<u32, N> &) Gathers elements frombaseusing a vector of indices.functiongather(const T *, size_t, Indices...) Gathers elements frombaseat the given runtime indices.functiongenerate_vector() Generates a vector of lengthNoutby invokingFnat each compile-time index.functiongreater(const T1 &, const T2 &) Element-wise greater-than comparison.functiongreaterorequal(const T1 &, const T2 &) Element-wise greater-or-equal comparison.
H¶
functionhadd(const vec<T, N> &) Computes the sum of all elements in the vector.functionhavg(const vec<T, N> &) Computes the arithmetic mean (average) of all elements in the vector.functionhbitwiseand(const vec<T, N> &) Computes the bitwise AND of all elements in the vector.functionhbitwiseor(const vec<T, N> &) Computes the bitwise OR of all elements in the vector.functionhbitwisexor(const vec<T, N> &) Computes the bitwise XOR of all elements in the vector.functionhdot(const vec<T, N> &, const vec<T, N> &) Computes the dot product of two vectors.functionhigh(const vec<T, N> &) Extracts the high subvector ofxwith non-power-of-two-aware sizing.functionhighhalf(const vec<T, N> &) Extracts the upper half ofx.functionhighhalf(vec_shape<T, N>) Shape-only overload of highhalf() for type deduction.functionhigh(vec_shape<T, N>) Shape-only overload of high() for type deduction.functionhmax(const vec<T, N> &) Computes the maximum element in the vector.functionhmin(const vec<T, N> &) Computes the minimum element in the vector.functionhmul(const vec<T, N> &) Computes the product of all elements in the vector.functionhorizontal(const vec<T, N> &, ReduceFn &&) Applies a reduction function horizontally across all elements of the vector.functionhorner_even(const T1 &, const Ts &...) Calculate polynomial using Horner's method (even powers)functionhorner_odd(const T1 &, const Ts &...) Calculate polynomial using Horner's method (odd powers)functionhorner(const T1 &, const Ts &...) Calculate polynomial using Horner's methodfunctionhproduct(const vec<T, N> &) Computes the product of all elements in the vector.functionhrms(const vec<T, N> &) Computes the root-mean-square (RMS) of the vector elements.functionhsum(const vec<T, N> &) Computes the sum of all elements in the vector.
I¶
functionibitcast(const From &) Reinterpret the bits of a scalarvalueas its signed counterpart type.functionibitcast(const vec<From, N> &) Reinterpret the bits of a vector as a vector of its signed counterpart type.functioniceil(const T1 &) Returns the smallest integer value not less thanx,as an integer type.functionifloor(const T1 &) Returns the largest integer value not greater thanx,as an integer type.functionimag(const complex<T> &) Returns the imaginary part of the complex valuefunctionimag(const vec<complex<T>, N> &) Returns the imaginary parts of a vector of complex values.functioninrange(const T1 &, const T2 &, const T3 &) Test whether each element lies within a closed range.functioninserthigh(T, const vec<T, N> &) Inserts a scalarxat the high (right) end ofy,shiftingyone lane to the low (left) side.functioninsertleft(T, const vec<T, N> &) Legacy alias for insertlow().functioninsertlow(T, const vec<T, N> &) Inserts a scalarxat the low (left) end ofy,shiftingyone lane to the high (right) side.functioninsertright(T, const vec<T, N> &) Legacy alias for inserthigh().functioninterleave(const vec<T, N> &, const vec<T, N> &) Interleaves the lanes of two equal-length vectorsxandy.functioninterleavehalves(const vec<T, N> &) Interleaves the two halves ofx.functionipow(const T &, int) Integer power.functioniround(const T1 &) Returns the nearest integer value tox,as an integer type.functionis_simd_size(size_t) Checks whethersizeis a valid SIMD vector size for typeT.functionisfinite(const vec<T, N> &) Detect finite values element-wise.functionisinf(const vec<T, N> &) Detect infinite values element-wise.functionisnan(const vec<T, N> &) Detect NaN (Not-a-Number) values element-wise.functionisnegative(const vec<T, N> &) Detect negative values element-wise by inspecting the sign bit.functionispositive(const vec<T, N> &) Detect non-negative values element-wise.functionisreal(const complex<T> &) Returns mask with true for real elementsfunctioniszero(const vec<T, N> &) Detect zero values element-wise.functionitrunc(const T1 &) Returns the truncated integer part ofx,as an integer type.
L¶
functionless(const T1 &, const T2 &) Element-wise less-than comparison.functionlessorequal(const T1 &, const T2 &) Element-wise less-or-equal comparison.functionlow(const vec<T, N> &) Extracts the largest power-of-two-sized low subvector ofx.functionlowhalf(const vec<T, N> &) Extracts the lower half ofx.functionlowhalf(vec_shape<T, N>) Shape-only overload of lowhalf() for type deduction.functionlow(vec_shape<T, N>) Shape-only overload of low() for type deduction.
M¶
functionmake_complex(const vec<T1, N> &, const vec<T2, N> &) Constructs a vector of complex values from real and imaginary vectors.functionmake_complex(T1, T2) Constructs a complex value from real and imaginary scalars.functionmake_mask(bool, Args...) Constructs a SIMD mask vector from boolean values.functionmake_vector(const Arg &, const Args &...) Create a vector from scalar values.functionmake_vector(const vec<T, N> &) Identity overload: returns the passed vector unchanged.functionmake_vector(cvals_t<T, Values...>) Create a vector from a compile-time constant list.functionmaskbits(bool) Returns all-ones or all-zeros of typeTdepending onvalue.functionmax(const T1 &, const T2 &) Returns the greater of two values.functionmin(const T1 &, const T2 &) Returns the smaller of two values.functionmix(const T1 &, const T2 &, const T3 &) Linear blend ofxandy.functionmixs(const T1 &, const T2 &, const T3 &) Signed linear blend ofxandy.functionmod(const T1 &, const T2 &) Modulo ofxbyy.functionmul(const T1 &) Identity mul (single argument).functionmul(const T1 &, const T2 &, const Ts &...) Returns product of all the arguments passed to a function.functionmul(initialvalue<T>) Identity element formul(returns one).functionmulsign(const T1 &, const T2 &) Multiplyxby the sign ofywithout a conditional branch.
N¶
functionnarrow(const vec<T, N> &) Narrowsxto lengthNoutby truncation.functionneg(const T1 &) Arithmetic negation ofx.functionnegeven(const vec<T, N> &) Negates the even-indexed lanes ofx.functionnegodd(const vec<T, N> &) Negates the odd-indexed lanes ofx.functionnotequal(const T1 &, const T2 &) Element-wise inequality comparison.
O¶
functionodd(const vec<T, N> &) Extracts the odd-indexed elements ofx(with optional grouping).functiononoff(cint_t<on>, cint_t<off>) Generates a vector with an on/off pattern over a contiguous range.functiononoff(vec_shape<T, N>, cint_t<on>, cint_t<off>) Shape-driven overload of onoff() for type deduction.functionoperator&(const mask<T1, N> &, const mask<T2, N> &) Bitwise AND of two masks (bit-level, size must match).functionoperator|(const mask<T1, N> &, const mask<T2, N> &) Bitwise OR of two masks (bit-level, size must match).functionoperator&&(const mask<T1, N> &, const mask<T2, N> &) Logical AND of two masks (bit-level conjunction, size must match).functionoperator||(const mask<T1, N> &, const mask<T2, N> &) Logical OR of two masks (bit-level disjunction, size must match).functionoperator^(const mask<T1, N> &, const mask<T2, N> &) Bitwise XOR of two masks (bit-level, size must match).functionoperator~(const mask<T, N> &) Bitwise NOT of a mask.functionoperator!(const mask<T, N> &) Logical NOT of a mask (equivalent to bitwise NOT).functionoperator+(const T1 &, const vec<T2, N> &)functionoperator-(const T1 &, const vec<T2, N> &)functionoperator*(const T1 &, const vec<T2, N> &)functionoperator/(const T1 &, const vec<T2, N> &)functionoperator%(const T1 &, const vec<T2, N> &)functionoperator&(const T1 &, const vec<T2, N> &)functionoperator|(const T1 &, const vec<T2, N> &)functionoperator^(const T1 &, const vec<T2, N> &)functionoperator<<(const T1 &, const vec<T2, N> &)functionoperator>>(const T1 &, const vec<T2, N> &)functionoperator==(const T1 &, const vec<T2, N> &)functionoperator!=(const T1 &, const vec<T2, N> &)functionoperator>=(const T1 &, const vec<T2, N> &)functionoperator<=(const T1 &, const vec<T2, N> &)functionoperator>(const T1 &, const vec<T2, N> &)functionoperator<(const T1 &, const vec<T2, N> &)functionoperator+(const vec<T1, N> &, const T2 &)functionoperator-(const vec<T1, N> &, const T2 &)functionoperator*(const vec<T1, N> &, const T2 &)functionoperator/(const vec<T1, N> &, const T2 &)functionoperator%(const vec<T1, N> &, const T2 &)functionoperator&(const vec<T1, N> &, const T2 &)functionoperator|(const vec<T1, N> &, const T2 &)functionoperator^(const vec<T1, N> &, const T2 &)functionoperator==(const vec<T1, N> &, const T2 &)functionoperator!=(const vec<T1, N> &, const T2 &)functionoperator>=(const vec<T1, N> &, const T2 &)functionoperator<=(const vec<T1, N> &, const T2 &)functionoperator>(const vec<T1, N> &, const T2 &)functionoperator<(const vec<T1, N> &, const T2 &)functionoperator+(const vec<T1, N> &, const vec<T2, N> &)functionoperator-(const vec<T1, N> &, const vec<T2, N> &)functionoperator*(const vec<T1, N> &, const vec<T2, N> &)functionoperator/(const vec<T1, N> &, const vec<T2, N> &)functionoperator%(const vec<T1, N> &, const vec<T2, N> &)functionoperator&(const vec<T1, N> &, const vec<T2, N> &)functionoperator|(const vec<T1, N> &, const vec<T2, N> &)functionoperator^(const vec<T1, N> &, const vec<T2, N> &)functionoperator<<(const vec<T1, N> &, const vec<T2, N> &)functionoperator>>(const vec<T1, N> &, const vec<T2, N> &)functionoperator==(const vec<T1, N> &, const vec<T2, N> &)functionoperator!=(const vec<T1, N> &, const vec<T2, N> &)functionoperator>=(const vec<T1, N> &, const vec<T2, N> &)functionoperator<=(const vec<T1, N> &, const vec<T2, N> &)functionoperator>(const vec<T1, N> &, const vec<T2, N> &)functionoperator<(const vec<T1, N> &, const vec<T2, N> &)functionoperator<<(const vec<T1, N> &, unsigned int)functionoperator>>(const vec<T1, N> &, unsigned int)functionoperator-(const vec<T, N> &)functionoperator~(const vec<T, N> &)functionoperator+=(vec<T1, N> &, const T2 &)functionoperator-=(vec<T1, N> &, const T2 &)functionoperator*=(vec<T1, N> &, const T2 &)functionoperator/=(vec<T1, N> &, const T2 &)functionoperator%=(vec<T1, N> &, const T2 &)functionoperator&=(vec<T1, N> &, const T2 &)functionoperator|=(vec<T1, N> &, const T2 &)functionoperator^=(vec<T1, N> &, const T2 &)functionoperator+=(vec<T1, N> &, const vec<T2, N> &)functionoperator-=(vec<T1, N> &, const vec<T2, N> &)functionoperator*=(vec<T1, N> &, const vec<T2, N> &)functionoperator/=(vec<T1, N> &, const vec<T2, N> &)functionoperator%=(vec<T1, N> &, const vec<T2, N> &)functionoperator&=(vec<T1, N> &, const vec<T2, N> &)functionoperator|=(vec<T1, N> &, const vec<T2, N> &)functionoperator^=(vec<T1, N> &, const vec<T2, N> &)functionoperator<<=(vec<T1, N> &, const vec<T2, N> &)functionoperator>>=(vec<T1, N> &, const vec<T2, N> &)functionoperator<<=(vec<T1, N> &, unsigned int)functionoperator>>=(vec<T1, N> &, unsigned int)functionoptimized_bitshuffle(const vec<T, N> &) Internal ADL-provided implementation for bit-shuffle expressions.
P¶
functionpack(const Arg &, const Args &...) Pack scalar values into a vector of numeric type.functionpacktranspose(const vec<T, N1> &, const vec<T, Ns> &...) Transposes and packssizeof...(Ns)+1vectors of lengthN1into a vector of vectors of lengthN1.functionpadhigh(const vec<T, N> &) PadsxwithNcountzero-initialized lanes on the high side.functionpadhigh(const vec<T, N> &, std::type_identity_t<T>) PadsxwithNcountcopies ofnewvalueon the high side.functionpadlow(const vec<T, N> &) PadsxwithNcountzero-initialized lanes on the low side.functionpadlow(const vec<T, N> &, std::type_identity_t<T>) PadsxwithNcountcopies ofnewvalueon the low side.functionpart(const vec<T, N> &) Extracts thenumber-thoftotalequal-sized parts ofx.functionpartial_mask(size_t) Returns a vector ofNelements withindexleading all-ones elements followed by zeros.functionpartial_mask(size_t, vec_shape<T, N>) Returns a vector ofNelements withindexleading all-ones elements followed by zeros.functionpartial_read(const T *, size_t) Reads up tocountelements into a vector.functionpartial_write(T *, const vec<T, N> &, size_t) Writes up tocountleading elements of a vector to memory.functionpermute(const vec<T, N> &, elements_t<Indices...>) Permutes the lanes ofxusing a repeating index pattern.functionpermutegroups(const vec<T, N> &, elements_t<Indices...>) Group-wise variant of permute() that operates on blocks ofgroupelements.functionpow2(const T &) Returns \(x^2\) .functionpow3(const T &) Returns \(x^3\) .functionpow4(const T &) Returns \(x^4\) .functionpow5(const T &) Returns \(x^5\) .functionpromoteto(const Tin &) Promote a scalar toTout.functionpromoteto(const vec<Tin, N> &) Promote a vector to a different element type.functionpromoteto(const vec<vec<Tin, N1>, N2> &) Promote a nested vector to a different element type.
R¶
functionread_group(const T *, size_t) Readscountgroups ofgroup*Nelements separated bystridegroups.functionread(const T *) Reads a vector ofNelements of typeTfrom memory.functionreal(const complex<T> &) Returns the real part of the complex valuefunctionreal(const T &) Returns the real part of the complex valuefunctionreal(const vec<complex<T>, N> &) Returns the real parts of a vector of complex values.functionreciprocal(const T &) Multiplicative inverse ofx.functionrem(const T1 &, const T2 &) Remainder ofxdivided byy.functionrem(const vec<T, N> &, const vec<T, N> &) Returns the element-wise floating-point remainder of vectorsxandy.functionrepeat(const vec<T, N> &) Repeats the contents ofxcounttimes.functionreplace(const vec<T, N> &, const vec<T, N> &) Replaces a contiguous range ofxwith the corresponding lanes ofy.functionresize(const vec<T, N> &) Resizes a vector to lengthNout.functionresize(const vec<T, N> &) Identity overload of resize() for theNout==Ncase.functionreverse(const vec<T, N> &) Reverses the order of lanes inx(with optional grouping).functionreverse(const vec<vec<T, N1>, N2> &) Reverses the order of inner vectors in a vector of vectors.functionrol(const T1 &, const T2 &) Bitwise left rotate.functionror(const T1 &, const T2 &) Bitwise right rotate.functionrotateleft(const vec<T, N> &, csize_t<amount>) Rotates the lanes ofxto the left byamountpositions.functionrotateright(const vec<T, N> &, csize_t<amount>) Rotates the lanes ofxto the right byamountpositions.functionrotatetwo(const vec<T, N> &, const vec<T, N> &) Combines two vectorsloandhiwith a rotation byshiftlanes.functionround(const T1 &) Returns the nearest integer value tox.
S¶
functionsatadd(const T1 &, const T2 &) Adds two numeric values using saturation arithmetic.functionsatsub(const T1 &, const T2 &) Subtracts two numeric values using saturation arithmetic.functionscatter_stride(T *, const vec<T, N> &, size_t) ScattersN/groupsizegroups ofgroupsizecontiguous elements ofvaluetobaseseparated bystride.functionscatter(const T *, const vec<T, N> &) Scatters elements ofvaluetobaseat the given compile-time indices.functionscatter(T *, const vec<IT, N> &, const vec<T, Nout> &) ScattersNgroups ofgroupsizecontiguous elements ofvaluetobaseusing a vector of offsets.functionselect(const mask<T1, N> &, const T2 &, const T3 &) Returns x if m is true, otherwise return y. Order of the arguments is same as in ternary operator.functionshl(const T1 &, const T2 &) Bitwise left shift.functionshr(const T1 &, const T2 &) Bitwise right shift.functionshuffle(const vec<T, N> &, const vec<T, N> &, elements_t<Indices...>) Shuffles the concatenation of two equal-length vectors using a repeating index pattern.functionshufflegroups(const vec<T, N> &, const vec<T, N> &, elements_t<Indices...>) Group-wise variant of shuffle() that operates on blocks ofgroupelements.functionshuffleindexbits(const vec<T, N> &, elements_t<A...>) Shuffles lanes ofxby permuting the bits of each lane index.functionshufflevector(const vec<complex<T>, N> &, csizes_t<indices...>) Shuffles the complex elements ofxaccording toindices.functionshufflevector(const vec<T, N> &, csizes_t<indices...>) Permute elements of a single vector.functionshufflevectors(const vec<complex<T>, N> &, const vec<T, N> &, csizes_t<indices...>) Shuffles complex elements from two vectorsxandyaccording toindices.functionshufflevectors(const vec<T, N> &, const vec<T, N> &, csizes_t<indices...>) Permute elements from two concatenated vectors.functionsize_of() Size of a (possibly compound) type measured in bytes of its deepest scalar.functionslice(const vec<T, N> &) Extracts a contiguous subvector ofcountelements starting atstart.functionslice(const vec<T, N> &, const vec<T, N> &) Extracts a contiguous subvector spanning the concatenation ofxandy.functionsort(const vec<T, N> &) Sort the elements in the vector in ascending orderfunctionsortdesc(const vec<T, N> &) Sort the elements in the vector in descending orderfunctionsplit(const vec<T, N> &) Terminal overload of split() for variadic recursion.functionsplit(const vec<T, N> &, vec<T, N / 2> &, vec<T, N / 2> &) Splitsxinto two equal halves.functionsplit(const vec<T, N> &, vec<T, N / 4> &, vec<T, N / 4> &, vec<T, N / 4> &, vec<T, N / 4> &) Splitsxinto four equal quarters.functionsplit(const vec<T, N> &, vec<T, Nout> &, Args &&...) Splitsxinto consecutive subvectors written into the supplied output references.functionsplitpairs(const vec<T, N> &) Deinterleaves adjacent pairs (inverse of interleavehalves withside1== 2).functionsqr(const T1 &) Returns square of x.functionsqrdiff(const T1 &, const T2 &) Returns square of the difference of two arguments.functionsqrsum(const T1 &, const Ts &...) Square of the sum of all arguments.functionsubadd(const vec<T, N> &, const vec<T, N> &) Returns a vector witha-bin the low half anda+bin the high half.functionsub(const T1 &, const T2 &) Subtraction of two values.functionsub(initialvalue<T>) Identity element forsub(returns zero).functionswapbyteorder(const T &) Swap byte order ofx.functionswap(const vec<T, N> &) Swaps adjacent groups ofelementslanes.
T¶
functionto_vec(const portable_vec<T, N> &) Convert aportable_vecto the nativevectype.functionto_vec(const std::array<T, N> &) Converts astd::arrayofNelements to a vector.functiontranspose(const vec<T, N> &) Transposes a vector viewed as aside1xside2matrix (row-major).functiontranspose(const vec<T, N> &) Identity overload of transpose() for small vectors (size <= 3).functiontranspose(const vec<vec<T, N>, N> &) Transposes a vector of vectors (matrix of vectors).functiontransposeinverse(const vec<T, N> &) Inverse transpose of a vector viewed as aside1xside2matrix (row-major).functiontransposeinverse(const vec<T, N> &) Identity overload of transposeinverse() for small vectors (size <= 3).functiontrunc(const T1 &) Returns the integer part ofxby removing its fractional part.
U¶
functionubitcast(const From &) Reinterpret the bits of a scalarvalueas its unsigned counterpart type.functionubitcast(const vec<From, N> &) Reinterpret the bits of a vector as a vector of its unsigned counterpart type.functionuibitcast(const From &) Reinterpret the bits of a scalarvalueas its unsigned-or-signed counterpart type.functionuibitcast(const vec<From, N> &) Reinterpret the bits of a vector as a vector of its unsigned-or-signed counterpart type.functionundefinedvector() Return an uninitialized vector of the given type and size.functionundefinedvector(vec_shape<T, N>) Return an uninitialized vector matching the given shape.functionunwrap_bit_value(const bit<T> &) Overload unwrapping abit<T>to its underlying mask value.functionunwrap_bit_value(const T &) Returns the underlying mask value of a bit, or the value itself for non-bit types.
V¶
functionvector_alignment(size_t) Return the alignment (next power of two ofsize) for a vector ofsizebytes.
W¶
functionwiden(const vec<T, Nout> &, TS) Identity overload of widen() for theNout== input length case.functionwiden(const vec<T, N> &, std::type_identity_t<T>) Widensxto lengthNoutby appending lanes set tonewvalue.functionwrap_bit_value(const T &) Pass-through overload of wrap_bit_value for non-bit types.functionwrap_bit_value(const unwrap_bit<T> &) Wraps a raw mask value into abit<T>.functionwrite_group(T *, size_t, const vec<T, group * count * N> &) Writescountgroups ofgroup*Nelements separated bystridegroups.functionwrite(T *, const vec<T, N> &) Writes a vector ofNelements of typeTto memory.
Z¶
functionzeroize(T1 &) Fills a value with zerosfunctionzerovector() Return an all-zeros vector of the given type and size.functionzerovector(vec_shape<T, N>) Return an all-zeros vector matching the given shape.functionzerovector(vec<T, N>) Return an all-zeros vector matching the type of the given vector.functionzip(const vec<T, N1> &, const vec<T, Ns> &...) Zips multiple vectors into a vector of vectors.This file was generated by cxxdox, a C++ documentation generator based on MkDocs Material and libclang.