Namespace kfr¶
A¶
classabstract_reader<T> Base class for all typed readersclassabstract_stream<T> Base class for all typed readers and writerclassabstract_vector<T, Tag> Generic 2D/3D container ofunivectorrows, parameterized by the row storage tag.classabstract_vector<T, tag_array_ref> Specialization ofabstract_vectorthat only holds a non-owning reference to external data.classabstract_vector<T, tag_dynamic_vector> Specialization ofabstract_vectorbacked by a dynamically sizedstd::vectorusing KFR'sdata_allocator.classabstract_writer<T> Base class for all typed writersfunctionacos(E1 &&) Creates an expression that returns the arc cosine of x.functionadvance(T *, ptrdiff_t)functionadvance(void *, ptrdiff_t)structaiff_decoding_options Options for decoding AIFF audio files.structaiff_encoding_options Represents options for AIFF audio encoding.functionalign_down(T *, size_t)functionalign_down(T, std::type_identity_t<T>)functionalign_up(T *, size_t)functionalign_up(T, std::type_identity_t<T>)functionaligned_allocate(size_t) Allocates aligned memoryfunctionaligned_allocate(size_t, size_t) Allocates aligned memoryfunctionaligned_deallocate(T *) Deallocates aligned memorystructaligned_newfunctionarange(T, cbool_t<truncated>) Creates an expression that returns integer values spanning[0, stop)with step 1.functionarange(T, T, T, cbool_t<truncated>) Creates an expression that returns values spanning[start, stop)with the given step.functionarrangement_for_channels(size_t) Returns a predefined speaker arrangement for a given number of channels.functionarrangement_speakers(speaker_arrangement) Returns the canonical channel list for a speaker arrangement.classarray_ref<T> Reference to arrayfunctionarray_to_string(const std::array<size_t, Dims> &, Getter &&, int, int, std::string_view, std::string_view, std::string_view) Render a multi-dimensional array as a nested, brace-delimited string.functionarray_to_string(size_t, Getter &&, int, int, std::string_view, std::string_view, std::string_view) Convenience overload ofarray_to_stringfor a one-dimensional array accessed through a getter callable.functionarray_to_string(size_t, T *, int, int, std::string_view, std::string_view, std::string_view) Convenience overload ofarray_to_stringfor a raw pointer buffer.functionas_string(const Args &...) Convert arbitrary values to astd::stringusing KFR's built-in formatting.functionasin(E1 &&) Creates an expression that returns the arc sine of x.functionassertion_failed(const std::string &, const char *, int) Prints a failed assertion tostderr.functionatan2deg(E1 &&, E2 &&) Creates an expression that returns the arc tangent of y/x (expressed in degrees).functionatan2(E1 &&, E2 &&) Creates an expression that returns the arc tangent of y/x.functionatandeg(E1 &&) Creates an expression that returns the arc tangent of x, expressed in degrees.functionatan(E1 &&) Creates an expression that returns the arc tangent of x.typedefaudio_data_interleaved Alias for audio_data with interleaved storage.typedefaudio_data_planar Alias for audio_data with planar (non-interleaved) storage format.classaudio_data<IsInterleaved> Contiguous audio buffer with optional interleaving.structaudio_decoder Abstract base class for audio decoders providing methods for opening and reading audio files.structaudio_decoding_options Options for generic audio decoding.enumaudio_dithering Supported audio dithering methods.structaudio_dithering_state Represents the state of audio dithering.structaudio_encoder Abstract base class for audio encoders, providing methods for opening, writing, and closing audio files.structaudio_encoding_options Represents options for audio encoding, including dithering settings.structaudio_formatstructaudio_format_and_lengthstructaudio_quantization Represents audio quantization parameters.structaudio_reader_flac<f32>structaudio_reader_flac<f64>structaudio_reader_flac<i16>structaudio_reader_flac<i24>structaudio_reader_flac<i32>classaudio_reader_flac<T> FLAC format readerstructaudio_reader_mp3<f32>structaudio_reader_mp3<f64>structaudio_reader_mp3<i16>structaudio_reader_mp3<i24>structaudio_reader_mp3<i32>classaudio_reader_mp3<T> MP3 format readerstructaudio_reader_wav<f32>structaudio_reader_wav<f64>structaudio_reader_wav<i16>structaudio_reader_wav<i24>structaudio_reader_wav<i32>classaudio_reader_wav<T> WAV format readerclassaudio_reader<T>conceptaudio_sample Concept matching the C++ types accepted as audio samples.functionaudio_sample_bit_depth(audio_sample_type) Returns the bit depth of the given audio sample type.structaudio_sample_get_type<audio_sample_type::f32>structaudio_sample_get_type<audio_sample_type::f64>structaudio_sample_get_type<audio_sample_type::i16>structaudio_sample_get_type<audio_sample_type::i24>structaudio_sample_get_type<audio_sample_type::i32>classaudio_sample_get_type<type> Maps an audio_sample_type enumerator to its native C++ type.functionaudio_sample_is_float(audio_sample_type) Reports whether the given sample type is floating point.functionaudio_sample_sizeof(audio_sample_type) Returns the storage size in bytes of a sample of the given type.structaudio_sample_traits<f32>structaudio_sample_traits<f64>structaudio_sample_traits<i16>structaudio_sample_traits<i24>structaudio_sample_traits<i32>classaudio_sample_traits<T> Compile-time properties of an audio sample C++ type.enumaudio_sample_type Identifies the numeric format of an audio sample.typedefaudio_sample_type_clist List of all supported audio sample types.structaudio_stat Represents audio statistics such as peak and RMS values.structaudio_writer_wav<f32>structaudio_writer_wav<f64>structaudio_writer_wav<i16>structaudio_writer_wav<i24>structaudio_writer_wav<i32>classaudio_writer_wav<T> WAV format writerclassaudio_writer<T>variableaudio_writing_software Software string to write into metadata, if supported by formatenumaudiofile_codec Supported audio file codecs.enumaudiofile_container Supported audio file container formats.functionaudiofile_container_from_extension(std::string_view) Determines the audio container type from a file extension.enumaudiofile_endianness Endianness of audio data.enumaudiofile_error Enumerates possible error codes for audio file operations.structaudiofile_format Represents the format of an audio file.typedefaudiofile_header Represents a fixed-size audio file header.classautocast_impl<Tfrom> Helper returned byautocastthat converts to any type viastatic_cast.functionautocast(const Tfrom &)functionautocorrelate(const univector<T, Tag1> &) Computes the auto-correlation of a real or complex signal.classautofree<T> Smart pointer for aligned memory with automatic deallocation.variableaxis_params_v Inline variable form ofaxis_paramsfor use in expressions.classaxis_params<Axis, N> Compile-time axis descriptor used by SIMD tensor accessors.
B¶
typedefb8 Short names for common typestypedefbinary_reader Binary readertypedefbinary_writer Binary writerfunctionbind_func(Fn &&, Args &&...)classbiquad_section<T> Structure for holding biquad filter coefficients.classbiquad_state<T, filters> Per-section delay-line state for a cascade offiltersbiquad sections.enumbiquad_type Type of biquad filter response used by coefficient design helpers.functionbitcast_anything(const Tin &)classbitmask<bits> Holds an unsigned integer wide enough to storebitsbits.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.classbit<T> Boolean value stored as a mask of typeT(all-ones for true, all-zeros for false).functionbuild_fmt_str(cchars_t<'@', chars...>, ctypes_t<Arg, Args...>) Build a compile-time format string: replace the leading'@'with the specifier forArgand recurse on the remaining arguments.functionbuild_fmt_str(cchars_t<ch, chars...>, ctypes_t<Args...>) Build a compile-time format string: copy a literal character and recurse.functionbuild_fmt_str(cchars_t<>, ctypes_t<>) Build a compile-time printf format string from a literal template and argument types.typedefbyte_reader Byte readertypedefbyte_writer Byte writer
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.functioncabs(E1 &&) Creates an expression that returns the absolute value (magnitude) of the complex number x.functioncabssqr(E1 &&) Creates an expression that returns the squared absolute value (magnitude squared) of the complex number x.structcaff_decoding_options Options for decoding CAFF audio files.structcaff_encoding_options Represents options for CAFF audio encoding.variablecaligned Instance of caligned_t.typedefcaligned_t Compile-time boolean tag selecting aligned access.functioncall_with_temp(size_t, Fn &&) Calls a function with a temporary buffer, allocated on the stack if small enough, otherwise on the heap.functioncarg(E1 &&) Creates an expression that returns the phase angle (argument) of the complex number x.functioncartesian(E1 &&) Creates an expression that converts a complex number to cartesian form.functioncast(Arg &&) Creates an expression that converts the values ofargto typeT.functioncast(Arg &&, ctype_t<T>) Creates an expression that converts the values ofargto typeT.typedefcbase Alias for complex<fbase>variablecbooltypedefcbool_t Compile-time boolean constantvariablecbools Constant instance of cbools_t<vals...>typedefcbools_t Compile-time list of boolean valuesfunctioncbrt(E1 &&) Creates an expression that returns the cube root of x.variablecchars Constant instance of cchars_t<vals...>typedefcchars_t Compile-time list of char valuesfunctioncconcat(T1, Ts...) Returns a value of the concatenated list typefunctionccos(E1 &&) Creates an expression that returns the cosine of the complex value x.functionccosh(E1 &&) Creates an expression that returns the hyperbolic cosine of the complex value x.variableccpu Compile-time constant instance ofccpu_t.typedefccpu_t Compile-time wrapper around acpu_tvalue.typedefcdirect_t Tag type selecting the direct (forward) DFT direction.functioncexp10(E1 &&) Creates an expression that returns 10 raised to the complex number x.functioncexp2(E1 &&) Creates an expression that returns 2 raised to the complex number x.functioncexp(E1 &&) Creates an expression that returns \(e\) raised to the complex number x.variablecfalse Constant instance of cfalse_ttypedefcfalse_t Compile-time false value typevariablecfalse_true Constant instance oftypedefcfilter_t Filters a cvals_t list, keeping only elements whose corresponding flag isfunctioncfilter(cvals_t<T, vals...>, cvals_t<bool, flags...>)functioncfind(cvals_t<T, values...>, std::type_identity_t<T>)classcfor_t<stop, start, conditional> Compile-time for loop helper that unrolls iteration over[start, stop).variablecfor_v Constant instance ofcfor_t<stop, start, conditional>used as the left-hand side ofKFR_FOR/KFR_FORC.functioncfor(cval_t<T, start>, cval_t<T, stop>, BodyFn &&)functioncforeach(A0 &&, A1 &&, A2 &&, A3 &&, Fn &&) Invokesfunctioncforeach(A0 &&, A1 &&, A2 &&, Fn &&) Invokesfunctioncforeach(A0 &&, A1 &&, Fn &&)functioncforeach(const std::tuple<Ts...> &, Fn &&)functioncforeach(ctypes_t<Ts...>, Fn &&)functioncforeach(cvals_t<T, values...>, Fn &&)functioncforeach(T &&, Fn &&)typedefchan Determines the channel type based on interleaving.functioncheck_assertion(...) SFINAE fallback for non-comparison arguments.functioncheck_assertion(const comparison<Op, L, R> &, const char *, const char *, int) Evaluates a full comparison and reports it on failure.functioncheck_assertion(const half_comparison<L> &, const char *, const char *, int) Evaluates a half comparison (a bare boolean operand) and reports it on failure.functionchoose_const() Selects the constant of the specific type from a list of candidates. Returns the candidate whose type matchesT; triggers a static_assert ifTis not present.functionchoose_const_fallback(C1) Single-argument fallback: convertsfunctionchoose_const_fallback(C1, Cs...)functionchoose_const(C1, Cs...) Recursively skips candidates whose type does not matchfunctioncif(cbool_t<false>, TrueFn &&, FalseFn &&) Compile-time conditional: invokesfunctioncif(cbool_t<true>, TrueFn &&, FalseFn &&)variablecindex Variable template form ofcindex_t.typedefcindex_t Compile-time constant of typeindex_t.variablecint Constant instance of cint_t<val>typedefcint_t Compile-time int constantvariablecintrange Constant instance of the int rangevariablecints Constant instance of cints_t<vals...>typedefcints_t Compile-time list of int valuesvariablecintseq Constant instance of an int sequence withtypedefcinvert_t Tag type selecting the inverse DFT direction.functionclock_elapsed(uint64_t) Returns the elapsed time in seconds sincestart_time,based onclock_now.functionclock_frequency() Returns the number of ticks per second for the clock used in clock_now().functionclock_now() Returns the current value of the OS's highest-resolution monotonic clock. On modern hardware, these typically map to hardware instructions (RDTSC/CNTVCT_EL0) via user-mode shared pages, avoiding a heavy syscall context switch.functionclog10(E1 &&) Creates an expression that returns the common (base-10) logarithm of the complex number x.functionclog2(E1 &&) Creates an expression that returns the binary (base-2) logarithm of the complex number x.functionclog(E1 &&) Creates an expression that returns the natural logarithm of the complex number x.functioncmatch(T &&, Fn &&, Args...)functioncmaxof(cvals_t<T>) Returns the maximum value in the list (min offunctioncmaxof(cvals_t<T, val, vals...>) Returns the maximum value in the listfunctioncminof(cvals_t<T>) Returns the minimum value in the list (max offunctioncminof(cvals_t<T, val, vals...>) Returns the minimum value in the liststructcmp_eqstructcmp_gestructcmp_gtstructcmp_lestructcmp_ltstructcmp_neclasscommon_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<...>>.classcomparison<Fn, L, R>namespacecompiletimetypedefcomplex Complex number type alias.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.classcompound_type_traits<std::pair<T, T>> Specialization of compound_type_traits forstd::pair<T, T>classcompound_type_traits<T> Traits describing how a type composes scalar elements. Specialized for compound types (e.g.std::pair) to expose width, subtype and accessors.functionconcat_args()functionconcat_args(const std::string &, const Ts &...)functionconcat_cstring()functionconcat_cstring(const cstring<N1> &)functionconcat_cstring(const cstring<N1> &, const cstring<N2> &, const Args &...)typedefconcat_lists Concatenates two or more cvals_t or ctypes_t lists into a single listfunctionconcatenate(Arg1 &&, Arg2 &&) Creates an expression that concatenates two input expressions along the given axis.functionconcatenate(Arg1 &&, Arg2 &&, Arg3 &&) Creates an expression that concatenates three input expressions along the given axis.variablecones Instance of cones_t.structcones_t Tag type selecting all-ones initialization.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>typedefcontainer_value_typeclassconvolve_filter<T> Streaming convolution filter using the overlap-add (block convolution) method.functionconvolve(const univector<T1, Tag1> &, const univector<T2, Tag2> &) Computes the linear convolution of two real or complex signals.functioncorrelate(const univector<T1, Tag1> &, const univector<T2, Tag2> &) Computes the linear correlation of two real or complex signals.functioncosdeg(E1 &&) Creates an expression that returns the trigonometric cosine of x (expressed in degrees).functioncos(E1 &&) Creates an expression that returns the trigonometric cosine of x.functioncosh(E1 &&) Creates an expression that returns the hyperbolic cosine of x.functioncoshsinh(E1 &&) Creates an expression that returns the hyperbolic cosine of the even elements of x and the hyperbolic sine of the odd elements of x.functioncossindeg(E1 &&) Creates an expression that returns the trigonometric cosine of the even elements of x and sine of the odd elements. x must be expressed in degrees.functioncossin(E1 &&) Creates an expression that returns the trigonometric cosine of the even elements of x and sine of the odd elements. x must be a vector.functioncoth(E1 &&) Creates an expression that returns the hyperbolic cotangent of x.functioncounter(T) Creates a 1-Dexpression_counterwith step 1.functioncounter(T, Arg, Args...) Creates an N-dimensionalexpression_counterwith one step per dimension.functioncprod(cvals_t<T>) Returns the product of all values in the list (1 for an empty list)functioncprod(cvals_t<T, first, rest...>) Returns the product of all values in the listvariablecpu_all Compile-time list of all CPU instruction sets supported by the current architecture that are not newer thancpu_t::native.structcpu_features Detected x86 CPU capabilities and identifying strings.functioncpu_name(cpu_t) Returns the name of the given CPU instruction set.functioncpu_runtime() Returns the current CPU name at runtime.enumcpu_t Enumeration representing a CPU instruction set.variablecpuval Compile-time constant instance ofcpuval_t.typedefcpuval_t Compile-time wrapper around acpu_tvalue (alias).functioncreate_aiff_decoder(const aiff_decoding_options &) Creates a decoder for AIFF audio files.functioncreate_aiff_encoder(const aiff_encoding_options &) Creates an AIFF audio encoder with optional encoding options.functioncreate_caff_decoder(const caff_decoding_options &) Creates a decoder for CAFF audio files.functioncreate_caff_encoder(const caff_encoding_options &) Creates a CAFF audio encoder with optional encoding options.functioncreate_decoder_for_container(audiofile_container, const audio_decoding_options &) Creates an audio decoder for a specific container type.functioncreate_decoder_for_file(const file_path &, const audio_decoding_options &) Creates an audio decoder for a file.functioncreate_decoder_from_header(const audiofile_header &, const audio_decoding_options &) Creates an audio decoder from a file header.functioncreate_encoder_for_container(audiofile_container, const audio_encoding_options &) Creates an audio encoder for the specified container format with optional encoding options.functioncreate_flac_decoder(const flac_decoding_options &) Creates a decoder for FLAC audio files.functioncreate_flac_encoder(const flac_encoding_options &) Creates a FLAC audio encoder with optional encoding options.functioncreate_mp3_decoder(const mp3_decoding_options &) Creates an MP3 audio decoder with the specified decoding options.functioncreate_raw_decoder(const raw_decoding_options &) Creates a decoder for raw audio streams.functioncreate_raw_encoder(const raw_encoding_options &) Creates a raw audio encoder with optional encoding options.functioncreate_w64_decoder(const w64_decoding_options &) Creates a decoder for W64 audio files.functioncreate_w64_encoder(const w64_encoding_options &) Creates a W64 audio encoder with optional encoding options.functioncreate_wave_decoder(const wave_decoding_options &) Creates a decoder for WAVE audio files.functioncreate_wave_encoder(const wave_encoding_options &) Creates a WAVE audio encoder with optional encoding options.functioncsin(E1 &&) Creates an expression that returns the sine of the complex value x.functioncsinh(E1 &&) Creates an expression that returns the hyperbolic sine of the complex number x.variablecsize Constant instance of csize_t<val>typedefcsize_t Compile-time size_t constantvariablecsizerange Constant instance of the size_t rangevariablecsizes Constant instance of csizes_t<vals...>typedefcsizes_t Compile-time list of size_t valuesvariablecsizeseq Constant instance of csizeseq_t withtypedefcsizeseq_t Compile-time sequence of size_t valuesfunctioncsqr(E1 &&) Creates an expression that returns the square of the complex number x.functioncsqrt(E1 &&) Creates an expression that returns the square root of the complex number x.classcstring<N>functioncsum(cvals_t<T>) Returns the sum of all values in the list (0 for an empty list)functioncsum(cvals_t<T, first, rest...>) Returns the sum of all values in the listfunctioncswitch(cvals_t<T>, std::type_identity_t<T>, Fn &&, DefFn &&, CmpFn &&) Switch over an empty list: always invokes the default handlerfunctioncswitch(cvals_t<T, v0, values...>, std::type_identity_t<T>, Fn &&, DefFn &&, CmpFn &&)functioncswitch(cvals_t<T, vs...>, const U &, Function &&, Fallback &&)variablectrue Constant instance of ctrue_ttypedefctrue_t Compile-time true value typevariablectype Constant instance of ctype_t<T>functionctype_name()classctype_t<T> Compile-time wrapper for a single type. Used to pass types as values in metaprogramming contexts.functionctypeid() Gets unique value associated with the typefunctionctypeid(T) Gets unique value associated with the typevariablectypes Constant instance of ctypes_t<Ts...>classctypes_t<Ts> Compile-time list of types.variablecuint Constant instance of cuint_t<val>typedefcuint_t Compile-time unsigned constantvariablecuintrange Constant instance of the unsigned rangevariablecuints Constant instance of cuints_t<vals...>typedefcuints_t Compile-time list of unsigned valuesvariablecuintseq Constant instance of an unsigned sequence withvariablecunaligned Instance of cunaligned_t.typedefcunaligned_t Compile-time boolean tag selecting unaligned access.functioncurrent_epsilon()classcursor<Dims> Multi-dimensional iteration cursor.variablecval Constant instance of cval_t<T, val>classcval_t<T, val> Compile-time constant wrapper carrying a value of typeT. Usable as a non-type template parameter and convertible to its underlying value.variablecvalrange Constant instance of the value rangevariablecvals Constant instance of cvals_t<T, values...>classcvals_t<T> Empty specialization of cvals_t.classcvals_t<T, values> Compile-time list of constant values of typeT. Supports indexing, slicing, mapping and equality comparison at compile time.variablecvalseq Constant instance of cvalseq_t withtypedefcvalseq_t Compile-time arithmetic sequence ofsizevalues starting atstartwith stepstep.variablecwindow_type Compile-time window type valuetypedefcwindow_type_t Compile-time window type tagvariableczeros Instance of czeros_t.structczeros_t Tag type selecting zero-initialization.
D¶
classdata_allocator<T> Aligned allocatorenumdatatype An enumeration representing data typefunctiondB_to_string(const T &, double) Converts dB value to string (uses oo for infinity symbol)functiondB_to_utf8string(const T &, double) Converts dB value to string (uses infinity symbol in utf-8 encoding)functiondcremove(E1 &&, double)functiondcremove(E1 &&, double, double) Applies a DC removal filter to the given input expression.classdct_plan<T> Plan for computing the Discrete Cosine Transform (DCT type 2, unscaled).typedefdecay_common Decays to the common type of the supplied arguments after decay.functiondecode_audio_file(const file_path &, audiofile_format *, const audio_decoding_options &) Decodes an audio file and returns the audio data in an interleaved format.functiondeep_is_equal(const T1 &, const T2 &)typedefdeep_subtype The deepest scalar subtype of a (possibly nested) compound typevariabledefault_audio_frames_to_read The default number of audio frames to read in one operation.variabledefault_dft_algorithmvariabledefault_memory_alignmentfunctionderived_cast(const U *) Down-casts a const pointer fromfunctionderived_cast(U *)namespacedetailsenumdft_algorithm Concrete DFT/FFT algorithm selection.enumdft_decomp Decomposition direction for a butterfly pass.enumdft_family Family of DFT algorithms (groups related algorithms).enumdft_order Specifies the desired order for DFT output (and IDFT input).enumdft_pack_format Specifies the packing format for real DFT output data. See https://www.kfr.dev/docs/latest/dft_format/ for detailsclassdft_plan_md_real<T, Dims> Multidimensional real-to-complex / complex-to-real DFT plan.classdft_plan_md<T, Dims> Multidimensional complex DFT plan.classdft_plan_real<T> Real-to-complex and complex-to-real 1D DFT plan.classdft_plan<T> Class for performing 1D DFT/FFT.structdft_resampler_params Parameters for constructing adft_resampler.classdft_resampler<T> FFT-based sample-rate converter and FIR filter using overlap-save.typedefdft_stage_ptrclassdft_stage<T> Base structure representing a single DFT stage.enumdft_type Direction(s) of DFT computation requested for a plan.typedefdimset Fixed-size bitmask indexed by tensor axis.functiondistance(const void *, const void *)functiondont_deduce(T)variabledynamic_shape Sentinel rank value indicating a run-time-determined rank.
E¶
functionelement_size()functionelement_size<>()variableelements Constant instance of elements_t<vals...>typedefelements_t Compile-time list of element indices (size_t values)classempty_struct<tag> Empty type tagged with a unique integertag.functionencode_audio_file(const file_path &, const audio_data_interleaved &, const audiofile_format &, audio_decoder *, const audio_encoding_options &) Encodes interleaved audio data and writes it to a file.functionencode_audio_file(const file_path &, const audio_data_planar &, const audiofile_format &, audio_decoder *, const audio_encoding_options &) Encodes planar audio data and writes it to a file.classepsilon_scope<T>structepsilon_scope<void>classequality_comparer<L, R>functionerror(const Args &...) Print values to stderr, each formatted with its default conversion specifier.functionerrorln(const Args &...) Print values to stderr followed by a newline, then flush stderr.classexceptionfunctionexp10(E1 &&) Creates an expression that returns 10 raised to the given power x.functionexp2(E1 &&) Creates an expression that returns 2 raised to the given power x.functionexp_fmadd(E1 &&, E2 &&, E3 &&) Creates an expression that returns exp(x * m + a).classexpand_cvals<T, Tpl, cvals_t<T, vals...>> Specialization ofexpand_cvalsthat instantiatesTplwith the pack values.classexpand_cvals<T, Tpl, Pack> Expands acvals_tpack into a template expecting non-type parameters.functionexp(E1 &&) Creates an expression that returns \(e\) raised to the given power x.conceptexpr_element Concept satisfied by scalar vector element types.conceptexpression_argument Concept satisfied by input expressions that must appear as an explicit operand (i.e. not implicitly convertible from a scalar argument).conceptexpression_arguments Concept satisfied when allEare input expressions and at least one of them is an explicit operand.classexpression_cast<T, Arg> Expression that converts the values of the wrapped expression to typeT.classexpression_concatenate<Arg1, Arg2, ConcatAxis> Expression that joins two expressions along a single axis.classexpression_counter<T, Dims> Expression that produces a sequence of valuesstart, start + step, start + 2*step, ...for one or more dimensions.variableexpression_dims Inline variable holding the number of dimensions of an expression.classexpression_filter<T> Filter adapter that wraps an expression containing a placeholder.classexpression_fixshape<Arg, Shape> Expression that overrides the shape of another expression with a compile-time shape.classexpression_handle<T, Dims> Opaque type-erased handle to an expression (forward declaration).classexpression_lambda<T, Dims, Fn, Rnd> Expression backed by a user-provided callable.classexpression_linspace<T, truncated> Expression that produces evenly spaced values fromstarttostop.classexpression_padded<Arg> Expression that extends another expression with a constant fill value.classexpression_placeholder<T, Dims, Key> A placeholder expression that can be bound to a concrete expression at runtime.variableexpression_random_access Inline variable indicating whether an expression supports random access.classexpression_reshape<Arg, OutDims> Expression that exposes the same data as another expression with a different shape.structexpression_resource Base class for owning the storage of a type-erased expression.classexpression_resource_impl<E>expression_resourcethat owns an expression of typeEby value.classexpression_reverse<Arg> Expression that exposes another expression with its trailing dimension reversed.classexpression_scalar<T> Expression that wraps a single scalar value of typeT.classexpression_slice<Arg> Expression that exposes a sub-region of another expression.structexpression_traits_defaults Base struct providing default values for expression traits.classexpression_traits<const T> Pass-through specialization that forwards traits for const-qualified expression types.classexpression_traits<const T &> Pass-through specialization that forwards traits for const lvalue reference expression types.classexpression_traits<const T &&> Pass-through specialization that forwards traits for const rvalue reference expression types.classexpression_traits<expression_cast<T, Arg>>classexpression_traits<expression_concatenate<Arg1, Arg2, ConcatAxis>>classexpression_traits<expression_counter<T, Dims>>classexpression_traits<expression_fixshape<Arg, fixed_shape_t<ShapeValues...>>>classexpression_traits<expression_handle<T, Dims>>expression_traitsspecialization forexpression_handle.classexpression_traits<expression_lambda<T, Dims, Fn, Rnd>>classexpression_traits<expression_linspace<T, truncated>>classexpression_traits<expression_padded<Arg>>classexpression_traits<expression_placeholder<T, Dims, Key>>expression_traitsspecialization forexpression_placeholder.classexpression_traits<expression_reshape<Arg, OutDims>>classexpression_traits<expression_reverse<Arg>>classexpression_traits<expression_scalar<T>>classexpression_traits<expression_slice<Arg>>classexpression_traits<strided_channel<T>>classexpression_traits<T> Primary traits template for expressions.classexpression_traits<T &> Pass-through specialization that forwards traits for lvalue reference expression types.classexpression_traits<T &&> Pass-through specialization that forwards traits for rvalue reference expression types.classexpression_traits<T> Specialization ofexpression_traitsfor scalar vector element types.classexpression_traits<tensor<T, Dims>> Expression traits for tensor, enabling its use as an expression argument.classexpression_traits<univector<T, Tag>> Expression traits forunivector, allowing it to participate in KFR expression evaluation.typedefexpression_value_type Helper alias that extracts the value type of an expression.classexpression_vtable<T, Dims> Virtual table providing type-erased access to an expression of value typeTand dimensionalityDims.
F¶
structf16 16-bit half-precision floating-point value stored as raw bits.typedeff32typedeff32_reader float readertypedeff32_writer float writertypedeff64typedeff80conceptf_classfunctionfactorial_approx(E1 &&) Creates an expression that returns the approximate factorial of x.functionfastcosdeg(E1 &&) Creates an expression that returns an approximation of the trigonometric cosine of x (expressed in degrees).functionfastcos(E1 &&) Creates an expression that returns an approximation of the trigonometric cosine of x.functionfastsindeg(E1 &&) Creates an expression that returns an approximation of the trigonometric sine of x (expressed in degrees).functionfastsin(E1 &&) Creates an expression that returns an approximation of the trigonometric sine of x.typedeffbasefunctionfile_extension(const file_path &)structfile_handletypedeffile_pathclassfile_reader<T> Typed file readerclassfile_writer<T> Typed file writertypedeffilepathtypedeffilter_fir Alias forclassfilter<T> Abstract base class for single-argument filters, mainly intended for DSP processing.typedeffindinttypeclassfir_filter<T, U> Runtime FIR filter implementing thefilter<U>interface.deduction guidefir_params Deduction guide forfir_paramsfrom an arbitrary container.classfir_params<T> Parameters of a generic FIR filter: the tap vector.deduction guidefir_state Deduction guide forfir_statefrom an arbitrary container.classfir_state<T, U> State of a generic FIR filter: parameters plus a ring-buffer delay line.typedeffir_taps Alias for a fixed-size vector of FIR filter coefficients.typedeffix_typevariablefixed_shape Convenience variable template for instantiating afixed_shape_t.classfixed_shape_t<Values> Type-level storage for a fixedshapebuilt from a list of constants.functionfixshape(Arg &&, const fixed_shape_t<ShapeValues...> &) Creates an expression that overrides the shape ofargwith a compile-time shape.structflac_decoding_options Options for decoding FLAC audio files.structflac_encoding_options Represents options for FLAC audio encoding.typedeffloat_type Maps a bit width to the corresponding floating-point type (32 -> float, 64 -> double)variablefloat_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_div(long long, long long)typedefflt_typetypedeffmaxclassfmt_t<T, t, width, prec> Wrapper that carries a value together with printf-style format options.functionfmt(const T &) Wrapvaluewith a custom conversion specifier.functionfmtwidth(const T &) Wrapvaluewith only width/precision, keeping the default conversion specifier.namespacefn_genericstructfn_get_firststructfn_get_secondstructfn_get_thirdstructfn_is_betweenstructfn_is_equalstructfn_is_greaterstructfn_is_greaterorequalstructfn_is_lessstructfn_is_lessorequalstructfn_is_notequalclassfn_noinline<Fn> Functor wrapper that invokesFnthroughnoinline.structfn_noopstructfn_pass_throughclassfn_return_constant<T, value> Functor returning a fixed constant of typeT, ignoring all arguments.classfn_returns<T>functionfopen_path(const file_path &, open_file_mode)variableforce_compiletime_size_t Forces a compile-time evaluation of the givensize_tvalue.classformat_t<chars> Callable object holding a compile-time format literal (built byoperator""_format).functionformat(const std::string &, const Args &...) Format values into astd::stringusing a{}"-basedformat string.functionfprintfmt(FILE *, const std::string &, const Args &...) Print to a filefusing a{}"-basedformat string.structfraction Exact rational number represented as a numerator/denominator pair.functionfrom_error_code(std::error_code) Converts a standard error code to an audiofile_error.functionfrom_maskbits(T) Interpretsvalueas a signed integer and tests the sign bit.typedeffsubtypetypedefftypetypedeffunction_arguments Extracts the argument types of a functor'stypedeffunction_result Extracts the return type of a functor's
G¶
functiongamma(E1 &&) Creates an expression that returns the approximate gamma function of x.namespacegenericfunctionget_cpu() Returns the CPU instruction set selected for use at runtime.functionget_element(E &&, shape<Dims>) Reads a single element from an expression at the given index.functionget_elements(const strided_channel<T> &, const shape<1> &, const axis_params<0, N> &)functionget_first(T1 &&, Ts &&...) Function that returns its first argument and ignores all other argumentsfunctionget_second(T1, T2 &&, Ts &&...) Function that returns its second argument and ignores all other argumentsfunctionget_shape() Returns the static shape of an expression type.functionget_shape(T &&) Returns the shape of an expression instance.functionget_third(T1 &&, T2 &&, T3 &&, Ts &&...) Function that returns its third argument and ignores all other arguments
H¶
classhalf_comparison<L>concepthas_begin_end Concept satisfied by types that supportconcepthas_data_size Concept satisfied by types that supportconcepthas_expression_traits Concept that is satisfied whenexpression_traits<T>is well-formed.
I¶
typedefi16structi24 Signed 24-bit integer stored in three bytes (little-endian).typedefi32typedefi64typedefi8concepti_classclassiir_filter<T> Runtime IIR filter object usable as a streaming filter.deduction guideiir_paramsdeduction guideiir_paramsdeduction guideiir_paramsdeduction guideiir_paramsdeduction guideiir_paramsdeduction guideiir_paramsclassiir_params<T, filters> Fixed-size container of biquad coefficients stored as SoA vectors.classiir_params<T, tag_dynamic_vector> Dynamic-size specialization of iir_params.deduction guideiir_statededuction guideiir_stateclassiir_state<T, filters> Combined IIR filter parameters and runtime state.functionilog2(T) Returns the base-2 logarithm oftypedefimaxfunctionimplicit_cast(U &&)typedefindex_t Unsigned integer type used for tensor indices and axis sizes.variableindex_undefined Sentinel index value meaning "no index".functionindices(const shape<Dims> &, axis_params<VecAxis, N>) Computes the vector of indices along an axis for a vectorized read.variableindicesfor Constant instance of indicesfor_t for the given type listtypedefindicesfor_t Returns a sequence of indicesvariableinfinite_size Sentinel value denoting a dimension of unbounded/unknown size.variableinfinity Positive infinity as adouble.classinitialvalue<T> Used to determine the initial value for reduce functions.classinline_vector<T, N> A sequence container with fixed-capacity inline storage.conceptinput_expression Concept satisfied by expressions that can be read from.conceptinput_output_expression Concept satisfied by expressions that are both readable and writable.typedefint_type Maps a bit width to the corresponding signed integer typevariableinteger_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.namespaceinternal_genericfunctionis_between(T, std::type_identity_t<T>, std::type_identity_t<T>)variableis_bit True whenTis abit<U>specialization.variableis_complex Variable template:trueifTis acomplexspecialization.variableis_compound_type iffunctionis_constant_val(cval_t<T, value>) Returnsfunctionis_constant_val(T) Returnsfunctionis_divisible(T, T)functionis_equal(const T1 &, const T2 &) Returnsfunctionis_even(T) Returnsvariableis_expr_element Inline variable that istruewhenTis a non-cv-qualified scalar vector element type.variableis_f_classfunctionis_greater(const T1 &, const T2 &) Returnsfunctionis_greaterorequal(const T1 &, const T2 &) Returnsvariableis_i_classvariableis_infinite Inline variable that istruewhen the shape ofEis infinite.variableis_input_expression Inline variable that istruewhenEsatisfiesinput_expression.variableis_input_output_expression Inline variable that istruewhenEsatisfiesinput_output_expression.functionis_less(const T1 &, const T2 &) Returnsfunctionis_lessorequal(const T1 &, const T2 &) Returnsfunctionis_notequal(const T1 &, const T2 &) Returnsvariableis_number ifvariableis_number_or_bool ifvariableis_numbersvariableis_numeric Check if the type argument is a number or a compound type of numbersvariableis_numeric_args Check if the type arguments are numbers or compound types of numbersvariableis_numeric_or_bool Check if the type argument is a number, bool or a compound type of numbers or boolfunctionis_odd(T) Returnsvariableis_output_expression Inline variable that istruewhenEsatisfiesoutput_expression.functionis_poweroftwo(T) Returnsfunctionis_sequence(csizes_t<number, numbers...>)variableis_simd_float_type True whenTis a floating-point SIMD element type.variableis_simd_int_type True whenTis an integer SIMD element type.variableis_simd_type True whenTis one of the scalar types usable as a SIMD element.functionis_single_codec(audiofile_container) Checks if a container supports a single codec.variableis_u_classtypedefis_val_ttypedefisubtypetypedefitype
J¶
functionjoin(T) Convert a single value to a string (terminator ofjoin).functionjoin(T, U, Ts...) Join values into a comma-separated string of the form{x},{y}, {rest...}".functionjust_value(T)
L¶
functionlambda_generator(Fn &&) Creates an expression backed by a non-random-access callable.functionlambda(Fn &&, cbool_t<RandomAccess>) Creates an expression backed by a callable.functionlibrary_version() Returns the string representation of the KFR library version, including target architecture.functionlibrary_version_audio() Returns the full version string of the KFR audio module.functionlibrary_version_codecs() Returns a comma-separated list of enabled audio codecs.functionlibrary_version_dft() Returns the full version string of the KFR DFT module.functionlibrary_version_dsp() Returns the full version string of the KFR DSP module.functionlibrary_version_io() Returns the full version string of the KFR IO module.functionlinspace(T1, T2, size_t, bool, cbool_t<truncated>) Creates an expression that returns evenly spaced numbers over a specified interval.functionload_from_npy(tensor<T, Dims> &, Fn &&) Loads a tensor from.npyformat using a custom read callback.typedeflockfree_ring_buffer Backward-compatible alias forspsc_ring_buffer.functionlog10(E1 &&) Creates an expression that returns the common (base-10) logarithm of x.functionlog2(E1 &&) Creates an expression that returns the binary (base-2) logarithm of x.functionlog_fmadd(E1 &&, E2 &&, E3 &&) Creates an expression that returns log(x) * m + a.functionlogb(E1 &&) Creates an expression that returns the rounded binary (base-2) logarithm of x.functionlog(E1 &&) Creates an expression that returns the natural logarithm of x.classlogic_errorfunctionlogm(E1 &&, E2 &&) Creates an expression that returns log(x) * y.functionlogn(E1 &&, E2 &&) Creates an expression that returns the logarithm of x with base y.
M¶
functionmake_array_ref(Container &&)functionmake_array_ref(T *, std::size_t)structmake_comparisonfunctionmake_cstring(cchars_t<chars...>)functionmake_cstring(const char (&)[N])functionmake_memory_finalizer(Fn &&) Creates a memory finalizer that invokesfnwhen the handle is destroyed.functionmake_nonmember(const Fn &)functionmake_range(T, T) Make iterable range objectfunctionmake_range(T, T, D) Make iterable range object with stepfunctionmake_resource(E &&) Create anexpression_resourceowninge(moved in), allocated with proper alignment.functionmake_univector(const Container &) Creates univector from a container (must have data() and size() methods)functionmake_univector(const T (&)[N]) Creates univector from a sized arrayfunctionmake_univector(const T *, size_t) Creates univector from data and sizefunctionmake_univector(Container &) Creates univector from a container (must have data() and size() methods)functionmake_univector(T (&)[N]) Creates univector from a sized arrayfunctionmake_univector(T *, size_t) Creates univector from data and sizefunctionmap_indices() Returns a value ofmap_indices_t<size, Fn...>for use in non-type contexts.classmap_indices_impl<size, Fn> Compile-time index transformer used to build shuffle/permutation tables.typedefmap_indices_t Alias for thecsizes_tproduced bymap_indices_impl<size, Fn...>.functionmaskbits(bool) Returns all-ones or all-zeros of typeTdepending onvalue.variablemax_audio_channels Maximum number of channels in audio data.variablemax_index_t Maximum representable value ofindex_t.variablemax_sindex_t Maximum representable value ofsigned_index_t.variablemax_size_t Maximum value representable by size_tvariablemax_test_size Maximum vector size (in elements) exercised by the test suite for the current architecture.variablemaximum_biquad_count Maximum number of cascaded biquad sections (maximum_iir_order / 2).variablemaximum_dims Upper bound on the number of dimensions supported byshape.variablemaximum_expression_width Maximum vector width (in elements) supported by an expression handle for typeT.variablemaximum_iir_order Maximum supported IIR filter order.functionmeasure_rdtsc_cycle_time() Measures and returns the estimated cycle time in nanoseconds per tick for rdtsc.typedefmemory_finalizer Shared ownership handle for a memory finalizer.classmemory_reader<T>classmemory_writer<T>typedefmetadata_map Metadata map for storing key-value pairs.functionmodzerobessel(E1 &&) Creates an expression that returns the modified Bessel function of the first kind of order 0 of x.classmoving_sum_state<U, Tag> State for a moving-sum (rectangular window) filter with a compile-time-sized delay line.classmoving_sum_state<U, tag_dynamic_vector> Specialization ofmoving_sum_statefor a runtime-sized window.structmp3_configstructmp3_decoding_options Options for decoding MP3 audio files.
N¶
structnamedclassnamed_arg<T>functionnext_poweroftwo(T) Returns a nearest power of two that is greater or equal than nfunctionngfft_execute(const ngfft_plan<T> &, bool, complex<T> *, const complex<T> *, dft_algorithm) Executes the FFT with separate input and output buffers, runtime direction and algorithm.functionngfft_execute(const ngfft_plan<T> &, bool, complex<T> *, dft_algorithm) Executes the FFT in-place with runtime direction and algorithm.functionngfft_execute(const ngfft_plan<T> &, cbool_t<inverse>, complex<T> *, const complex<T> *, dft_algorithm) Executes the FFT with separate input and output buffers, a compile-time direction and runtime algorithm.functionngfft_execute(const ngfft_plan<T> &, cbool_t<inverse>, complex<T> *, dft_algorithm) Executes the FFT in-place with a compile-time direction and runtime algorithm.functionngfft_initialize(ngfft_plan<T> &, dft_algorithm) Initializes the plan's twiddles for a runtime algorithm value.classngfft_plan_real<T>classngfft_plan<T> Plan structure for the ng FFT algorithms (new in KFR 7.1).functionngfft_real_execute(const ngfft_plan<T> &, complex<T> *, const T *, dft_algorithm) Executes the forward real-to-complex FFT with a runtime algorithm.functionngfft_real_execute(const ngfft_plan<T> &, T *, const complex<T> *, dft_algorithm) Executes the inverse complex-to-real FFT with a runtime algorithm.functionngfft_twiddle_count(ngfft_plan<T> &, dft_algorithm) Returns the twiddle-factor count for a runtime algorithm value.functionnoinline(Fn &&, Args &&...)functionnoop(Ts &&...) Function that returns void and ignores all its argumentsconceptnot_f_classconceptnot_i_classconceptnot_u_classenumnpy_decode_result Status returned by the.npyloading function.conceptnumeric Concept satisfied by numeric types (numbers or compound types of numbers)variablenumeric_typesvariablenumeric_vector_types Instance combining integer and floating-point vector types for use as a value parameter pack.
O¶
functionones() Creates an expression that always evaluates to one.functionopen_file_for_appending(const filepath &) Opens typed file for appendingfunctionopen_file_for_reading(const filepath &) Opens typed file for readingfunctionopen_file_for_writing(const filepath &) Opens typed file for writingenumopen_file_modefunctionoperatorfunctionoperator User-defined literal returning aformat_tfor the given string literal.functionoperator User-defined literal returning aprint_tfor the given string literal.functionoperator==(const data_allocator<T1> &, const data_allocator<T2> &)functionoperator!=(const data_allocator<T1> &, const data_allocator<T2> &)functionoperator==(const univector<T, T1> &, const univector<T, T2> &) Returnstrueif the two univectors have equal size and element-wise equal contents.functionoperator!=(const univector<T, T1> &, const univector<T, T2> &) Returnstrueif the two univectors differ in size or in any element.functionoperator-(cval_t<T1, val1>)functionoperator+(cval_t<T1, val1>)functionoperator~(cval_t<T1, val1>)functionoperator!(cval_t<T1, val1>)functionoperator&&(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator||(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator==(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator!=(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator<(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator>(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator<=(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator>=(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator+(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator-(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator*(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator/(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator%(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator<<(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator>>(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator&(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator|(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator^(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator-(cvals_t<T1, vals1...>)functionoperator+(cvals_t<T1, vals1...>)functionoperator~(cvals_t<T1, vals1...>)functionoperator!(cvals_t<T1, vals1...>)functionoperator&&(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator||(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator==(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator!=(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator<(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator>(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator<=(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator>=(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator+(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator-(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator*(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator/(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator%(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator<<(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator>>(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator&(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator|(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator^(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator&&(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator||(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator==(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator!=(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator<(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator>(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator<=(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator>=(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator+(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator-(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator*(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator/(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator%(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator<<(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator>>(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator&(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator|(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator^(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator|(datatype, datatype)functionoperator&(datatype, datatype)typedefopt_index_t Optional signed index used bytensor_range.typedefor_type Ifconceptoutput_expression Concept satisfied by expressions that can be written to.variableoverload_auto Convenience instance of the highest-priority tag for use in overload resolutiontypedefoverload_generic Alias for the lowest-priority tag, used as a fallback overloadstructoverload_priority<0> Lowest priority tag, base of the overload_priority chainclassoverload_priority<n> Tag type forming a linear inheritance chain used to rank overload candidates.overload_priority<n>derives fromoverload_priority<n-1>, so largernis a better match.functionoverride_cpu(cpu_t) Overrides the CPU instruction set used by KFR at runtime.
P¶
functionpack_elements() Returns the identity value (0) for an empty packfunctionpack_elements(Arg, Args...)functionpadcenter(size_t, const std::string &, char) Centertextwithin a field ofsizecharacters usingcharacter.functionpadded(Arg &&, T) Creates an expression that extendsargwith a constant fill value.functionpadleft(size_t, const std::string &, char) Left-aligntextwithin a field ofsizecharacters by appendingcharacter.functionpadright(size_t, const std::string &, char) Right-aligntextwithin a field ofsizecharacters by prependingcharacter.functionpass_through(T &&) Function that returns its first argumenttypedefpconstvoid Pointer to const voidfunctionperfplot_save(const std::string &, T1 &&, T2 &&, const std::string &)functionperfplot_show(const std::string &, T1 &&, T2 &&, const std::string &)functionplaceholder(csize_t<Key>) Create an unboundexpression_placeholderwith the given key.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.functionplot_save(const std::string &, const T &, const std::string &) Plot data using python and save to filefunctionplot_show(const std::string &, const char *, const std::string &)functionplot_show(const std::string &, const std::string &, const std::string &)functionplot_show(const std::string &, const T &, const std::string &) Plot data using pythonfunctionpolar(E1 &&) Creates an expression that converts a complex number to polar form.classportable_vec<T, N> A portable vector type with fixed size and layout compatible withvec<T, N>.functionpow(E1 &&, E2 &&) Creates an expression that returns x raised to the given power y.functionprev_poweroftwo(T) Returns a nearest power of two that is less or equal than nclassprint_t<chars> Callable object holding a compile-time format literal (built byoperator""_print).functionprint(const Args &...) Print values to stdout, each formatted with its default conversion specifier.functionprintfmt(const std::string &, const Args &...) Print to stdout using a{}"-basedformat string.functionprintln(const Args &...) Print values to stdout followed by a newline.functionptr_cast(const U *) Reinterprets a const pointer of typefunctionptr_cast(U *)functionptr_cast(U *, ptrdiff_t)typedefpvoid Pointer to voidfunctionpython_prologue()
Q¶
R¶
structrandom_state Internal state of the pseudo-random number generator.classrange<T> Iterable rangestructraw_decoding_options Options for decoding raw audio streams.structraw_encoding_options Represents options for raw audio encoding.functionrdtsc() Reads the processor's cycle counter.functionread_audiofile_header(const file_path &) Reads the header of an audio file.classreader_adapter<From, To>functionref_cast(const U &) Reinterprets a const reference of typefunctionref_cast(U &)functionreference_dft_md(complex<T> *, const complex<T> *, shape<dynamic_shape>, bool, size_t, size_t) Performs Multidimensional Complex DFT using reference implementation (slow, used for testing)functionreference_dft_md(complex<T> *, const T *, shape<dynamic_shape>, bool, size_t, size_t) Performs Multidimensional Direct Real DFT using reference implementation (slow, used for testing)functionreference_dft_md(T *, const complex<T> *, shape<dynamic_shape>, bool, size_t, size_t) Performs Multidimensional Inverse Real DFT using reference implementation (slow, used for testing)functionreference_dft(complex<T> *, const complex<T> *, size_t, bool, size_t, size_t) Performs Complex DFT using reference implementation (slow, used for testing)functionreference_dft(complex<T> *, const T *, size_t, size_t, size_t) Performs Direct Real DFT using reference implementation (slow, used for testing)functionreference_dft(T *, const complex<T> *, size_t, size_t, size_t) Performs Inverse Real DFT using reference implementation (slow, used for testing)typedefrepr_type Alias for the type used byrepresentation<T>when formatting values of typeT.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<fmt_t<kfr::tensor<T, dims>, t, width, prec>> Specialization of representation for a formatted tensor, providing formatted string conversion.classrepresentation<fmt_t<kfr::univector<T, Tag>, t, width, prec>>representationspecialization that formats a fmt_t-wrappedunivectoras a string, applying the wrapped format options to each element.classrepresentation<kfr::complex<T>> String representation specialization forkfr::complex<T>.structrepresentation<kfr::cpu_t>structrepresentation<kfr::fraction> String representation specialization forfraction.classrepresentation<kfr::generic::mask<T, N>> String representation of amaskfor formatting/logging.classrepresentation<kfr::generic::vec<T, N>> String representation of avecfor formatting/logging.structrepresentation<kfr::npy_decode_result>classrepresentation<kfr::shape<dims>> String representation of ashape, used byas_stringand the formatting framework.structrepresentation<kfr::special_value>classrepresentation<kfr::tensor<T, dims>> Specialization of representation for tensor, providing string conversion.classrepresentation<kfr::univector<T, Tag>>representationspecialization that formats aunivectoras a string using KFR's built-in array formatting.classrepresentation<named_arg<T>> Representation ofnamed_argasname= value".classrepresentation<std::array<T, Size>> Representation ofstd::arrayas a brace-delimited list of its elements.classrepresentation<std::pair<T1, T2>> Representation ofstd::pairas(first;second)".classrepresentation<std::shared_ptr<T1>> Representation ofstd::shared_ptrasType(value)orType(nullptr)".structrepresentation<std::shared_ptr<void>> Representation ofstd::shared_ptr<void>asType(pointer)orType(nullptr)".structrepresentation<std::string_view> Representation ofstd::string_viewas astd::string.classrepresentation<std::unique_ptr<T1>> Representation ofstd::unique_ptrasType(value)orType(nullptr)".classrepresentation<std::vector<T, Allocator>> Representation ofstd::vectoras a brace-delimited list of its elements.classrepresentation<std::weak_ptr<T1>> Representation ofstd::weak_ptrasType(value)orType(nullptr)".classrepresentation<T> Primary template for converting a value of typeTto its string representation.typedefresample_quality Alias for sample_rate_conversion_quality.functionreshape(Arg &&, const shape<OutDims> &) Creates an expression that exposes the same data asargwith a different shape.functionreturn_constant(Args &&...) Function that returns constant of type T and ignores all its argumentsfunctionreturns(Ts &&...) Function that returns value-initialization of type T and ignores all its argumentsfunctionreverse(Arg &&) Creates an expression that exposesargwith its trailing dimension reversed.functionroot(E1 &&, E2 &&) Creates an expression that returns the real nth root of x.classruntime_error
S¶
functionsafe_cast(const InType &) Casts between integral types after range-checking the source value.enumsample_rate_conversion_quality Defines the quality levels for sample rate conversion.classsamplerate_converter<T> A template class for performing sample rate conversion on audio signals.functionsamples_load(audio_sample_type, fbase *const *, const std::byte *, size_t, size_t, bool) Loads interleaved audio samples based on sample type.functionsamples_load(audio_sample_type, fbase *, const std::byte *, size_t, bool) Loads audio samples based on sample type.functionsamples_load(fbase *const *, const Tin *, size_t, size_t, bool) Loads interleaved audio samples into a planar floating-point buffer.functionsamples_load(fbase *, const Tin *, size_t, bool) Loads audio samples into a floating-point buffer.functionsamples_store(audio_sample_type, std::byte *, const fbase *const *, size_t, size_t, bool) Stores interleaved audio samples based on sample type.functionsamples_store(audio_sample_type, std::byte *, const fbase *const *, size_t, size_t, const audio_quantization &, bool) Stores interleaved audio samples based on sample type with quantization.functionsamples_store(audio_sample_type, std::byte *, const fbase *, size_t, const audio_quantization &, bool) Stores audio samples based on sample type with quantization.functionsamples_store(Tout *, const fbase *const *, size_t, size_t, bool) Stores planar floating-point samples into a interleaved buffer.functionsamples_store(Tout *, const fbase *const *, size_t, size_t, const audio_quantization &, bool) Stores planar floating-point samples into an interleaved buffer with quantization.functionsamples_store(Tout *, const fbase *, size_t, const audio_quantization &, bool) Stores floating-point samples into a buffer with quantization.functionsave_to_npy(const tensor<T, Dims> &, Fn &&) Saves a tensor to.npyformat using a custom write callback.classscalar_constants<T> Collection of mathematical and machine constants for the scalar typeT.functionscalar(T) Creates an expression that wraps a single value.functionscale()functionscale(csizes_t<indices...>)variableseed_from_rdtsc Tag value used to seed the random number generator from the CPU cycle counter.structseed_from_rdtsc_t Tag type for seeding the random number generator from the CPU cycle counter.enumseek_origin Seek originfunctionselect(cvals_t<bool, flags...>, cvals_t<T, values1...>, cvals_t<T, values2...>) Element-wise selection between two value lists based on a flag list. For each position, returnsvalues1[i]ifflags[i]istrue, otherwisevalues2[i].functionsequence(const Ts &...) Creates an expression that cycles through the provided list of values.functionset_elements(strided_channel<T> &, const shape<1> &, const axis_params<0, N> &, const std::type_identity_t<vec<T, N>> &)deduction guideshape Deduction guide forshapefrom a parameter pack.structshape<0> Scalar shape specialization.classshape<dims> Fixed-rank multidimensional shape used bytensor.structshape<dynamic_shape> Run-time-rank shape specialization.classshort_fir_state<tapcount, T, U> State for a short FIR filter (tap count in range 2..33).typedefsigned_index_t Signed integer type used for tensor indices and axis sizes.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.functionsinc(E1 &&) Creates an expression that returns the sinc function of x.functionsincosdeg(E1 &&) Creates an expression that returns the trigonometric sine of the even elements of x and cosine of the odd elements. x must be expressed in degrees.functionsincos(E1 &&) Creates an expression that returns the trigonometric sine of the even elements of x and cosine of the odd elements. x must be a vector.functionsindeg(E1 &&) Creates an expression that returns the trigonometric sine of x (expressed in degrees).functionsin(E1 &&) Creates an expression that returns the trigonometric sine of x.functionsinhcosh(E1 &&) Creates an expression that returns the hyperbolic sine of the even elements of x and the hyperbolic cosine of the odd elements of x.functionsinh(E1 &&) Creates an expression that returns the hyperbolic sine of x.functionsize_add(size_t, size_t) Saturating addition for shape sizes.functionsize_min(size_t) Returns the minimum of a single value.functionsize_min(size_t, size_t, Ts...) Returns the minimum of two or more values (recursively).functionsize_of_shape(const shape<dims> &) Total number of elements described by a shape.functionsize_sub(size_t, size_t) Saturating subtraction for shape sizes.functionslice(Arg &&, std::type_identity_t<shape<Dims>>, std::type_identity_t<shape<Dims>>) Creates an expression that exposes a sub-region of another expression.classsmall_buffer<T, Capacity> A dynamically-sized buffer with a small-size optimization.functionsnprintfmt(char *, size_t, const std::string &, const Args &...) Write to a buffer using a{}"-basedformat string.typedefSpeakerenumspeaker_arrangement Predefined speaker arrangements.enumspeaker_type Speaker types (channel positions).typedefSpeakerArrangementenumspecial_constant Enumeration of special numeric values selectable throughspecial_value.classspecial_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.structspecial_value Type-erased constant convertible to any numeric typeT. Holds either aspecial_constanttag, an integer literal, or a floating-point literal, and converts toTaccording to the active variant.classspsc_ring_buffer<T> Single-producer/single-consumer queue backed by an externalunivector.functionsqrt(E1 &&) Creates an expression that returns the positive square root of x. \(\sqrt{x}\)classstate_holder<T, false> Owning specialization ofstate_holder.classstate_holder<T, Stateless> Holds a state value, either by ownership or by reference, depending on theStatelesstemplate parameter.classstate_holder<T, true> Stateless (non-owning) specialization ofstate_holder.classstatic_assert_eq<T, left, right>classstatic_assert_type_eq<Left, Right>functionsteady_time() Returns the current time in nanoseconds since epoch using steady_clock.functionstop_constexpr() Non-constexpr function used to halt constant evaluation instructstopwatch RAII-style stopwatch measuring wall-clock elapsed time viaclock_now.functionstr_find(const cstring<N1> &, const cstring<Nneedle> &)functionstr_replace(const cstring<N1> &, const cstring<Nfrom> &, const cstring<Nto> &)classstrided_channel<T> Represents a strided audio channel.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.functionsubstitute(const internal_generic::anything &, Args &&...) Fallbacksubstitutethat accepts any expression and arguments and does nothing.functionsubstitute(expression_handle<T, Dims> &, expression_handle<T, Dims>, csize_t<Key>) Substitute the placeholder inside the expression referenced byexpr.functionsubstitute(expression_placeholder<T, Dims, Key> &, expression_handle<T, Dims>, csize_t<Key>) Bind a placeholder to a concrete expression handle.functionsubstitute(expression_with_arguments<Args...> &, expression_handle<T, Dims>, csize_t<Key>) Recursively substitute a placeholder inside a composite expression.typedefsubtype The immediate subtype of a compound typestructswallow Utility class to use in list-initialization context Accepts any number of arguments and discards them; useful for pack expansion side effects.variablesymmetric_linspacestructsymmetric_linspace_t Tag type used to select the symmetric-linspace constructor ofexpression_linspace.functionsymmlinspace(T, size_t, cbool_t<truncated>) Creates an expression that returns evenly spaced numbers over a symmetric interval.
T¶
functiontall() Build a range that spans the entire axis (defaults for all three components).functiontandeg(E1 &&) Creates an expression that returns the trigonometric tangent of x (expressed in degrees).functiontan(E1 &&) Creates an expression that returns the trigonometric tangent of x.functiontanh(E1 &&) Creates an expression that returns the hyperbolic tangent of x.functiontensor_from_container(Container) Creates a 1D tensor referencing the data of a container. The container is moved into a memory finalizer so the data remains valid for the tensor's lifetime.structtensor_range Half-open or one-ended range descriptor for tensor slicing.classtensor_subscript<T, Derived, Dims> Base for the subscript operator helper of tensor.classtensor_subscript<T, Derived, std::integer_sequence<index_t, Dims...>> Specialization of tensor_subscript for an explicit integer sequence of dimensions.classtensor<T, dynamic_shape> Specialization of tensor for a dynamic shape. Not implemented yet.classtensor<T, NDims> Holds or references multidimensional data and provides access to individual elements and complex operations on the data.variabletest_vector_sizes Set of vector sizes used by the test harness.classtimestamps<max_count, fence> High-resolution scoped profiler using RDTSC (x86) or CNTVCT_EL0 (AArch64).functionto_filter(expression_handle<T, 1> &&) Creates a filter from an expression handle containing a placeholder.functionto_handle(E &) Converts the given expression into an opaque handle.functionto_handle(E &&) Converts the given expression into an opaque handle.functionto_string(audiofile_error) Converts an audiofile_error to its string representation.functiontrange(std::optional<signed_index_t>, std::optional<signed_index_t>, std::optional<signed_index_t>) Build atensor_rangefrom explicit start/stop/step values.functiontruncate(Arg &&, std::type_identity_t<shape<Dims>>) Creates an expression that exposesargstarting at the origin with the givensize.functiontstart(signed_index_t, signed_index_t) Build a range that starts atstartand continues to the end of the axis.functiontstep(signed_index_t) Build a range that uses the specified step but no explicit start or stop.functiontstop(signed_index_t, signed_index_t) Build a range that stops atstop.structtype_id_tfunctiontype_name() Gets the fully qualified name of the type, including namespace and template parameters (if any)functiontype_name(T) Gets the fully qualified name of the type, including namespace and template parameters (if any)typedeftype_of Extracts the wrapped type from a ctype_t-like wrapperclasstypebits<T>variabletypeclassfunctiontypeindex() Returns the zero-based index of type
U¶
typedefu16structu24 Unsigned 24-bit integer stored in three bytes (little-endian).typedefu32typedefu64typedefu8conceptu_classtypedefuitypetypedefumaxvariableundefined_size Sentinel value denoting a dimension whose size is not yet known.typedefunivector2d Alias for a 2D container of univectors.typedefunivector3d Alias for a 3D container of univectors.classunivector_base<T, Class, false> Specialization for univectors that cannot be assigned from expressions. Provides only reference access to the underlying data.classunivector_base<T, Class, is_expression> Base class for allunivectorspecializations, providing common operations such as slicing, references and ring-buffer helpers. Ring-buffer helpers operate on caller-owned cursors and are intended for single-threaded use only; concurrent access requires external synchronization.classunivector_base<T, Class, true> Specialization for univectors that can be assigned from expressions.typedefunivector_dyn Alias forunivector<T, tag_dynamic_vector>;typedefunivector_ref Alias forunivector<T, tag_array_ref>;typedefunivector_tag Tag type that selects the storage strategy of aunivectororabstract_vector.classunivector<T, Size> Class that represent data in KFR. Many KFR functions can take this class as an argument. Can inherit from std::vector, std::array or keep only reference to data and its size.classunivector<T, tag_array_ref> Non-owning univector specialization that holds a reference to external data.classunivector<T, tag_dynamic_vector> Dynamically sized, owning univector backed bystd::vectorusing KFR'sdata_allocator. Memory is aligned to the maximum vector alignment.enum(Unnamed enum at base/univector.hpp:42:1) Compile-time tags selecting the storage strategy of aunivector.typedefunsigned_type Maps a bit width to the corresponding unsigned integer typevariableunsigned_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.typedefusubtypetypedefutype
V¶
functionval_of(cval_t<T, value>) Extracts the value from a cval_t constantfunctionval_of(T) Returns the value itself (overload for runtime values)typedefvalue_or_reftypedefvalue_type_of Extracts theclassvec_shape<T, N> Describes the shape of a SIMD vector ofNelements of typeT.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.variableversionvariableversion_full KFR version string including architecture and compiler namevariableversion_majorvariableversion_minorvariableversion_patchvariableversion_string KFR version string
W¶
structw64_decoding_options Options for decoding W64 audio files.structw64_encoding_options Represents options for W64 audio encoding.structwave_decoding_options Options for decoding WAVE audio files.structwave_encoding_options Represents options for WAVE audio encoding, including RF64 support for large files.functionwidthof() Returns the width (number of scalar components) offunctionwidthof(T) Returns the width (number of scalar components) ofenumwindow_symmetry Window symmetry modeenumwindow_type Window function types supported by KFRfunctionwrap_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>.functionwrap_fmt(const U &, ctype_t<Fmt>) Wrapvalwith the format typeFmtwhenFmtis notvoid.functionwrap_fmt(const U &, ctype_t<void>) Identity pass-through used when no format type is specified.classwriter_adapter<From, To>
Z¶
functionzeroize(T1 &) Fills a value with zerosfunctionzeros() Creates an expression that always evaluates to zero.structzpk Zero-pole-gain (ZPK) representation of a linear time-invariant (LTI) filter.
This file was generated by cxxdox, a C++ documentation generator based on MkDocs Material and libclang.