SIMD Acceleration¶
Cross-platform SIMD vector operations and hardware acceleration.
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.functionspecial_scalar_constants<T>::allones() Returns a value with all bits set.functionspecial_scalar_constants<float>::allones() Returns a floating-point value with all bits set.functionspecial_scalar_constants<double>::allones() Returns a floating-point value with all bits set.functionspecial_scalar_constants<bit<T>>::allones() All bits set (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.functionspecial_scalar_constants<T>::allzeros() Returns a value with all bits cleared.functionspecial_scalar_constants<float>::allzeros() Returns positive zero, whose bits are all cleared.functionspecial_scalar_constants<double>::allzeros() Returns positive zero, whose bits are all cleared.functionspecial_scalar_constants<bit<T>>::allzeros() All bits cleared (false).unionvec<T, N>::(Anonymous union at simd/vec.hpp:831:5)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.functioni24::as_int() Reconstructs the signed 32-bit value, sign-extending from bit 23.functionvec<T, N>::asmask() Reinterpret the bits as a mask of the same shape.functionvec<T, N>::asvec() Reinterpret a mask vector as a value vector (drops thebitwrapper).functioncompound_type_traits<kfr::vec<T, N>>::at(const kfr::vec<T, N> &, size_t)functioncompound_type_traits<std::complex<T>>::at(const std::complex<T> &, size_t) Returns the real (index== 0) or imaginary (index== 1) part ofvalue.enum constantcpu_t::avxenum constantcpu_t::avx1enum constantcpu_t::avx2enum constantcpu_t::avx512
B¶
functionportable_vec<T, N>::back()functionportable_vec<T, N>::back()functionvec<T, N>::back() Read the last element from a const lvalue vector.functionvec<T, N>::back() Read the last element from an rvalue vector.functionvec<T, N>::back() Access the last element of a non-const lvalue vector.typedefstride_pointer<T, groupsize>::base_typefunctionbitcast(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.classbitmask<bits> Holds an unsigned integer wide enough to storebitsbits.constructorbitmask<bits>::bitmask<bits>(type) Construct from a value of the underlying 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.classbit<T> Boolean value stored as a mask of typeT(all-ones for true, all-zeros for false).constructorbit<T>::bit<T>() Default constructor leaving the value uninitialized.constructorbit<T>::bit<T>(bool) Construct from a bool, storing all-ones or all-zeros.functionbit<T>::bit<T>(const bit<U> &) Convert a bit of another element type to this one.constructorbit<T>::bit<T>(T)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¶
typedefc32 Alias for complex<f32>typedefc64 Alias for complex<f64>variablec_degtorad Degrees to radians conversion factor (π / 180).variablec_e The mathematical constant e (Euler's number), scaled by m/d.variablec_epsilon The machine epsilon — the smallest value such that 1 + epsilon ≠ 1.variablec_infinity Positive infinity representation.variablec_log_10 The natural logarithm of 10 (ln(10)).variablec_log_2 The natural logarithm of 2 (ln(2)).variablec_mantissa_bits The number of mantissa bits for the given floating-point type.variablec_mantissa_mask The bitmask for the mantissa of the floating-point representation.variablec_neginfinity Negative infinity representation.variablec_pi The mathematical constant π (pi), scaled by m/d.variablec_qnan A quiet NaN (Not-a-Number) value.variablec_radtodeg Radians to degrees conversion factor (180 / π).variablec_recip_log_10 The reciprocal of the natural logarithm of 10 (1 / ln(10)).variablec_recip_log_2 The reciprocal of the natural logarithm of 2 (1 / ln(2)).variablec_recip_pi The reciprocal of π (1/π), scaled by m/d.variablec_sqr_pi The square of π (pi²), scaled by m/d.variablec_sqrt_2 The square root of 2 (√2), scaled by m/d.variablecaligned Instance of caligned_t.typedefcaligned_t Compile-time boolean tag selecting aligned access.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).typedefcbase Alias for complex<fbase>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 xvariableccpu Compile-time constant instance ofccpu_t.typedefccpu_t Compile-time wrapper around acpu_tvalue.functioncdecom(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.typedefopencl_names::char16typedefopencl_names::char2typedefopencl_names::char3typedefopencl_names::char4typedefopencl_names::char8functionclamp(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.enum constantcpu_t::commonvariableplatform<cpu_t::common>::common_float_vector_sizevariableplatform<cpu_t::common>::common_int_vector_sizeclasscommon_type_helper<T1, T2, N1, N2> Helper forstd::common_typededuction between vectors and scalars.classcommon_type_helper<T1, T2, N, N> Same-width vectors share avec<common, N>common type.classcommon_type_helper<T1, vec<T2, N2>, N1, N2> Scalar vs. vector of differing widths form a nestedvec<vec<...>>.classcommon_type_helper<vec<T1, N2>, T2, N1, N2> Vector vs. scalar of differing widths form a nestedvec<vec<...>>.class::std::common_type<kfr::complex<T1>, kfr::complex<T2>>common_typeof twokfr::complexvalues.class::std::common_type<kfr::complex<T1>, kfr::vec<T2, N>>common_typeof akfr::complexand akfr::vec.class::std::common_type<kfr::complex<T1>, T2>common_typeof akfr::complexand a scalar.class::std::common_type<kfr::vec<T1, N1>, kfr::vec<T2, N2>>class::std::common_type<kfr::vec<T1, N>, kfr::complex<T2>>common_typeof akfr::vecand akfr::complex.class::std::common_type<kfr::vec<T1, N>, T2>class::std::common_type<T1, kfr::complex<T2>>common_typeof a scalar and akfr::complex.class::std::common_type<T1, kfr::vec<T2, N>>classcompound_type_traits<kfr::vec_shape<T, N>>compound_type_traitsspecialization forvec_shape<T, N>.classcompound_type_traits<kfr::vec<T, N>>compound_type_traitsspecialization forvec<T, N>.classcompound_type_traits<std::complex<T>> Traits specialization forstd::complex<T>enabling KFR's compound-type machinery.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.variablecones Instance of cones_t.structcones_t Tag type selecting all-ones initialization.typedefstruct_with_alignment<T, A>::const_pointer Const pointer to this wrapper type.typedefstruct_with_alignment<T, false>::const_pointer Const pointer to this wrapper type.classconstants<T> Constants for the SIMD typeT, inheriting from the scalar constants of its element type.classconstruct_common_type<CT, Tpl> Helper that maps a common-type result onto a single-argument template.classconstruct_common_type<CT, Tpl>functioncopysign(const vec<T, N> &, const vec<T, N> &) Composexwith the magnitude ofxand the sign ofy.variablecpu_all Compile-time list of all CPU instruction sets supported by the current architecture that are not newer thancpu_t::native.functioncpu_name(cpu_t) Returns the name of the given CPU instruction set.enumcpu_t Enumeration representing a CPU instruction set.variablecpuval Compile-time constant instance ofcpuval_t.typedefcpuval_t Compile-time wrapper around acpu_tvalue (alias).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.variablecunaligned Instance of cunaligned_t.typedefcunaligned_t Compile-time boolean tag selecting unaligned access.variableczeros Instance of czeros_t.structczeros_t Tag type selecting zero-initialization.
D¶
typedefdecay_common Decays to the common type of the supplied arguments after decay.typedefcompound_type_traits<kfr::vec_shape<T, N>>::deep_rebindtypedefcompound_type_traits<kfr::vec<T, N>>::deep_rebindtypedefcompound_type_traits<std::complex<T>>::deep_rebind Rebinds the complex to hold values of the deep-rebound subtype oftypedefcompound_type_traits<kfr::vec_shape<T, N>>::deep_subtypetypedefcompound_type_traits<kfr::vec<T, N>>::deep_subtypetypedefcompound_type_traits<std::complex<T>>::deep_subtype Deepest scalar component type after full recursion.variablecompound_type_traits<kfr::vec_shape<T, N>>::deep_widthvariablecompound_type_traits<kfr::vec<T, N>>::deep_widthvariablecompound_type_traits<std::complex<T>>::deep_width Width after fully recursing into the subtype.variablescalar_constants<T>::degtorad Degrees to radians conversion factor (π / 180).variablecompound_type_traits<kfr::vec_shape<T, N>>::depthvariablecompound_type_traits<kfr::vec<T, N>>::depthvariablecompound_type_traits<std::complex<T>>::depth Recursion depth of the compound type.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.typedefopencl_names::double16typedefopencl_names::double2typedefopencl_names::double3typedefopencl_names::double4typedefopencl_names::double8functiondup(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.typedefglsl_names::dvec2typedefglsl_names::dvec3typedefglsl_names::dvec4
E¶
variablescalar_constants<T>::e The mathematical constant e (Euler's number).variableportable_vec<T, N>::elemstructvec<T, N>::element Proxy reference to a single vector element enabling read/write access.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.variablescalar_constants<T>::epsilon The machine epsilon — the smallest value such that 1 + epsilon ≠ 1.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¶
structf16 16-bit half-precision floating-point value stored as raw bits.constructorf16::f16() Default constructor leaving the value uninitialized.constructorf16::f16(f32) Converts a single-precision value to IEEE 754 binary16.typedeff32x1 Short alias forvec<T, N>.typedeff32x16typedeff32x2typedeff32x2x2typedeff32x3typedeff32x32typedeff32x4typedeff32x4x4typedeff32x64typedeff32x8typedeff64x1typedeff64x16typedeff64x2typedeff64x2x2typedeff64x3typedeff64x32typedeff64x4typedeff64x4x4typedeff64x64typedeff64x8variableplatform<cpu_t::common>::fast_unalignedvariableplatform<cpu_t::avx>::fast_unalignedfunctionfbitcast(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.functionvec<T, N>::flatten()functionflatten(const vec<From, N> &)typedefopencl_names::float16typedefopencl_names::float2typedefopencl_names::float3typedefopencl_names::float4typedefopencl_names::float8variablefloat_typesvariablefloat_vector_types Instance of float_vector_types_t for use as a value parameter pack.typedeffloat_vector_types_t Type list of floating-point vector instantiations for the test sizes.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.variablescalar_constants<T>::fold_constant_div Constantπ/2used as the folding divisor in trigonometric argument reduction.variablescalar_constants<T>::fold_constant_hi High part of theπ/2folding constant (Cody-Waite reduction).variablescalar_constants<T>::fold_constant_rem1 First remainder term of theπ/2folding constant (Cody-Waite reduction).variablescalar_constants<T>::fold_constant_rem2 Second remainder term of theπ/2folding constant (Cody-Waite reduction).variableforce_compiletime_size_t Forces a compile-time evaluation of the givensize_tvalue.functionfract(const T1 &) Returns the fractional part ofx.functionvec<T, N>::from_flatten(const vec<ST, SN> &) Reconstruct a (possibly compound) vector from a flat scalar vector.structfrom_lambda Tag type used to select thevecconstructor that initializes elements from an index-based generator function.functionfrom_maskbits(T) Interpretsvalueas a signed integer and tests the sign bit.functionf16::from_raw(u16)functionvec<T, N>::frombits(const vec<U, M> &) Reinterpret the bits ofvas a vector of this type.functionportable_vec<T, N>::front()functionportable_vec<T, N>::front()functionvec<T, N>::front() Read the first element from a const lvalue vector.functionvec<T, N>::front() Read the first element from an rvalue vector.functionvec<T, N>::front() Access the first element of a non-const lvalue vector.
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.enum constantcpu_t::genericfunctionvec<T, N>::get() Get element at compile-timeindex(template parameter form).typedeffn_generic::get_firsttypedeffn_generic::get_secondtypedeffn_generic::get_thirdfunctionrepresentation<fmt_t<kfr::complex<T>, t, width, prec>>::get(const fmt_t<kfr::complex<T>, t, width, prec> &) Converts a formatted complex value to its string form.functionrepresentation<fmt_t<kfr::generic::vec<T, N>, t, width, prec>>::get(const fmt_t<kfr::generic::vec<T, N>, t, width, prec> &)functionrepresentation<kfr::complex<T>>::get(const kfr::complex<T> &) Converts a complex value to its string form.functionrepresentation<kfr::generic::mask<T, N>>::get(const kfr::generic::mask<T, N> &)functionrepresentation<kfr::generic::vec<T, N>>::get(const kfr::generic::vec<T, N> &)functionvec<T, N>::get(csize_t<index>) Get element at compile-timeindex(compound element type).functionvec<T, N>::get(size_t) Get element at runtimeindex(compound element type).functiongreater(const T1 &, const T2 &) Element-wise greater-than comparison.functiongreaterorequal(const T1 &, const T2 &) Element-wise greater-or-equal comparison.
H¶
variablevec<T, N>::(Anonymous union at simd/vec.hpp:831:5)::hfunctionhadd(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.variablevec_halves<T, N>::high Upper (remainder) half.functionspecial_scalar_constants<T>::highbitmask() Returns a value with only the most significant bit set.functionspecial_scalar_constants<float>::highbitmask() Returns negative zero, whose sign bit is set.functionspecial_scalar_constants<double>::highbitmask() Returns negative zero, whose sign bit is set.functionspecial_scalar_constants<bit<T>>::highbitmask() Mask with only the most significant bit set, expressed as a bit.functionhigh(const vec<T, N> &) Extracts the high subvector ofxwith non-power-of-two-aware sizing.enum constantcpu_t::highestfunctionhighhalf(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¶
typedefi16x1typedefi16x16typedefi16x2typedefi16x2x2typedefi16x3typedefi16x32typedefi16x4typedefi16x4x4typedefi16x64typedefi16x8structi24 Signed 24-bit integer stored in three bytes (little-endian).constructori24::i24() Default constructor leaving the value uninitialized.constructori24::i24(i32) Construct from a 32-bit signed integer, truncating to 24 bits.typedefi32x1typedefi32x16typedefi32x2typedefi32x2x2typedefi32x3typedefi32x32typedefi32x4typedefi32x4x4typedefi32x64typedefi32x8typedefi64x1typedefi64x16typedefi64x2typedefi64x2x2typedefi64x3typedefi64x32typedefi64x4typedefi64x4x4typedefi64x64typedefi64x8typedefi8x1typedefi8x16typedefi8x2typedefi8x2x2typedefi8x3typedefi8x32typedefi8x4typedefi8x4x4typedefi8x64typedefi8x8functionibitcast(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.variablevec<T, N>::element::index Element index withinvariableindex_undefined Sentinel index value meaning "no index".variableinfinity Positive infinity as adouble.variablescalar_constants<T>::infinity The representation of positive infinity for the type T.classinitialvalue<T> Used to determine the initial value for reduce functions.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().typedefopencl_names::int16typedefopencl_names::int2typedefopencl_names::int3typedefopencl_names::int4typedefopencl_names::int8variableinteger_types Type list of all integer element types (signed and unsigned).variableinteger_vector_types Instance of integer_vector_types_t for use as a value parameter pack.typedefinteger_vector_types_t Type list of all integer vector instantiations for the test sizes.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.functionspecial_scalar_constants<T>::invhighbitmask() Returns a value with every bit except the most significant bit set.functionspecial_scalar_constants<float>::invhighbitmask() Returns a floating-point value with every bit except the sign bit set.functionspecial_scalar_constants<double>::invhighbitmask() Returns a floating-point value with every bit except the sign bit set.functionspecial_scalar_constants<bit<T>>::invhighbitmask() Inverse of highbitmask, i.e. all bits except the high bit set.functionipow(const T &, int) Integer power.functioniround(const T1 &) Returns the nearest integer value tox,as an integer type.variableis_bit True whenTis abit<U>specialization.variableis_complex Variable template:trueifTis acomplexspecialization.variablecompound_type_traits<kfr::vec_shape<T, N>>::is_scalarvariablecompound_type_traits<kfr::vec<T, N>>::is_scalarvariablecompound_type_traits<std::complex<T>>::is_scalar because a complex value is not a scalar.variableis_simd_float_type True whenTis a floating-point SIMD element type.variableis_simd_int_type True whenTis an integer SIMD element type.functionis_simd_size(size_t) Checks whethersizeis a valid SIMD vector size for typeT.variableis_simd_type True whenTis one of the scalar types usable as a SIMD element.variableis_vec True ifTis avecinstantiation.variableis_vec_element True ifT(after stripping cv) is usable as avecelement type.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.typedefvec<T, N>::iuscalar_typetypedefvec<T, N>::iusimd_typetypedefvec<T, N>::iuvalue_typetypedefglsl_names::ivec2typedefglsl_names::ivec3typedefglsl_names::ivec4
K¶
macroKFR_FNmacroKFR_I_FNmacroKFR_I_FN_FULLmacroKFR_SHUFFLE_SPECIALIZATIONSmacroKFR_VEC_CMP_OPERATORstruct::kfr_vec_hppmacroKFR_VEC_OPERATOR1macroKFR_VEC_OPERATOR2macroKFR_VEC_SHIFT_OPERATOR
L¶
functionless(const T1 &, const T2 &) Element-wise less-than comparison.functionlessorequal(const T1 &, const T2 &) Element-wise less-or-equal comparison.variablescalar_constants<T>::log_10 The natural logarithm of 10 (ln(10)).variablescalar_constants<T>::log_2 The natural logarithm of 2 (ln(2)).typedefopencl_names::long16typedefopencl_names::long2typedefopencl_names::long3typedefopencl_names::long4typedefopencl_names::long8variablevec_halves<T, N>::low Lower (power-of-two) half.functionlow(const vec<T, N> &) Extracts the largest power-of-two-sized low subvector ofx.enum constantcpu_t::lowestfunctionlowhalf(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.typedefmask SIMD mask type ofTelements with default widthvector_width.variableplatform<cpu_t::common>::mask_registersvariableplatform<cpu_t::avx512>::mask_registerstypedefvec<T, N>::mask_tfunctionmaskbits(bool) Returns all-ones or all-zeros of typeTdepending onvalue.typedefmaskfor Obtains the mask type associated with a SIMD type.typedefmat Matrix alias: a vector of vectors,N2rows ofN1columns.variablemax_test_size Maximum vector size (in elements) exercised by the test suite for the current architecture.functionmax(const T1 &, const T2 &) Returns the greater of two values.variableplatform<cpu_t::common>::maximum_vector_alignmentvariableplatform<cpu_t::common>::maximum_vector_alignment_maskvariablemaximum_vector_sizefunctionmin(const T1 &, const T2 &) Returns the smaller of two values.variableplatform<cpu_t::common>::minimum_float_vector_sizevariableplatform<cpu_t::common>::minimum_int_vector_sizevariableminimum_vector_width Minimum SIMD vector width (in elements) for typeTon the native platform.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.enum constantcpu_t::nativevariableplatform<cpu_t::common>::native_cache_alignmentvariableplatform<cpu_t::common>::native_cache_alignment_maskvariableplatform<cpu_t::common>::native_float_vector_sizevariableplatform<cpu_t::avx>::native_float_vector_sizevariableplatform<cpu_t::avx512>::native_float_vector_sizevariableplatform<cpu_t::common>::native_int_vector_sizevariableplatform<cpu_t::avx2>::native_int_vector_sizevariableplatform<cpu_t::avx512>::native_int_vector_sizevariableplatform<cpu_t::common>::native_vector_alignmentvariableplatform<cpu_t::avx>::native_vector_alignmentvariableplatform<cpu_t::avx512>::native_vector_alignmentvariableplatform<cpu_t::common>::native_vector_alignment_maskvariableplatform<cpu_t::avx>::native_vector_alignment_maskvariableplatform<cpu_t::avx512>::native_vector_alignment_maskclassnative_vector_type<T>functionneg(const T1 &) Arithmetic negation ofx.functionnegeven(const vec<T, N> &) Negates the even-indexed lanes ofx.variablescalar_constants<T>::neginfinity The representation of negative infinity for the type T.functionnegodd(const vec<T, N> &) Negates the odd-indexed lanes ofx.typedeffn_generic::noopfunctionnotequal(const T1 &, const T2 &) Element-wise inequality comparison.variablenumeric_typesvariablenumeric_vector_types Instance combining integer and floating-point vector types for use as a value parameter pack.
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.functionvec<T, N>::element::operator+() Unary plus (returns the value).functionvec<T, N>::element::operator-() Unary negation.functionvec<T, N>::element::operator++() Pre-increment.functionvec<T, N>::element::operator--() Pre-decrement.operatorbit<T>::operator Converts to bool by testing the sign bit of the stored mask.functionbit<T>::operator==(bool) Equality comparison against a plain bool.functionbit<T>::operator!=(bool) Inequality comparison against a plain bool.functionbit<T>::operator==(const bit<T> &) Equality comparison between two bit values.functionbit<T>::operator!=(const bit<T> &) Inequality comparison between two bit values.functionvec<T, N>::element::operator=(const element &) Copy-assign from another element proxy.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).functionportable_vec<T, N>::operator==(const portable_vec<T, 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 T1 &, const vec<T2, N> &)functionvec<T, N>::element::operator=(const typename vec<U, M>::element &) Assign from an element proxy of a different vector type.functionvec<T, N>::element::operator=(const value_type &) Assign a scalar to the referenced element.functionvec<T, N>::element::operator+=(const value_type &) Add-assign a scalar.functionvec<T, N>::element::operator-=(const value_type &) Subtract-assign a scalar.functionvec<T, N>::element::operator*=(const value_type &) Multiply-assign a scalar.functionvec<T, N>::element::operator/=(const value_type &) Divide-assign a scalar.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)functionvec<T, N>::operator=(const vec<T, N> &) Copy assignment operator.functionoperator-(const vec<T, N> &)functionoperator~(const vec<T, N> &)operatorf16::operator Converts this IEEE 754 binary16 value to single precision.operatori24::operator Implicit conversion tointvia as_int().functionvec<T, N>::element::operator++(int) Post-increment.functionvec<T, N>::element::operator--(int) Post-decrement.operatorvec<T, N>::operator Convert to a layout-compatibleportable_vec.functionportable_vec<T, N>::operator[](size_t)functionportable_vec<T, N>::operator[](size_t)functionvec<T, N>::operator[](size_t) Read element atindexfrom a const lvalue vector.functionvec<T, N>::operator[](size_t) Read element atindexfrom an rvalue vector.functionvec<T, N>::operator[](size_t) Access element atindexfrom a non-const lvalue vector.functionvec<T, N>::element::operator[](size_t) Index into a compound element (nested vector).functionstruct_with_alignment<T, A>::operator=(T) Assigns a new value to the wrapped member.functionstruct_with_alignment<T, false>::operator=(T) Assigns a new value to the wrapped member.operatorbit<T>::operatoroperatorvec<T, N>::element::operator Read the referenced element.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)functionvec<T, N>::operator=(vec<T, N> &&) Move assignment operator.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.variablepartial_masks Lookup table used bypartial_maskto build vectors with a leading run of all-ones elements.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.typedeffn_generic::pass_throughfunctionpermute(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.variablescalar_constants<T>::pi The mathematical constant π (pi).functionscalar_constants<T>::pi_s(int, int) Returns π scaled bym / d.classpkd_vec<T, N> Packed storage for a vector with no alignment padding.constructorpkd_vec<T, N>::pkd_vec<T, N>() Default constructor (uninitialized).constructorpkd_vec<T, N>::pkd_vec<T, N>(const vec<T, N> &) Store avecinto this packed storage.functionpkd_vec<T, N>::pkd_vec<T, N>(Ts...) Initialize from up toNscalar values.classplatform<c> Trait structure describing the SIMD capabilities of a CPU instruction set.structplatform<cpu_t::avx> Platform traits for AVX. Doubles the native float vector size and alignment to 32 bytes and enables fast unaligned access.structplatform<cpu_t::avx2> Platform traits for AVX2. Extends AVX with 256-bit integer vectors.structplatform<cpu_t::avx512> Platform traits for AVX-512. Provides 512-bit vectors, 64-byte alignment, mask register support and an increased register count.structplatform<cpu_t::common> Platform traits for the common (baseline) x86 instruction set.structplatform<cpu_t::sse2> Platform traits for SSE2. Inherits the common baseline and reports the SSE2 register count.structplatform<cpu_t::sse3> Platform traits for SSE3. Equivalent to SSE2.structplatform<cpu_t::sse41> Platform traits for SSE4.1. Equivalent to SSSE3.structplatform<cpu_t::sse42> Platform traits for SSE4.2. Equivalent to SSE4.1.structplatform<cpu_t::ssse3> Platform traits for SSSE3. Equivalent to SSE3.typedefstruct_with_alignment<T, A>::pointer Pointer to this wrapper type.typedefstruct_with_alignment<T, false>::pointer Pointer to this wrapper type.classportable_vec<T, N> A portable vector type with fixed size and layout compatible withvec<T, N>.constructorportable_vec<T, N>::portable_vec<T, N>()constructorportable_vec<T, N>::portable_vec<T, N>(T)functionportable_vec<T, N>::portable_vec<T, N>(T, T, Ts...)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.variablestride_pointer<const T, groupsize>::ptr Pointer to the first element.
Q¶
variableqnan Quiet NaN (Not-a-Number) as adouble.variablescalar_constants<T>::qnan A quiet NaN (Not-a-Number) value for the type T. This value does not raise floating-point exceptions.
R¶
variablescalar_constants<T>::radtodeg Radians to degrees conversion factor (π * 180).variableu24::raw Raw byte storage.variablei24::raw Raw byte storage.variablef16::raw Raw bit representation of the half-precision value.functionread_group(const T *, size_t) Readscountgroups ofgroup*Nelements separated bystridegroups.functionread(const T *) Reads a vector ofNelements of typeTfrom memory.functionstride_pointer<const T, groupsize>::read(csize_t<N>) GathersNelements from the underlying pointer using the stored stride.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.typedefrealftype Alias forftype<decltype(kfr::real(std::declval<T>()))>typedefrealtype Alias fordecltype(kfr::real(std::declval<T>()))typedefcompound_type_traits<kfr::vec_shape<T, N>>::rebindtypedefcompound_type_traits<kfr::vec<T, N>>::rebindtypedefcompound_type_traits<std::complex<T>>::rebind Rebinds the complex to hold values of typevariablescalar_constants<T>::recip_log_10 The reciprocal of the natural logarithm of 10 (1 / ln(10)).variablescalar_constants<T>::recip_log_2 The reciprocal of the natural logarithm of 2 (1 / ln(2)).variablescalar_constants<T>::recip_pi The reciprocal of π (1/π).functionscalar_constants<T>::recip_pi_s(int, int) Returns the reciprocal of π scaled bym / d.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.classrepresentation<fmt_t<kfr::complex<T>, t, width, prec>> String representation specialization for a formatted complex value.classrepresentation<fmt_t<kfr::generic::vec<T, N>, t, width, prec>>classrepresentation<kfr::complex<T>> String representation specialization forkfr::complex<T>.classrepresentation<kfr::generic::mask<T, N>> String representation of amaskfor formatting/logging.classrepresentation<kfr::generic::vec<T, N>> String representation of avecfor formatting/logging.functionresize(const vec<T, N> &) Resizes a vector to lengthNout.functionresize(const vec<T, N> &) Identity overload of resize() for theNout==Ncase.typedeffn_generic::returnsfunctionreverse(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.enum constantcpu_t::runtime
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.classscalar_constants<T> Collection of mathematical and machine constants for the scalar typeT.functionvec_shape<T, N>::scalar_size() Total number of scalar components, including compound element widths.functionvec<T, N>::scalar_size()typedefvec_shape<T, N>::scalar_type Scalar component type of the element.typedefvec<T, N>::scalar_typefunctionscatter_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.enum constantcpu_t::secondaryfunctionselect(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.functionvec<T, N>::set(csize_t<index>, const value_type &) Set element at compile-timeindex(compound element type).functionvec<T, N>::set(size_t, const value_type &) Set element at runtimeindex(compound element type).functionportable_vec<T, N>::shape()functionvec<T, N>::shape()functionshl(const T1 &, const T2 &) Bitwise left shift.typedefopencl_names::short16typedefopencl_names::short2typedefopencl_names::short3typedefopencl_names::short4typedefopencl_names::short8functionshr(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.functionvec<T, N>::shuffle(const vec<T, N> &, csizes_t<indices...>) Permute elements from two concatenated vectors(*this, y).functionvec<T, N>::shuffle(csizes_t<indices...>) Permute elements of this vector according toi.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.variablesigned_types Type list of all signed integer element types.variablesigned_vector_types Instance of signed_vector_types_t for use as a value parameter pack.typedefsigned_vector_types_t Type list of signed-integer vector instantiations for the test sizes.conceptsimd_compat Concept satisfied by scalar types usable as SIMD elements.variablevec<T, N>::simd_element_count Number of native lanes.variablevec<T, N>::simd_element_sizetypedefvec<T, N>::simd_element_typevariableplatform<cpu_t::common>::simd_register_countvariableplatform<cpu_t::sse2>::simd_register_countvariableplatform<cpu_t::avx512>::simd_register_counttypedefvec<T, N>::simd_typefunctionvec_shape<T, N>::size() Number of elements in the vector.functionportable_vec<T, N>::size()functionvec<T, N>::size()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.variablevec<T, N>::SN Total scalar count.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 orderclassspecial_constants<T> Provides special constants for the scalar subtype ofT.classspecial_scalar_constants<bit<T>> Special scalar constants forbit<T>.structspecial_scalar_constants<double> Provides special bit-pattern constants fordouble.structspecial_scalar_constants<float> Provides special bit-pattern constants forfloat.classspecial_scalar_constants<T> Provides special bit-pattern constants for a scalar type.functionsplit(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).variablescalar_constants<T>::sqr_pi The square of π (pi²).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.variablescalar_constants<T>::sqrt_2 The square root of 2 (√2).enum constantcpu_t::sse2enum constantcpu_t::sse3enum constantcpu_t::sse41enum constantcpu_t::sse42enum constantcpu_t::ssse3typedefvec<T, N>::STvariablestride_pointer<const T, groupsize>::stride Offset (in groups) between consecutive groups.classstride_pointer<const T, groupsize> Read-only strided pointer: a pointer paired with a stride that supports grouped gather reads.classstride_pointer<T, groupsize> Mutable strided pointer: a pointer paired with a stride that supports grouped scatter writes.constructorstride_pointer<T, groupsize>::stride_pointer<T, groupsize>(T *, size_t)classstruct_with_alignment<T, A> Wrapper exposing a member of typeTwith the requested alignment.classstruct_with_alignment<T, false> Packed, unaligned specialization of struct_with_alignment.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).typedefcompound_type_traits<kfr::vec_shape<T, N>>::subtypetypedefcompound_type_traits<kfr::vec<T, N>>::subtypetypedefcompound_type_traits<std::complex<T>>::subtype Scalar component type of the complex value.variablevec<T, N>::SWfunctionswapbyteorder(const T &) Swap byte order ofx.functionswap(const vec<T, N> &) Swaps adjacent groups ofelementslanes.
T¶
variabletest_vector_sizes Set of vector sizes used by the test harness.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.typedefspecial_constants<T>::Tsub The scalar subtype used to provide the constants.typedefconstants<T>::Tsubclass::std::tuple_element<I, kfr::vec<T, N>>class::std::tuple_size<kfr::vec<T, N>>typedefconstruct_common_type<CT, Tpl>::typetypedefvector_types_for_size_t_impl<vec_tpl, T, csizes_t<sizes...>>::typetypedefbitmask<bits>::type The unsigned integer type selected for the requested width.typedefnative_vector_type<T>::typetypedefvec_template<N>::typetypedefvecvec_template<N1, N2>::typetypedefvec_vec_template<N1, N2>::typetypedefrepresentation<kfr::generic::vec<T, N>>::typetypedefrepresentation<fmt_t<kfr::generic::vec<T, N>, t, width, prec>>::typetypedefrepresentation<kfr::generic::mask<T, N>>::typetypedef::std::tuple_element<I, kfr::vec<T, N>>::typetypedefrepresentation<kfr::complex<T>>::type Result type of the conversion.typedefrepresentation<fmt_t<kfr::complex<T>, t, width, prec>>::type Result type of the conversion.typedefvec_of_complex<N>::type The complex vector type for component type
U¶
typedefu16x1typedefu16x16typedefu16x2typedefu16x2x2typedefu16x3typedefu16x32typedefu16x4typedefu16x4x4typedefu16x64typedefu16x8structu24 Unsigned 24-bit integer stored in three bytes (little-endian).typedefu32x1typedefu32x16typedefu32x2typedefu32x2x2typedefu32x3typedefu32x32typedefu32x4typedefu32x4x4typedefu32x64typedefu32x8typedefu64x1typedefu64x16typedefu64x2typedefu64x2x2typedefu64x3typedefu64x32typedefu64x4typedefu64x4x4typedefu64x64typedefu64x8typedefu8x1typedefu8x16typedefu8x2typedefu8x2x2typedefu8x3typedefu8x32typedefu8x4typedefu8x4x4typedefu8x64typedefu8x8functionubitcast(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.typedefopencl_names::uchar16typedefopencl_names::uchar2typedefopencl_names::uchar3typedefopencl_names::uchar4typedefopencl_names::uchar8functionuibitcast(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.typedefopencl_names::uint16typedefopencl_names::uint2typedefopencl_names::uint3typedefopencl_names::uint4typedefopencl_names::uint8typedefopencl_names::ulong16typedefopencl_names::ulong2typedefopencl_names::ulong3typedefopencl_names::ulong4typedefopencl_names::ulong8functionundefinedvector() Return an uninitialized vector of the given type and size.functionundefinedvector(vec_shape<T, N>) Return an uninitialized vector matching the given shape.variableunsigned_types Type list of all unsigned integer element types.variableunsigned_vector_types Instance of unsigned_vector_types_t for use as a value parameter pack.typedefunsigned_vector_types_t Type list of unsigned-integer vector instantiations for the test sizes.typedefunwrap_bitfunctionunwrap_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.typedefvec<T, N>::uscalar_typetypedefopencl_names::ushort16typedefopencl_names::ushort2typedefopencl_names::ushort3typedefopencl_names::ushort4typedefopencl_names::ushort8typedefvec<T, N>::usimd_typetypedefvec<T, N>::uvalue_typetypedefglsl_names::uvec2typedefglsl_names::uvec3typedefglsl_names::uvec4
V¶
variablevec<T, N>::element::v Owning vector.variablevec<T, N>::(Anonymous union at simd/vec.hpp:831:5)::vvariablevec_halves<T, 1>::val The single scalar value.variablebitmask<bits>::value The stored bit value.variablebit<T>::value The raw mask value.variablestruct_with_alignment<T, A>::value The wrapped value.variablestruct_with_alignment<T, false>::value The wrapped value.typedefvec_shape<T, N>::value_type The element type stored in the vector.typedefportable_vec<T, N>::value_typetypedefvec<T, N>::value_typededuction guidevec Deduction guide: a braced list of scalars deduces tovec<common_type, N>.typedefglsl_names::vec2typedefglsl_names::vec3typedefglsl_names::vec4classvec_halves<T, 1> Specialization ofvec_halvesfor single-element vectors.classvec_halves<T, N> Splits avec<T, N>into its two halves for recursive decomposition.classvec_of_complex<N> Helper that maps a scalar component typeTtovec<complex<T>,N>.variablevec_rank Rank of a type within the compound-vector hierarchy.classvec_shape<T, N> Describes the shape of a SIMD vector ofNelements of typeT.constructorvec_shape<T, N>::vec_shape<T, N>() Default constructor.classvec_template<N> Alias template producingvec<T, N>for a fixedN.classvec_vec_template<N1, N2> Alias template producingvec<vec<T, N1>, N2>for fixedN1,N2.classvec<T, 0> Rejected specialization for zero-sized vectors.classvec<T, N> SIMD vector type ofTelements with default widthvector_width.constructorvec<T, N>::vec<T, N>() Default constructor (elements are left uninitialized).constructorvec<T, N>::vec<T, N>(cones_t) Construct an all-ones vector (tag constructor).constructorvec<T, N>::vec<T, N>(const portable_vec<T, N> &) Reinterpret aportable_vecas avec(layout-compatible).constructorvec<T, N>::vec<T, N>(const simd_type &) Construct from a native SIMD register.functionvec<T, N>::vec<T, N>(const U &) Broadcast a compound value to all elements (non-scalar element type).functionvec<T, N>::vec<T, N>(const value_type *, cbool_t<aligned>) Load from a memory location.functionvec<T, N>::vec<T, N>(const value_type &, const value_type &, const Us &...) Construct from two or more compound values (non-scalar element type).constructorvec<T, N>::vec<T, N>(const vec<std::conditional_t<compound_type_traits<T>::is_scalar, bit<T>, T>, N> &) Construct a value vector from a mask of the same scalar type.constructorvec<T, N>::vec<T, N>(const vec<T, N> &) Copy constructor.functionvec<T, N>::vec<T, N>(const vec<T, Ns> &...) Concatenate several vectors whose sizes sum toN.functionvec<T, N>::vec<T, N>(const vec<U, N> &) Promote from a vector of a different (possibly compound) type.constructorvec<T, N>::vec<T, N>(const vec<unwrap_bit<T>, N> &) Construct a mask vector from a value vector of the same scalar type.constructorvec<T, N>::vec<T, N>(czeros_t) Construct an all-zeros vector (tag constructor).functionvec<T, N>::vec<T, N>(from_lambda, Fn &&) Construct from a generator callable.constructorvec<T, N>::vec<T, N>(vec<T, N> &&) Move constructor.functionvector_alignment(size_t) Return the alignment (next power of two ofsize) for a vector ofsizebytes.variablevector_capacity Total SIMD capacity (in elements) for typeTon the native platform.typedefvector_types_for_size_t Convenience alias for the type list produced by vector_types_for_size_t_impl.classvector_types_for_size_t_impl<vec_tpl, T, csizes_t<sizes...>> Specialization that expands the size list into actypes_tof vector types.classvector_types_for_size_t_impl<vec_tpl, T, sizes> Builds a type list of vector instantiations ofvec_tplfor element typeTover the test vector sizes.variablevector_width SIMD vector width (in elements) for typeTon the native platform.variablevector_width_for SIMD vector width (in elements) for typeTon the given CPU.classvecvec_template<N1, N2> Alias template producingvec<vec<T, N1>, N2>for fixedN1,N2.typedefvecx Convenience alias building nestedvectypes from a list of sizes.
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.variablecompound_type_traits<kfr::vec_shape<T, N>>::widthvariablecompound_type_traits<kfr::vec<T, N>>::widthvariablecompound_type_traits<std::complex<T>>::width Number of immediate sub-elements (real and imaginary).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>.variablestride_pointer<T, groupsize>::writable_ptrfunctionwrite_group(T *, size_t, const vec<T, group * count * N> &) Writescountgroups ofgroup*Nelements separated bystridegroups.functionstride_pointer<T, groupsize>::write(const vec<T, N> &, csize_t<N>) ScattersNelements ofvalto the underlying pointer using the stored stride.functionwrite(T *, const vec<T, N> &) Writes a vector ofNelements of typeTto memory.functionvec<T, N>::write(value_type *, cbool_t<aligned>) Store to a memory location.
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.