Functions¶
A¶
functionkfr::generic::abs(const T1 &) Returns the absolute value of x.functionkfr::generic::abs(E1 &&) Returns template expression that returns the absolute value of x.functionkfr::generic::absmax(E1 &&, E2 &&) Returns the greater in magnitude of two values. Accepts and returns expressions.functionkfr::generic::absmaxof(const E1 &) Returns the greatest in magnitude of all the elements in x.functionkfr::generic::absmin(E1 &&, E2 &&) Returns the smaller in magnitude of two values. Accepts and returns expressions.functionkfr::generic::absminof(const E1 &) Returns the smallest in magnitude of all the elements in x.functionkfr::compiletime::abs(T)functionkfr::generic::acos(const T1 &) Returns the arc cosine of x. The returned angle is in the range 0 through \(\pi\) .functionkfr::acos(E1 &&) Returns template expression that returns the arc cosine of x.functionkfr::generic::add(E &&...) Returns template expression that returns sum of all the arguments passed to a function.functionkfr::generic::adjacent(Fn &&, E1 &&) Returns template expression that returns the result of calling \(fn(x_i, x_{i-1})\)functionkfr::aligned_allocate(size_t) Allocates aligned memoryfunctionkfr::aligned_allocate(size_t, size_t) Allocates aligned memoryfunctionkfr::aligned_deallocate(T *) Deallocates aligned memoryfunctionkfr::generic::all(const mask<T, N> &) Returns true if all elements are true.functionkfr::generic::amp_to_dB(const T1 &)functionkfr::generic::amp_to_dB(E1 &&)functionkfr::generic::any(const mask<T, N> &) Returns true if any element is true.functionkfr::arange(T, cbool_t<truncated>)functionkfr::arange(T, T, T, cbool_t<truncated>)functionkfr::arrangement_for_channels(size_t) Returns a predefined speaker arrangement for a given number of channels If no predefined arrangement exists, returns speaker_arrangement::Nonefunctionkfr::arrangement_speakers(speaker_arrangement) Returns the canonical channel list for a speaker arrangement.functionkfr::generic::asin(const T1 &) Returns the arc sine of x. The returned angle is in the range \(-\pi/2\) through \(\pi/2\) .functionkfr::asin(E1 &&) Returns template expression that returns the arc sine of x.functionkfr::assertion_failed(const std::string &, const char *, int)functionkfr::atan2deg(E1 &&, E2 &&) Returns template expression that returns the arc tangent of y/x (expressed in degrees).functionkfr::atan2(E1 &&, E2 &&) Returns template expression that returns the arc tangent of y/x.functionkfr::atandeg(E1 &&) Returns template expression that returns the arc tangent of the x, expressed in degrees.functionkfr::atan(E1 &&) Returns template expression that returns the arc tangent of x.functionkfr::audio_sample_bit_depth(audio_sample_type)functionkfr::audio_sample_is_float(audio_sample_type)functionkfr::audio_sample_sizeof(audio_sample_type)functionkfr::audiofile_container_from_extension(std::string_view) Determines the audio container type from a file extension.functionkfr::autocorrelate(const univector<T, Tag1> &) Auto-correlationfunctionkfr::generic::aweighting(const T1 &)functionkfr::generic::aweighting(E1 &&)
B¶
functionkfr::generic::begin_pass(const expression_handle<T, NDims> &, shape<NDims>, shape<NDims>)functionkfr::generic::begin_pass(const expression_iir<1, T, E1, Stateless> &, shape<1>, shape<1>)functionkfr::generic::begin_pass(const expression_iir<filters, T, E1, Stateless> &, shape<1>, shape<1>)functionkfr::generic::begin_pass(const expression_with_arguments<Args...> &, shape<Dims>, shape<Dims>)functionkfr::generic::begin_pass(const internal_generic::anything &, shape<Dims>, shape<Dims>)functionkfr::generic::bessel(int)functionkfr::generic::bind_expression(Fn &&, Args &&...)functionkfr::generic::biquad_allpass(std::type_identity_t<T>, std::type_identity_t<T>) Calculates coefficients for the all-pass biquad filterfunctionkfr::generic::biquad_bandpass(std::type_identity_t<T>, std::type_identity_t<T>) Calculates coefficients for the band-pass biquad filterfunctionkfr::generic::biquad_highpass(std::type_identity_t<T>, std::type_identity_t<T>) Calculates coefficients for the high-pass biquad filterfunctionkfr::generic::biquad_highshelf(std::type_identity_t<T>, std::type_identity_t<T>) Calculates coefficients for the high-shelf biquad filterfunctionkfr::generic::biquad_lowpass(std::type_identity_t<T>, std::type_identity_t<T>) Calculates coefficients for the low-pass biquad filterfunctionkfr::generic::biquad_lowshelf(std::type_identity_t<T>, std::type_identity_t<T>) Calculates coefficients for the low-shelf biquad filterfunctionkfr::generic::biquad_notch(std::type_identity_t<T>, std::type_identity_t<T>) Calculates coefficients for the notch biquad filterfunctionkfr::generic::biquad_peak(std::type_identity_t<T>, std::type_identity_t<T>, std::type_identity_t<T>) Calculates coefficients for the peak biquad filterfunctionkfr::generic::bitreverse(const vec<T, N> &) Reorders the elements of a vector by reversing the bits of their indices.functionkfr::generic::bitreverse(u32) Reverses the lowestbitsbits of the given unsigned integer.functionkfr::generic::block_process(size_t, csizes_t<widths...>, Fn &&)functionkfr::generic::butterworth(int)functionkfr::generic::bweighting(const T1 &)functionkfr::generic::bweighting(E1 &&)
C¶
functionkfr::generic::cabs(const T1 &) Returns the absolute value (magnitude) of the complex number xfunctionkfr::cabs(E1 &&) Returns template expression that returns the absolute value (magnitude) of the complex number xfunctionkfr::generic::cabssqr(const T1 &) Returns the squared absolute value (magnitude squared) of the complex number xfunctionkfr::cabssqr(E1 &&) Returns template expression that returns the squared absolute value (magnitude squared) of the complex number xfunctionkfr::call_with_temp(size_t, Fn &&) Calls a function with a temporary buffer, allocated on the stack if small enough, otherwise on the heap.functionkfr::generic::carg(const T1 &) Returns the phase angle (argument) of the complex number xfunctionkfr::carg(E1 &&) Returns template expression that returns the phase angle (argument) of the complex number xfunctionkfr::generic::cartesian(const T1 &) Converts complex number to cartesianfunctionkfr::cartesian(E1 &&) Returns template expression that converts complex number to cartesianfunctionkfr::cast(Arg &&)functionkfr::cast(Arg &&, ctype_t<T>)functionkfr::generic::catmullrom(M, T, T, T, T) Catmull-Rom spline interpolation.functionkfr::cbrt(E1 &&) Returns the cube root of the x. Accepts and returns expressions.functionkfr::generic::ccomp(const vec<T, N> &)functionkfr::generic::cconj(const T1 &) Returns the complex conjugate of the complex number xfunctionkfr::generic::cconj(E1 &&) Returns template expression that returns the complex conjugate of the complex number xfunctionkfr::generic::ccos(const T1 &) Returns the cosine of the complex number xfunctionkfr::ccos(E1 &&) Returns template expression that returns the cosine of the the complex value xfunctionkfr::generic::ccosh(const T1 &) Returns the hyperbolic cosine of the complex number xfunctionkfr::ccosh(E1 &&) Returns template expression that returns the hyperbolic cosine of the the complex value xfunctionkfr::generic::cdecom(const vec<complex<T>, N> &)functionkfr::generic::cdupimag(const vec<complex<T>, N> &) Returns vector of complex values with imaginary part duplicatedfunctionkfr::generic::cdupreal(const vec<complex<T>, N> &) Returns vector of complex values with real part duplicatedfunctionkfr::generic::ceil(const T1 &) Returns the smallest integer value not less than x.functionkfr::generic::ceil(E1 &&)functionkfr::generic::cexp10(const T1 &) Returns 10 raised to the complex number xfunctionkfr::cexp10(E1 &&) Returns template expression that returns 10 raised to the complex number xfunctionkfr::generic::cexp2(const T1 &) Returns 2 raised to the complex number xfunctionkfr::cexp2(E1 &&) Returns template expression that returns 2 raised to the complex number xfunctionkfr::generic::cexp(const T1 &) Returns \(e\) raised to the complex number xfunctionkfr::cexp(E1 &&) Returns template expression that returns \(e\) raised to the complex number xfunctionkfr::cforeach(const std::tuple<Ts...> &, Fn &&)functionkfr::generic::chebyshev1(int, double)functionkfr::generic::chebyshev2(int, double)functionkfr::check_assertion(...)functionkfr::check_assertion(const comparison<Op, L, R> &, const char *, const char *, int)functionkfr::check_assertion(const half_comparison<L> &, const char *, const char *, int)functionkfr::generic::clamp(const T1 &, const T2 &) Returns the first argument clamped to a range [0, hi]functionkfr::generic::clamp(const T1 &, const T2 &, const T3 &) Returns the first argument clamped to a range [lo, hi]functionkfr::generic::clamp(E1 &&, E2 &&) Creates an expression that returns the first argument clamped to a range [0, hi]functionkfr::generic::clamp(E1 &&, E2 &&, E3 &&) Creates an expression that returns the first argument clamped to a range [lo, hi]functionkfr::generic::clog10(const T1 &) Returns the common (base-10) logarithm of the complex number xfunctionkfr::clog10(E1 &&) Returns template expression that returns the common (base-10) logarithm of the complex number xfunctionkfr::generic::clog2(const T1 &) Returns the binary (base-2) logarithm of the complex number xfunctionkfr::clog2(E1 &&) Returns template expression that returns the binary (base-2) logarithm of the complex number xfunctionkfr::generic::clog(const T1 &) Returns the natural logarithm of the complex number xfunctionkfr::clog(E1 &&) Returns template expression that returns the natural logarithm of the complex number xfunctionkfr::generic::cnegimag(const vec<complex<T>, N> &) Returns vector of complex values with imaginary part negatedfunctionkfr::generic::cnegreal(const vec<complex<T>, N> &) Returns vector of complex values with real part negatedfunctionkfr::concat_args()functionkfr::concat_args(const std::string &, const Ts &...)functionkfr::concatenate(Arg1 &&, Arg2 &&)functionkfr::concatenate(Arg1 &&, Arg2 &&, Arg3 &&)functionkfr::convert_endianness(T *, size_t)functionkfr::generic::convert_sample(const Tin &)functionkfr::generic::convert(Tout *, const Tin *, size_t) Converts audio samples (both formats are known at compile time)functionkfr::generic::convert(Tout *, const void *, audio_sample_type, size_t) Converts audio samples (input format is known at runtime)functionkfr::generic::convert(void *, audio_sample_type, const Tin *, size_t) Converts audio samples (output format is known at runtime)functionkfr::convolve(const univector<T1, Tag1> &, const univector<T2, Tag2> &) Convolutionfunctionkfr::correlate(const univector<T1, Tag1> &, const univector<T2, Tag2> &) Correlationfunctionkfr::cosdeg(E1 &&) Returns the trigonometric cosine of the x (expressed in degrees). Accepts and returns expressions.functionkfr::cos(E1 &&) Returns the trigonometric cosine of x. Accepts and returns expressions.functionkfr::generic::cosh(const T1 &) Returns the hyperbolic cosine of the xfunctionkfr::cosh(E1 &&) Returns template expression that returns the hyperbolic cosine of the xfunctionkfr::generic::coshsinh(const T1 &) Returns the hyperbolic cosine of the even elements of the x and the hyperbolic sine of the odd elements of the xfunctionkfr::coshsinh(E1 &&) Returns template expression that returns the hyperbolic cosine of the even elements of the x and the hyperbolic sine of the odd elements of the xfunctionkfr::generic::cosine(M, T, T) Cosine interpolation.functionkfr::cossindeg(E1 &&) Returns the trigonometric cosine of the even elements of the x and sine of the odd elements. x must be expressed in degrees. Accepts and returns expressions.functionkfr::cossin(E1 &&) Returns the trigonometric cosine of the even elements of the x and sine of the odd elements. x must be a vector. Accepts and returns expressions.functionkfr::compiletime::cos(T)functionkfr::generic::coth(const T1 &) Returns the hyperbolic cotangent of the xfunctionkfr::coth(E1 &&) Returns template expression that returns the hyperbolic cotangent of the xfunctionkfr::counter(T)functionkfr::counter(T, Arg, Args...)functionkfr::create_aiff_decoder(const aiff_decoding_options &) Creates a decoder for AIFF audio files.functionkfr::create_aiff_encoder(const aiff_encoding_options &) Creates an AIFF audio encoder with optional encoding options.functionkfr::create_caff_decoder(const caff_decoding_options &) Creates a decoder for CAFF audio files.functionkfr::create_caff_encoder(const caff_encoding_options &) Creates a CAFF audio encoder with optional encoding options.functionkfr::create_decoder_for_container(audiofile_container, const audio_decoding_options &) Creates an audio decoder for a specific container type.functionkfr::create_decoder_for_file(const file_path &, const audio_decoding_options &) Creates an audio decoder for a file.functionkfr::create_decoder_for_file(const std::string &, const audio_decoding_options &) file_path&, const audio_decoding_options&)functionkfr::create_decoder_from_header(const audiofile_header &, const audio_decoding_options &) Creates an audio decoder from a file header.functionkfr::create_encoder_for_container(audiofile_container, const audio_encoding_options &) Creates an audio encoder for the specified container format with optional encoding options.functionkfr::create_mediafoundation_decoder(const mediafoundation_decoding_options &) Creates a Media Foundation-based audio decoder.functionkfr::create_mp3_decoder(const mp3_decoding_options &) Creates an MP3 audio decoder with the specified decoding options.functionkfr::create_raw_decoder(const raw_decoding_options &) Creates a decoder for raw audio streams.functionkfr::create_raw_encoder(const raw_encoding_options &) Creates a raw audio encoder with optional encoding options.functionkfr::create_w64_decoder(const w64_decoding_options &) Creates a decoder for W64 audio files.functionkfr::create_w64_encoder(const w64_encoding_options &) Creates a W64 audio encoder with optional encoding options.functionkfr::create_wave_decoder(const wave_decoding_options &) Creates a decoder for WAVE audio files.functionkfr::create_wave_encoder(const wave_encoding_options &) Creates a WAVE audio encoder with optional encoding options.functionkfr::generic::csin(const T1 &) Returns the sine of the complex number xfunctionkfr::csin(E1 &&) Returns template expression that returns the sine of the the complex value xfunctionkfr::generic::csinh(const T1 &) Returns the hyperbolic sine of the complex number xfunctionkfr::csinh(E1 &&) Returns template expression that returns the hyperbolic sine of the complex number xfunctionkfr::generic::csqr(const T1 &) Returns square of the complex number xfunctionkfr::csqr(E1 &&) Returns template expression that returns square of the complex number xfunctionkfr::generic::csqrt(const T1 &) Returns square root of the complex number xfunctionkfr::csqrt(E1 &&) Returns template expression that returns square root of the complex number xfunctionkfr::generic::cswapreim(const vec<complex<T>, N> &) Returns vector of complex values with real and imaginary parts swappedfunctionkfr::generic::cub(E1 &&) Returns template expression that returns cube of x.functionkfr::generic::cubic(M, T, T, T, T) Cubic interpolation.functionkfr::current_epsilon()functionkfr::generic::cweighting(const T1 &)functionkfr::generic::cweighting(E1 &&)
D¶
functionkfr::generic::dB_to_amp(const T1 &)functionkfr::generic::dB_to_amp(E1 &&)functionkfr::generic::dB_to_power(const T1 &)functionkfr::generic::dB_to_power(E1 &&)functionkfr::dB_to_string(const T &, double) Converts dB value to string (uses oo for infinity symbol)functionkfr::dB_to_utf8string(const T &, double) Converts dB value to string (uses infinity symbol in utf-8 encoding)functionkfr::dcremove(E1 &&, double)functionkfr::dcremove(E1 &&, double, double) Applies a DC removal filter to the given input expression.functionkfr::decode_audio_file(const file_path &, audiofile_format *, const audio_decoding_options &) Decodes an audio file and returns the audio data in an interleaved format.functionkfr::decode_audio_file(const std::string &, audiofile_format *, const audio_decoding_options &)functionkfr::deep_is_equal(const T1 &, const T2 &)functionkfr::generic::deinterleave(Tout **, const Tin *, size_t, size_t) Deinterleaves and converts audio samplesfunctionkfr::generic::deinterleave(univector2d<Tout, Tag1, Tag2> &, const univector<Tin, Tag3> &) Deinterleaves and converts audio samplesfunctionkfr::generic::delay(delay_state<T, samples, STag> &, E1 &&) Returns template expression that applies delay to the input (uses ring buffer in state)functionkfr::generic::delay(E1 &&) Returns template expression that applies delay to the input (uses ring buffer internally)functionkfr::generic::delay(E1 &&, std::reference_wrapper<delay_state<T, samples, STag>>) Returns template expression that applies delay to the input (uses ring buffer in state)functionkfr::generic::dft(const univector<complex<T>, Tag> &) Performs Direct DFT using cached planfunctionkfr::generic::digitreverse4(const vec<T, N> &) Reorders the elements of a vector by reversing base-4 (quaternary) digits of their indices.functionkfr::generic::digitreverse4(u32) Reverses the digits of the given unsigned integer in base-4 (quaternary), using the lowestbitsdigits.functionkfr::generic::digitreverse(const vec<T, N> &) Reorders the elements of a vector by reversing the digits of their indices in the specified radix.functionkfr::generic::dimensions(E1 &&) Returns template expression with gien number of dimensionsfunctionkfr::generic::dotproduct(E1 &&, E2 &&) Returns the dot product of two vectors.functionkfr::generic::downsample2(E1 &&, csize_t<offset>)functionkfr::generic::downsample4(E1 &&, csize_t<offset>)
E¶
functionkfr::element_size()functionkfr::element_size<>()functionkfr::encode_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.functionkfr::encode_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.functionkfr::encode_audio_file(const std::string &, const audio_data_interleaved &, const audiofile_format &, audio_decoder *, const audio_encoding_options &) Encodes interleaved audio data and writes it to a file (Windows-specific overload).functionkfr::encode_audio_file(const std::string &, const audio_data_planar &, const audiofile_format &, audio_decoder *, const audio_encoding_options &) Encodes planar audio data and writes it to a file (Windows-specific overload).functionkfr::generic::end_pass(const expression_handle<T, NDims> &, shape<NDims>, shape<NDims>)functionkfr::generic::end_pass(const expression_iir<1, T, E1, Stateless> &, shape<1>, shape<1>)functionkfr::generic::end_pass(const expression_iir<filters, T, E1, Stateless> &, shape<1>, shape<1>)functionkfr::generic::end_pass(const expression_with_arguments<Args...> &, shape<Dims>, shape<Dims>)functionkfr::generic::end_pass(const internal_generic::anything &, shape<Dims>, shape<Dims>)functionkfr::generic::energy_to_loudness(T)functionkfr::generic::eq(E1 &&, E2 &&)functionkfr::generic::equal(const T1 &, const T2 &)functionkfr::exp10(E1 &&) Returns 10 raised to the given power x. Accepts and returns expressions.functionkfr::exp2(E1 &&) Returns 2 raised to the given power x. Accepts and returns expressions.functionkfr::exp_fmadd(E1 &&, E2 &&, E3 &&) Returns exp(x * m + a). Accepts and returns expressions.functionkfr::exp(E1 &&) Returns e raised to the given power x. Accepts and returns expressions.
F¶
functionkfr::generic::factorial_approx(const T1 &) Returns the approximate factorial of an argumentfunctionkfr::factorial_approx(E1 &&) Creates expression that returns the approximate factorial of an argumentfunctionkfr::generic::factorial(int) Returns the factorial of an argument. Returns max(uint64_t) if does not fit to uint64_tfunctionkfr::fastcosdeg(E1 &&) Returns an approximation of the trigonometric cosine of the x (expressed in degrees). Accepts and returns expressions.functionkfr::fastcos(E1 &&) Returns an approximation of the trigonometric cosine of x. Accepts and returns expressions.functionkfr::fastsindeg(E1 &&) Returns an approximation of the trigonometric sine of the x (expressed in degrees). Accepts and returns expressions.functionkfr::fastsin(E1 &&) Returns an approximation of the trigonometric sine of x. Accepts and returns expressions.functionkfr::generic::fft_multiply_accumulate(univector<complex<T>, Tag1> &, const univector<complex<T>, Tag2> &, const univector<complex<T>, Tag3> &, const univector<complex<T>, Tag4> &, dft_pack_format)functionkfr::generic::fft_multiply_accumulate(univector<complex<T>, Tag1> &, const univector<complex<T>, Tag2> &, const univector<complex<T>, Tag3> &, dft_pack_format)functionkfr::generic::fft_multiply(univector<complex<T>, Tag1> &, const univector<complex<T>, Tag2> &, const univector<complex<T>, Tag3> &, dft_pack_format)functionkfr::file_extension(const file_path &)functionkfr::generic::filtfilt(univector<T, Tag> &, const iir_params<T, Itag> &) Applies forward and backward filtering to the input array using the given IIR filter parameters.functionkfr::generic::final_mean(T, size_t)functionkfr::generic::final_rootmean(T, size_t)functionkfr::generic::fir_bandpass(const univector_ref<T> &, std::type_identity_t<T>, std::type_identity_t<T>, const expression_handle<T> &, bool)functionkfr::generic::fir_bandpass(univector<T, Tag> &, std::type_identity_t<T>, std::type_identity_t<T>, const expression_handle<T> &, bool) Calculates coefficients for the band-pass FIR filterfunctionkfr::generic::fir_bandstop(const univector_ref<T> &, std::type_identity_t<T>, std::type_identity_t<T>, const expression_handle<T> &, bool)functionkfr::generic::fir_bandstop(univector<T, Tag> &, std::type_identity_t<T>, std::type_identity_t<T>, const expression_handle<T> &, bool) Calculates coefficients for the band-stop FIR filterfunctionkfr::generic::fir_highpass(const univector_ref<T> &, std::type_identity_t<T>, const expression_handle<T> &, bool)functionkfr::generic::fir_highpass(univector<T, Tag> &, std::type_identity_t<T>, const expression_handle<T> &, bool) Calculates coefficients for the high-pass FIR filterfunctionkfr::generic::fir_lowpass(const univector_ref<T> &, std::type_identity_t<T>, const expression_handle<T> &, bool)functionkfr::generic::fir_lowpass(univector<T, Tag> &, std::type_identity_t<T>, const expression_handle<T> &, bool) Calculates coefficients for the low-pass FIR filterfunctionkfr::generic::fir(E1 &&, fir_params<T>) Returns template expression that applies FIR filter to the inputfunctionkfr::generic::fir(E1 &&, std::reference_wrapper<fir_state<T, U>>) Returns template expression that applies FIR filter to the inputfunctionkfr::generic::fir(E1 &&, Taps &&) Returns template expression that applies FIR filter to the inputfunctionkfr::generic::fir(fir_state<T, U> &, E1 &&) Returns template expression that applies FIR filter to the inputfunctionkfr::fixshape(Arg &&, const fixed_shape_t<ShapeValues...> &)functionkfr::generic::floor(const T1 &) Returns the largest integer value not greater than x.functionkfr::generic::floor(E1 &&) Returns the largest integer value not greater than x. Accepts and returns expressions.functionkfr::generic::fmod(const T &, const T &) Returns the floating-point remainder of dividing x by y.functionkfr::fopen_path(const file_path &, open_file_mode)functionkfr::generic::fracdelay(E1 &&, T) Returns template expression that applies a fractional delay to the inputfunctionkfr::generic::fract(const T1 &) Returns the fractional part of x.functionkfr::generic::fract(E1 &&)functionkfr::from_error_code(std::error_code) Converts a standard error code to an audiofile_error.
G¶
functionkfr::generic::gamma(const T1 &) Returns the approximate gamma function of an argumentfunctionkfr::gamma(E1 &&) Creates expression that returns the approximate gamma function of an argumentfunctionkfr::generic::gather_stride(const T *)functionkfr::generic::gather_stride(const T *, size_t)functionkfr::generic::gather(const T *)functionkfr::generic::gather(const T *, const vec<IT, N> &)functionkfr::generic::gather(const T *, const vec<u32, N> &)functionkfr::generic::gather(const T *, size_t, Indices...)functionkfr::generic::ge(E1 &&, E2 &&)functionkfr::generic::gen_cossin(T1, T2) Returns template expression that generates values using the following formula:\[ x_i= \begin{cases} \cos(start + i \cdot step), & \text{if } i \text{ is even}\ \sin(start + i \cdot step), & \text{otherwise} \end{cases} \]functionkfr::generic::gen_exp2(T1, T2) Returns template expression that generates values using the following formula:\[ x_i = 2^{ start + i \cdot step } \]functionkfr::generic::gen_expj(T1, T2) Returns template expression that generates values using the following formula:\[ x_i = e^{ j ( start + i \cdot step ) } \]functionkfr::generic::gen_exp(T1, T2) Returns template expression that generates values using the following formula:\[ x_i = e^{ start + i \cdot step } \]functionkfr::generic::gen_linear(T1, T2) Returns template expression that generates values starting from the start and using the step as the increment between numbers.functionkfr::generic::gen_random_normal(const random_state &, T, T) Returns expression that produces normally distributed values using a copied state.functionkfr::generic::gen_random_normal(std::reference_wrapper<random_state>, T, T) Returns expression that produces normally distributed values using a referenced state.functionkfr::generic::gen_random_normal(T, T) Returns expression that produces normally distributed values using cycle counter entropy.functionkfr::generic::gen_random_range(const random_state &, T, T) Returns expression that produces random values in [min, max) using a copied state.functionkfr::generic::gen_random_range(std::reference_wrapper<random_state>, T, T) Returns expression that produces random values in [min, max) using a referenced state. Use std::ref(gen) to use this overload.functionkfr::generic::gen_random_range(T, T) Returns expression that produces random values in [min, max) using cycle counter entropyfunctionkfr::generic::gen_random_uniform() Returns expression that produces uniform pseudorandom values using cycle counter entropy.functionkfr::generic::gen_random_uniform(const random_state &) Returns expression that produces uniform pseudorandom values using a copied state.functionkfr::generic::gen_random_uniform(std::reference_wrapper<random_state>) Returns expression that produces uniform pseudorandom values using a referenced state. Use std::ref(gen) to use this overload.functionkfr::generic::gen_sin(T1, T2) Returns template expression that generates values using the following formula:\[ x_i = \sin( start + i \cdot step ) \]functionkfr::get_element(E &&, shape<Dims>)functionkfr::generic::get_elements(const expression_cast<T, Arg> &, const shape<NDims> &, const axis_params<Axis, N> &)functionkfr::generic::get_elements(const expression_concatenate<Arg1, Arg2, ConcatAxis> &, const shape<NDims> &, const axis_params<Axis, N> &)functionkfr::generic::get_elements(const expression_counter<T, 1> &, const shape<1> &, const axis_params<Axis, N> &)functionkfr::generic::get_elements(const expression_counter<T, dims> &, const shape<dims> &, const axis_params<Axis, N> &)functionkfr::generic::get_elements(const expression_fixshape<Arg, Shape> &, const shape<Traits::dims> &, const axis_params<Axis, N> &)functionkfr::generic::get_elements(const expression_function<Fn, Args...> &, const shape<Dims> &, const axis_params<Axis, N> &)functionkfr::generic::get_elements(const expression_handle<T, NDims> &, const shape<NDims> &, const axis_params<Axis, N> &)functionkfr::generic::get_elements(const expression_iir<1, T, E1, Stateless> &, shape<1>, axis_params<0, N>)functionkfr::generic::get_elements(const expression_iir_l<filters, T, E1, Stateless> &, shape<1>, axis_params<0, N>)functionkfr::generic::get_elements(const expression_iir<filters, T, E1, Stateless> &, shape<1>, axis_params<0, N>)functionkfr::generic::get_elements(const expression_lambda<T, Dims, Fn, Rnd> &, const shape<Dims> &, const axis_params<Axis, N> &)functionkfr::generic::get_elements(const expression_linspace<T, truncated> &, const shape<1> &, const axis_params<0, N> &)functionkfr::generic::get_elements(const expression_padded<Arg> &, const shape<Traits::dims> &, const axis_params<Axis, N> &)functionkfr::generic::get_elements(const expression_placeholder<T, Dims, Key> &, shape<Dims>, axis_params<VecAxis, N>)functionkfr::generic::get_elements(const expression_reshape<Arg, outdims> &, const shape<Traits::dims> &, const axis_params<Axis, N> &)functionkfr::generic::get_elements(const expression_reverse<Arg> &, const shape<Traits::dims> &, const axis_params<Axis, N> &)functionkfr::generic::get_elements(const expression_scalar<T> &, const shape<0> &, const axis_params<Axis, N> &)functionkfr::generic::get_elements(const expression_slice<Arg> &, const shape<NDims> &, const axis_params<Axis, N> &)functionkfr::get_elements(const strided_channel<T> &, const shape<1> &, const axis_params<0, N> &)functionkfr::generic::get_elements(const tensor<T, NDims> &, const shape<NDims> &, const axis_params<Axis, N> &)functionkfr::generic::get_elements(const univector<T, Tag> &, const shape<1> &, const axis_params<0, N> &)functionkfr::generic::get_elements(T &&, const shape<0> &, const axis_params<Axis, N> &)functionkfr::get_shape()functionkfr::get_shape(T &&)functionkfr::generic::goertzel(complex<T> &, std::type_identity_t<T>)functionkfr::generic::goertzel(complex<T> (&)[width], const T (&)[width])functionkfr::generic::greater(const T1 &, const T2 &)functionkfr::generic::greaterorequal(const T1 &, const T2 &)functionkfr::generic::gt(E1 &&, E2 &&)
H¶
functionkfr::generic::hadd(const vec<T, N> &) Computes the sum of all elements in the vector.functionkfr::generic::havg(const vec<T, N> &) Computes the arithmetic mean (average) of all elements in the vector.functionkfr::generic::hbitwiseand(const vec<T, N> &) Computes the bitwise AND of all elements in the vector.functionkfr::generic::hbitwiseor(const vec<T, N> &) Computes the bitwise OR of all elements in the vector.functionkfr::generic::hbitwisexor(const vec<T, N> &) Computes the bitwise XOR of all elements in the vector.functionkfr::generic::hdot(const vec<T, N> &, const vec<T, N> &) Computes the dot product of two vectors.functionkfr::generic::hertz_to_note(const T1 &)functionkfr::generic::hertz_to_note(E1 &&)functionkfr::generic::histogram_expression(E &&) Returns expression that computes histogram as data flows through it. Number of bins defined at compile timefunctionkfr::generic::histogram_expression(E &&, size_t) Returns expression that computes histogram as data flows through it. Number of bins defined at runtimefunctionkfr::generic::histogram(E &&) Returns histogram of the expression data. Number of bins defined at compile timefunctionkfr::generic::histogram(E &&, size_t) Returns histogram of the expression data. Number of bins defined at runtimefunctionkfr::generic::hmax(const vec<T, N> &) Computes the maximum element in the vector.functionkfr::generic::hmin(const vec<T, N> &) Computes the minimum element in the vector.functionkfr::generic::hmul(const vec<T, N> &) Computes the product of all elements in the vector.functionkfr::generic::horizontal(const vec<T, N> &, ReduceFn &&) Applies a reduction function horizontally across all elements of the vector.functionkfr::generic::horner_even(E &&...)functionkfr::generic::horner_odd(E &&...)functionkfr::generic::horner(E &&...)functionkfr::generic::hproduct(const vec<T, N> &) Computes the product of all elements in the vector.functionkfr::generic::hrms(const vec<T, N> &) Computes the root-mean-square (RMS) of the vector elements.functionkfr::generic::hsum(const vec<T, N> &) Computes the sum of all elements in the vector.
I¶
functionkfr::generic::iceil(const T1 &) Returns the smallest integer value not less than x, as an integer type.functionkfr::generic::iceil(E1 &&)functionkfr::generic::idft(const univector<complex<T>, Tag> &) Performs Inverse DFT using cached planfunctionkfr::generic::ifloor(const T1 &) Returns the largest integer value not greater than x, as an integer type.functionkfr::generic::ifloor(E1 &&)functionkfr::generic::iir_bandpass(const zpk &, double, double, double) Calculates zero-pole-gain coefficients for the band-pass IIR filterfunctionkfr::generic::iir_bandstop(const zpk &, double, double, double) Calculates zero-pole-gain coefficients for the band-stop IIR filterfunctionkfr::generic::iir_highpass(const zpk &, double, double) Calculates zero-pole-gain coefficients for the high-pass IIR filterfunctionkfr::generic::iir_lowpass(const zpk &, double, double) Calculates zero-pole-gain coefficients for the low-pass IIR filterfunctionkfr::generic::iir(E1 &&, const iir_params<T, tag_dynamic_vector> &) Returns template expressions that applies biquad filter to the input.functionkfr::generic::iir(E1 &&, const zpk &) Returns template expressions that applies biquad filter to the input.functionkfr::generic::iir(E1 &&, iir_params<T, filters>) Returns template expressions that applies biquad filter to the input.functionkfr::generic::iir(E1 &&, std::reference_wrapper<iir_state<T, filters>>) Returns template expressions that applies biquad filter to the input.functionkfr::generic::imag(const complex<T> &) Returns the imaginary part of the complex valuefunctionkfr::generic::imag(const vec<complex<T>, N> &) Returns the imaginary part of the complex valuefunctionkfr::generic::imag(E1 &&) Returns the imaginary part of the complex valuefunctionkfr::indices(const shape<Dims> &, axis_params<VecAxis, N>)functionkfr::generic::inrange(const T1 &, const T2 &, const T3 &)functionkfr::generic::interleave(const univector2d<Tin, Tag1, Tag2> &) Interleaves and converts audio samplesfunctionkfr::generic::interleave(E1 &&, E2 &&)functionkfr::generic::interleave(Tout *, const Tin **, size_t, size_t) Interleaves and converts audio samplesfunctionkfr::generic::interleave(univector<Tout, Tag1> &, const univector2d<Tin, Tag2, Tag3> &) Interleaves and converts audio samplesfunctionkfr::generic::ipow(E1 &&, E2 &&)functionkfr::generic::irealdft(const univector<complex<T>, Tag> &) Permorms Real Inverse DFT using cached planfunctionkfr::generic::iround(const T1 &) Returns the nearest integer value to x, as an integer type.functionkfr::generic::iround(E1 &&)functionkfr::is_single_codec(audiofile_container) Checks if a container supports a single codec.functionkfr::generic::isawtooth(const T1 &)functionkfr::generic::isawtooth(E1 &&)functionkfr::generic::isawtoothnorm(const T1 &)functionkfr::generic::isawtoothnorm(E1 &&)functionkfr::generic::isfinite(const vec<T, N> &)functionkfr::generic::isinf(const vec<T, N> &)functionkfr::generic::isnan(const vec<T, N> &)functionkfr::generic::isnegative(const vec<T, N> &)functionkfr::generic::ispositive(const vec<T, N> &)functionkfr::generic::isreal(const complex<T> &) Returns mask with true for real elementsfunctionkfr::generic::iszero(const vec<T, N> &)functionkfr::generic::itrunc(const T1 &) Returns the truncated integer part of x, as an integer type.functionkfr::generic::itrunc(E1 &&)
J¶
functionkfr::generic::jaehne_arg(size_t)functionkfr::generic::jaehne(std::type_identity_t<T>, size_t) Returns expression template that generates a jaehne vector Generates the sine with linearly increasing frequency from 0hz to nyquist frequency.
K¶
functionkfr_allocate_aligned(size_t, size_t) Allocates memory with specified alignment (must be a power of two).functionkfr_allocate(size_t) Allocates memory of specified size with default alignment (64 bytes).functionkfr_current_arch() Returns the current architecture in use.functionkfr_dct_create_plan_f32(size_t) Create a DCT-II plan (Single precision).functionkfr_dct_create_plan_f64(size_t) Create a DCT-II plan (Double precision).functionkfr_dct_delete_plan_f32(KFR_DCT_PLAN_F32 *) Delete a DCT plan.functionkfr_dct_delete_plan_f64(KFR_DCT_PLAN_F64 *) Delete a DCT plan.functionkfr_dct_dump_f32(KFR_DCT_PLAN_F32 *) Dump details of the DCT plan to stdout for inspection.functionkfr_dct_dump_f64(KFR_DCT_PLAN_F64 *) Dump details of the DCT plan to stdout for inspection.functionkfr_dct_execute_f32(KFR_DCT_PLAN_F32 *, kfr_f32 *, const kfr_f32 *, uint8_t *) Execute DCT-II oninand write the result toout.functionkfr_dct_execute_f64(KFR_DCT_PLAN_F64 *, kfr_f64 *, const kfr_f64 *, uint8_t *) Execute DCT-II oninand write the result toout.functionkfr_dct_execute_inverse_f32(KFR_DCT_PLAN_F32 *, kfr_f32 *, const kfr_f32 *, uint8_t *) Execute inverse DCT-II (aka DCT-III) oninand write the result toout.functionkfr_dct_execute_inverse_f64(KFR_DCT_PLAN_F64 *, kfr_f64 *, const kfr_f64 *, uint8_t *) Execute inverse DCT-II (aka DCT-III) oninand write the result toout.functionkfr_dct_get_size_f32(KFR_DCT_PLAN_F32 *) Get the size of a DCT plan.functionkfr_dct_get_size_f64(KFR_DCT_PLAN_F64 *) Get the size of a DCT plan.functionkfr_dct_get_temp_size_f32(KFR_DCT_PLAN_F32 *) Get temporary (scratch) buffer size for DCT plan.functionkfr_dct_get_temp_size_f64(KFR_DCT_PLAN_F64 *) Get temporary (scratch) buffer size for DCT plan.functionkfr_deallocate(void *) Deallocates memory.functionkfr_dft_create_2d_plan_f32(size_t, size_t) Create a 2D complex DFT plan (Single precision).functionkfr_dft_create_2d_plan_f64(size_t, size_t) Create a 2D complex DFT plan (Double precision).functionkfr_dft_create_3d_plan_f32(size_t, size_t, size_t) Create a 3D complex DFT plan (Single precision).functionkfr_dft_create_3d_plan_f64(size_t, size_t, size_t) Create a 3D complex DFT plan (Double precision).functionkfr_dft_create_md_plan_f32(size_t, const unsigned int *) Create an N-dimensional complex DFT plan (Single precision).functionkfr_dft_create_md_plan_f64(size_t, const unsigned int *) Create an N-dimensional complex DFT plan (Double precision).functionkfr_dft_create_plan_f32(size_t) Create a complex DFT plan (Single precision).functionkfr_dft_create_plan_f64(size_t) Create a complex DFT plan (Double precision).functionkfr_dft_delete_plan_f32(KFR_DFT_PLAN_F32 *) Delete a complex DFT plan.functionkfr_dft_delete_plan_f64(KFR_DFT_PLAN_F64 *) Delete a complex DFT plan.functionkfr_dft_dump_f32(KFR_DFT_PLAN_F32 *) Dump details of the DFT plan to stdout for inspection.functionkfr_dft_dump_f64(KFR_DFT_PLAN_F64 *) Dump details of the DFT plan to stdout for inspection.functionkfr_dft_execute_f32(KFR_DFT_PLAN_F32 *, kfr_c32 *, const kfr_c32 *, uint8_t *) Execute the complex forward DFT oninand write the result toout.functionkfr_dft_execute_f64(KFR_DFT_PLAN_F64 *, kfr_c64 *, const kfr_c64 *, uint8_t *) Execute the complex forward DFT oninand write the result toout.functionkfr_dft_execute_inverse_f32(KFR_DFT_PLAN_F32 *, kfr_c32 *, const kfr_c32 *, uint8_t *) Execute the inverse complex DFT oninand write the result tooutfor in-place execution.functionkfr_dft_execute_inverse_f64(KFR_DFT_PLAN_F64 *, kfr_c64 *, const kfr_c64 *, uint8_t *) Execute the inverse complex DFT oninand write the result toout.functionkfr_dft_get_size_f32(KFR_DFT_PLAN_F32 *) Get the size of the DFT plan, in complex numbers.functionkfr_dft_get_size_f64(KFR_DFT_PLAN_F64 *) Get the size of the DFT plan, in complex numbers.functionkfr_dft_get_temp_size_f32(KFR_DFT_PLAN_F32 *) Get temporary (scratch) buffer size for DFT plan.functionkfr_dft_get_temp_size_f64(KFR_DFT_PLAN_F64 *) Get temporary (scratch) buffer size for DFT plan.functionkfr_dft_real_create_2d_plan_f32(size_t, size_t, kfr_bool)functionkfr_dft_real_create_2d_plan_f64(size_t, size_t, int)functionkfr_dft_real_create_3d_plan_f32(size_t, size_t, size_t, kfr_bool)functionkfr_dft_real_create_3d_plan_f64(size_t, size_t, size_t, int)functionkfr_dft_real_create_md_plan_f32(size_t, const unsigned int *, kfr_bool)functionkfr_dft_real_create_md_plan_f64(size_t, const unsigned int *, int)functionkfr_dft_real_create_plan_f32(size_t, KFR_DFT_PACK_FORMAT) Create a real DFT plan (Single precision).functionkfr_dft_real_create_plan_f64(size_t, KFR_DFT_PACK_FORMAT) Create a real DFT plan (Double precision).functionkfr_dft_real_delete_plan_f32(KFR_DFT_REAL_PLAN_F32 *) Delete a real DFT plan.functionkfr_dft_real_delete_plan_f64(KFR_DFT_REAL_PLAN_F64 *) Delete a real DFT plan.functionkfr_dft_real_dump_f32(KFR_DFT_REAL_PLAN_F32 *) Dump details of the real DFT plan to stdout for inspection.functionkfr_dft_real_dump_f64(KFR_DFT_REAL_PLAN_F64 *) Dump details of the real DFT plan to stdout for inspection.functionkfr_dft_real_execute_f32(KFR_DFT_REAL_PLAN_F32 *, kfr_c32 *, const kfr_f32 *, uint8_t *) Execute real DFT oninand write the result tooutfunctionkfr_dft_real_execute_f64(KFR_DFT_REAL_PLAN_F64 *, kfr_c64 *, const kfr_f64 *, uint8_t *) Execute real DFT oninand write the result toout.functionkfr_dft_real_execute_inverse_f32(KFR_DFT_REAL_PLAN_F32 *, kfr_f32 *, const kfr_c32 *, uint8_t *) Execute inverse real DFT oninand write the result toout.functionkfr_dft_real_execute_inverse_f64(KFR_DFT_REAL_PLAN_F64 *, kfr_f64 *, const kfr_c64 *, uint8_t *) Execute inverse real DFT oninand write the result toout.functionkfr_dft_real_get_size_f32(KFR_DFT_REAL_PLAN_F32 *) Get the size of a real DFT plan.functionkfr_dft_real_get_size_f64(KFR_DFT_REAL_PLAN_F64 *) Get the size of a real DFT plan.functionkfr_dft_real_get_temp_size_f32(KFR_DFT_REAL_PLAN_F32 *) Get temporary (scratch) buffer size for real DFT plan (Single precision).functionkfr_dft_real_get_temp_size_f64(KFR_DFT_REAL_PLAN_F64 *) Get temporary (scratch) buffer size for real DFT plan (Double precision).functionkfr_enabled_archs() Returns the list of enabled architectures as a string.functionkfr_filter_create_convolution_plan_f32(const kfr_f32 *, size_t, size_t) Create a convolution filter plan (Single precision).functionkfr_filter_create_convolution_plan_f64(const kfr_f64 *, size_t, size_t) Create a convolution filter plan (Double precision).functionkfr_filter_create_fir_plan_f32(const kfr_f32 *, size_t) Create a FIR filter plan (Single precision).functionkfr_filter_create_fir_plan_f64(const kfr_f64 *, size_t) Create a FIR filter plan (Double precision).functionkfr_filter_create_iir_plan_f32(const kfr_f32 *, size_t) Create a IIR filter plan (Single precision).functionkfr_filter_create_iir_plan_f64(const kfr_f64 *, size_t) Create a IIR filter plan (Double precision).functionkfr_filter_delete_plan_f32(KFR_FILTER_F32 *) Delete a filter plan.functionkfr_filter_delete_plan_f64(KFR_FILTER_F64 *) Delete a filter plan.functionkfr_filter_process_f32(KFR_FILTER_F32 *, kfr_f32 *, const kfr_f32 *, size_t) Process input data with a filter.functionkfr_filter_process_f64(KFR_FILTER_F64 *, kfr_f64 *, const kfr_f64 *, size_t) Process input data with a filter.functionkfr_filter_reset_f32(KFR_FILTER_F32 *) Reset the internal state of a filter plan, including delay line.functionkfr_filter_reset_f64(KFR_FILTER_F64 *) Reset the internal state of a filter plan, including delay line.functionkfr_last_error() Returns the last error message.functionkfr_version() Returns the library version as an integer.functionkfr_version_string() Returns the library version as a string.
L¶
functionkfr::lambda_generator(Fn &&)functionkfr::lambda(Fn &&, cbool_t<RandomAccess>)functionkfr::generic::le(E1 &&, E2 &&)functionkfr::generic::less(const T1 &, const T2 &)functionkfr::generic::lessorequal(const T1 &, const T2 &)functionkfr::library_version_audio()functionkfr::library_version_codecs() Returns a comma-separated list of enabled audio codecs.functionkfr::library_version_dft()functionkfr::library_version_dsp()functionkfr::library_version_io()functionkfr::generic::linear(M, T, T) Linear interpolation.functionkfr::linspace(T1, T2, size_t, bool, cbool_t<truncated>) Returns evenly spaced numbers over a specified interval.functionkfr::load_from_npy(tensor<T, Dims> &, Fn &&) Loads a tensor from.npyformat using a custom read callback.functionkfr::log10(E1 &&) Returns the common (base-10) logarithm of the x. Accepts and returns expressions.functionkfr::log2(E1 &&) Returns the binary (base-2) logarithm of the x. Accepts and returns expressions.functionkfr::log_fmadd(E1 &&, E2 &&, E3 &&) Returns log(x) * m + a. Accepts and returns expressions.functionkfr::logb(E1 &&) Returns the rounded binary (base-2) logarithm of the x. Version that accepts and returns expressions.functionkfr::log(E1 &&) Returns the natural logarithm of the x. Accepts and returns expressions.functionkfr::logm(E1 &&, E2 &&) Returns log(x) * y. Accepts and returns expressions.functionkfr::logn(E1 &&, E2 &&) Returns the logarithm of the x with base y. Accepts and returns expressions.functionkfr::generic::loudness_to_energy(T)functionkfr::generic::lt(E1 &&, E2 &&)
M¶
functionkfr::make_array_ref(Container &&)functionkfr::make_array_ref(T *, std::size_t)functionkfr::generic::make_complex(const vec<T1, N> &, const vec<T2, N> &) Constructs complex value from real and imaginary partsfunctionkfr::generic::make_complex(E1 &&, E2 &&) Constructs complex value from real and imaginary partsfunctionkfr::generic::make_complex(T1, T2) Constructs complex value from real and imaginary partsfunctionkfr::generic::make_kfilter(int)functionkfr::make_memory_finalizer(Fn &&)functionkfr::make_range(T, T) Make iterable range objectfunctionkfr::make_range(T, T, D) Make iterable range object with stepfunctionkfr::make_resource(E &&)functionkfr::make_univector(const Container &) Creates univector from a container (must have data() and size() methods)functionkfr::make_univector(const T (&)[N]) Creates univector from a sized arrayfunctionkfr::make_univector(const T *, size_t) Creates univector from data and sizefunctionkfr::make_univector(Container &) Creates univector from a container (must have data() and size() methods)functionkfr::make_univector(T (&)[N]) Creates univector from a sized arrayfunctionkfr::make_univector(T *, size_t) Creates univector from data and sizefunctionkfr::generic::matrix_halfsum_halfdiff()functionkfr::generic::matrix_sum_diff()functionkfr::generic::matrix_transpose(T *, const T *, shape<Dims>) Transposes a matrix (supports scalar and compound types).functionkfr::generic::max(E1 &&, E2 &&) Returns the greater of two values. Accepts and returns expressions.functionkfr::generic::maxof(const E1 &) Returns the greatest of all the elements in x.functionkfr::generic::mean(const E1 &) Returns the arithmetic mean of all the elements in x.functionkfr::generic::min(E1 &&, E2 &&) Returns the smaller of two values. Accepts and returns expressions.functionkfr::generic::minof(const E1 &) Returns the smallest of all the elements in x.functionkfr::generic::mixdown_stereo(Left &&, Right &&, const f64x2x2 &) Returns template expression that returns the vector of length 2 containing mix of the left and right channelsfunctionkfr::generic::mixdown(E &&...) Returns template expression that returns the sum of all the inputsfunctionkfr::generic::mix(E1 &&, E2 &&, E3 &&)functionkfr::generic::mixs(E1 &&, E2 &&, E3 &&)functionkfr::generic::modzerobessel(const T1 &) Computes the modified zeroth-order Bessel function of the first kind. This function calculates I₀(x), the modified Bessel function of the first kind with order zero, for the given input value.functionkfr::modzerobessel(E1 &&)functionkfr::generic::moving_sum(E1 &&) Returns template expression that performs moving sum on the inputfunctionkfr::generic::moving_sum(E1 &&, size_t) Returns template expression that performs moving sum on the inputfunctionkfr::generic::moving_sum(E1 &&, std::reference_wrapper<moving_sum_state<U, Tag>>) Returns template expression that performs moving sum on the inputfunctionkfr::generic::moving_sum(moving_sum_state<U, STag> &, E1 &&) Returns template expression that performs moving sum on the inputfunctionkfr::generic::mul(E &&...) Returns template expression that returns product of all the arguments passed to a function.functionkfr::compiletime::mulsign(T, T)
N¶
functionkfr::generic::nearest(M, T, T) Nearest-neighbor interpolation.functionkfr::generic::ne(E1 &&, E2 &&)functionkfr::generic::note_to_hertz(const T1 &)functionkfr::generic::note_to_hertz(E1 &&)functionkfr::generic::notequal(const T1 &, const T2 &)
O¶
functionkfr::ones()functionkfr::open_file_for_appending(const filepath &) Opens typed file for appendingfunctionkfr::open_file_for_appending(const std::string &) Opens typed file for appendingfunctionkfr::open_file_for_reading(const filepath &) Opens typed file for readingfunctionkfr::open_file_for_reading(const std::string &) Opens typed file for readingfunctionkfr::open_file_for_writing(const filepath &) Opens typed file for writingfunctionkfr::open_file_for_writing(const std::string &) Opens typed file for writingfunctionkfr::operator==(const data_allocator<T1> &, const data_allocator<T2> &)functionkfr::operator!=(const data_allocator<T1> &, const data_allocator<T2> &)functionkfr::operator==(const univector<T, T1> &, const univector<T, T2> &)functionkfr::operator!=(const univector<T, T1> &, const univector<T, T2> &)functionkfr::generic::operator-(E1 &&)functionkfr::generic::operator~(E1 &&)functionkfr::generic::operator+(E1 &&, E2 &&)functionkfr::generic::operator-(E1 &&, E2 &&)functionkfr::generic::operator*(E1 &&, E2 &&)functionkfr::generic::operator/(E1 &&, E2 &&)functionkfr::generic::operator%(E1 &&, E2 &&)functionkfr::generic::operator&(E1 &&, E2 &&)functionkfr::generic::operator|(E1 &&, E2 &&)functionkfr::generic::operator^(E1 &&, E2 &&)functionkfr::generic::operator<<(E1 &&, E2 &&)functionkfr::generic::operator>>(E1 &&, E2 &&)functionkfr::generic::operator+=(E1 &&, E2 &&)functionkfr::generic::operator-=(E1 &&, E2 &&)functionkfr::generic::operator*=(E1 &&, E2 &&)functionkfr::generic::operator/=(E1 &&, E2 &&)functionkfr::generic::operator%=(E1 &&, E2 &&)functionkfr::generic::operator|=(E1 &&, E2 &&)functionkfr::generic::operator&=(E1 &&, E2 &&)functionkfr::generic::operator^=(E1 &&, E2 &&)functionkfr::generic::operator<<=(E1 &&, E2 &&)functionkfr::generic::operator>>=(E1 &&, E2 &&)
P¶
functionkfr::generic::pack(Args &&...)functionkfr::padded(Arg &&, T)functionkfr::generic::partial_mask(size_t)functionkfr::generic::partial_mask(size_t, vec_shape<T, N>)functionkfr::perfplot_save(const std::string &, T1 &&, T2 &&, const std::string &)functionkfr::perfplot_show(const std::string &, T1 &&, T2 &&, const std::string &)functionkfr::generic::phasor(std::type_identity_t<T>)functionkfr::generic::phasor(std::type_identity_t<T>, std::type_identity_t<T>, std::type_identity_t<T>)functionkfr::placeholder(csize_t<Key>)functionkfr::plot_save(const std::string &, const T &, const std::string &) Plot data using python and save to filefunctionkfr::plot_show(const std::string &, const char *, const std::string &)functionkfr::plot_show(const std::string &, const std::string &, const std::string &)functionkfr::plot_show(const std::string &, const T &, const std::string &) Plot data using pythonfunctionkfr::generic::polar(const T1 &) Converts complex number to polarfunctionkfr::polar(E1 &&) Returns template expression that converts complex number to polarfunctionkfr::generic::pow2(E1 &&)functionkfr::generic::pow3(E1 &&)functionkfr::generic::pow4(E1 &&)functionkfr::generic::pow5(E1 &&)functionkfr::pow(E1 &&, E2 &&) Returns the x raised to the given power y. Accepts and returns expressions.functionkfr::generic::power_to_dB(const T1 &)functionkfr::generic::power_to_dB(E1 &&)functionkfr::generic::process(Out &&, In &&, shape<0>, shape<0>, csize_t<gw>)functionkfr::generic::process(Out &&, In &&, shape<outdims>, shape<outdims>, csize_t<gw>)functionkfr::generic::product(const E1 &) Returns the product of all the elements in x.functionkfr::python_prologue()
R¶
functionkfr::generic::random_bits(random_state &) Generates more than 16 bytes of random data.functionkfr::generic::random_init() Initializes the random number generator state using the CPU cycle counter.functionkfr::generic::random_init(u32, u32, u32, u32) Initializes the random number generator with four 32-bit seed values.functionkfr::generic::random_init(u64, u64) Initializes the random number generator with two 64-bit seed values.functionkfr::generic::random_next(random_state &) Advances the internal state of the pseudo-random number generator.functionkfr::generic::random_normal(random_state &, T, T) Generates N normally distributed (Gaussian) random values using Box-Muller transform.functionkfr::generic::random_range(random_state &, T, T) Generates random values uniformly distributed in the range [min, max) for integral types.functionkfr::generic::random_uniform(random_state &) Generates a vector of uniformly distributed floating-point numbers in [0.0, 1.0).functionkfr::generic::randommantissa(random_state &)functionkfr::generic::randommantissa(random_state &)functionkfr::generic::rawsawtooth(const T1 &)functionkfr::generic::rawsawtooth(E1 &&)functionkfr::generic::rawsine(const T1 &)functionkfr::generic::rawsine(E1 &&)functionkfr::generic::rawsquare(const T1 &)functionkfr::generic::rawsquare(E1 &&)functionkfr::generic::rawtriangle(const T1 &)functionkfr::generic::rawtriangle(E1 &&)functionkfr::read_audiofile_header(const file_path &) Reads the header of an audio file.functionkfr::read_audiofile_header(const std::string &) Creates an audio decoder from a file header.functionkfr::generic::read_group(const T *, size_t)functionkfr::generic::read(const T *)functionkfr::generic::real(const complex<T> &) Returns the real part of the complex valuefunctionkfr::generic::real(const T &) Returns the real part of the complex valuefunctionkfr::generic::real(const vec<complex<T>, N> &) Returns the real part of the complex valuefunctionkfr::generic::realdft(const univector<T, Tag> &) Performs Real Direct DFT using cached planfunctionkfr::generic::real(E1 &&) Returns the real part of the complex valuefunctionkfr::generic::rebind(const expression_function<Fn, OldArgs...> &, NewArgs &&...) Construct a new expression using the same function as inand new argumentsfunctionkfr::generic::rebind(expression_function<Fn, OldArgs...> &&, NewArgs &&...)functionkfr::generic::reduce(const E1 &, ReduceFn &&, TransformFn &&, FinalFn &&)functionkfr::reference_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)functionkfr::reference_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)functionkfr::reference_dft(complex<T> *, const complex<T> *, size_t, bool, size_t, size_t) Performs Complex DFT using reference implementation (slow, used for testing)functionkfr::reference_dft(complex<T> *, const T *, size_t, size_t, size_t) Performs Direct Real DFT using reference implementation (slow, used for testing)functionkfr::generic::rem(const vec<T, N> &, const vec<T, N> &) Returns the element-wise floating-point remainder of vectors x and y.functionkfr::generic::render(Expr &&) Converts an expression to univectorfunctionkfr::generic::render(Expr &&, csize_t<Size>) Converts an expression to univectorfunctionkfr::generic::render(Expr &&, size_t, size_t) Converts an expression to univectorfunctionkfr::generic::resampler(sample_rate_conversion_quality, size_t, size_t, subtype<T>, subtype<T>)functionkfr::reshape(Arg &&, const shape<OutDims> &)functionkfr::reverse(Arg &&)functionkfr::generic::rms(const E1 &) Returns the root mean square of all the elements in x.functionkfr::root(E1 &&, E2 &&) Returns the real nth root of the x. Accepts and returns expressions.functionkfr::generic::round(const T1 &) Returns the nearest integer value to x.functionkfr::generic::round(E1 &&)
S¶
functionkfr::safe_cast(const InType &)functionkfr::generic::sample_rate_converter(sample_rate_conversion_quality, size_t, size_t, subtype<T>, subtype<T>) Helper function to create a sample rate converter instance.functionkfr::samples_load(audio_sample_type, fbase *const *, const std::byte *, size_t, size_t, bool) Loads interleaved audio samples based on sample type.functionkfr::samples_load(audio_sample_type, fbase *, const std::byte *, size_t, bool) Loads audio samples based on sample type.functionkfr::samples_load(fbase *const *, const Tin *, size_t, size_t, bool) Loads interleaved audio samples into a planar floating-point buffer.functionkfr::samples_load(fbase *, const Tin *, size_t, bool) Loads audio samples into a floating-point buffer.functionkfr::samples_store(audio_sample_type, std::byte *, const fbase *const *, size_t, size_t, bool) Stores interleaved audio samples based on sample type.functionkfr::samples_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.functionkfr::samples_store(audio_sample_type, std::byte *, const fbase *, size_t, const audio_quantization &, bool) Stores audio samples based on sample type with quantization.functionkfr::samples_store(Tout *, const fbase *const *, size_t, size_t, bool) Stores planar floating-point samples into a interleaved buffer.functionkfr::samples_store(Tout *, const fbase *const *, size_t, size_t, const audio_quantization &, bool) Stores planar floating-point samples into an interleaved buffer with quantization.functionkfr::samples_store(Tout *, const fbase *, size_t, const audio_quantization &, bool) Stores floating-point samples into a buffer with quantization.functionkfr::generic::satadd(const T1 &, const T2 &) Adds two numeric values using saturation arithmetic.functionkfr::generic::satadd(E1 &&, E2 &&) Creates an expression that adds two arguments using saturationfunctionkfr::generic::satsub(const T1 &, const T2 &) Subtracts two numeric values using saturation arithmetic.functionkfr::generic::satsub(E1 &&, E2 &&) Creates an expression that subtracts two arguments using saturationfunctionkfr::generic::saturate_I(const T1 &)functionkfr::generic::saturate_I(E1 &&)functionkfr::generic::saturate_II(const T1 &)functionkfr::generic::saturate_II(E1 &&)functionkfr::save_to_npy(const tensor<T, Dims> &, Fn &&) Saves a tensor to.npyformat using a custom write callback.functionkfr::generic::sawtooth(const T1 &)functionkfr::generic::sawtooth(E1 &&)functionkfr::generic::sawtoothnorm(const T1 &)functionkfr::generic::sawtoothnorm(E1 &&)functionkfr::scalar(T)functionkfr::generic::scatter_stride(T *, const vec<T, N> &, size_t)functionkfr::generic::scatter(const T *, const vec<T, N> &)functionkfr::generic::scatter(T *, const vec<IT, N> &, const vec<T, Nout> &)functionkfr::compiletime::select(bool, T, T)functionkfr::generic::select(E1 &&, E2 &&, E3 &&) Returns template expression that returns x if m is true, otherwise return y. Order of the arguments is same as in ternary operator.functionkfr::sequence(const Ts &...)functionkfr::generic::set_elements(const expression_cast<T, Arg> &, const shape<NDims> &, const axis_params<Axis, N> &, const std::type_identity_t<vec<T, N>> &)functionkfr::generic::set_elements(const expression_handle<T, NDims> &, const shape<NDims> &, const axis_params<Axis, N> &, const std::type_identity_t<vec<T, N>> &)functionkfr::generic::set_elements(const expression_slice<Arg> &, const shape<NDims> &, const axis_params<Axis, N> &, const std::type_identity_t<vec<T, N>> &)functionkfr::generic::set_elements(const tensor<T, NDims> &, const shape<NDims> &, const axis_params<Axis, N> &, const std::type_identity_t<vec<T, N>> &)functionkfr::generic::set_elements(expression_fixshape<Arg, Shape> &, const shape<Traits::dims> &, const axis_params<Axis, N> &, const std::type_identity_t<vec<T, N>> &)functionkfr::generic::set_elements(expression_function<fn::packtranspose, Args...> &, shape<Tr::dims>, axis_params<Axis, N>, const std::type_identity_t<vec<typename Tr::value_type, N>> &)functionkfr::generic::set_elements(expression_reshape<Arg, outdims> &, const shape<Traits::dims> &, const axis_params<Axis, N> &, const std::type_identity_t<vec<T, N>> &)functionkfr::generic::set_elements(expression_reverse<Arg> &, const shape<Traits::dims> &, const axis_params<Axis, N> &, const std::type_identity_t<vec<T, N>> &)functionkfr::set_elements(strided_channel<T> &, const shape<1> &, const axis_params<0, N> &, const std::type_identity_t<vec<T, N>> &)functionkfr::generic::set_elements(T &, const shape<0> &, const axis_params<Axis, N> &, const std::type_identity_t<vec<T, N>> &)functionkfr::generic::set_elements(univector<T, Tag> &, const shape<1> &, const axis_params<0, N> &, const std::type_identity_t<vec<T, N>> &)functionkfr::generic::short_fir(E1 &&, const univector<T, TapCount> &) Returns template expression that applies FIR filter to the input (count of coefficients must be in range 2..32)functionkfr::generic::short_fir(E1 &&, std::reference_wrapper<short_fir_state<TapCount, T, U>>) Returns template expression that applies FIR filter to the input (count of coefficients must be in range 2..32)functionkfr::generic::short_fir(short_fir_state<InternalTapCount, T, U> &, E1 &&) Returns template expression that applies FIR filter to the input (count of coefficients must be in range 2..32)functionkfr::generic::shufflevector(const vec<complex<T>, N> &, csizes_t<indices...>)functionkfr::generic::shufflevectors(const vec<complex<T>, N> &, const vec<T, N> &, csizes_t<indices...>)functionkfr::sinc(E1 &&) Returns the sinc function of x. Accepts and returns expressions.functionkfr::sincosdeg(E1 &&) Returns the trigonometric sine of the even elements of the x and cosine of the odd elements. x must be expressed in degrees. Accepts and returns expressions.functionkfr::sincos(E1 &&) Returns the trigonometric sine of the even elements of the x and cosine of the odd elements. x must be a vector. Accepts and returns expressions.functionkfr::sindeg(E1 &&) Returns the trigonometric sine of the x (expressed in degrees). Accepts and returns expressions.functionkfr::sin(E1 &&) Returns the trigonometric sine of x. Accepts and returns expressions.functionkfr::generic::sine(const T1 &)functionkfr::generic::sine(E1 &&)functionkfr::generic::sinenorm(const T1 &)functionkfr::generic::sinenorm(E1 &&)functionkfr::generic::sinh(const T1 &) Returns the hyperbolic sine of the xfunctionkfr::generic::sinhcosh(const T1 &) Returns the hyperbolic sine of the even elements of the x and the hyperbolic cosine of the odd elements of the xfunctionkfr::sinhcosh(E1 &&) Returns template expression that returns the hyperbolic sine of the even elements of the x and the hyperbolic cosine of the odd elements of the xfunctionkfr::sinh(E1 &&) Returns template expression that returns the hyperbolic sine of the xfunctionkfr::generic::sink(E &&) Read the expressionthrough the whole range.functionkfr::compiletime::sin(T)functionkfr::size_add(size_t, size_t)functionkfr::size_min(size_t)functionkfr::size_min(size_t, size_t, Ts...)functionkfr::size_of_shape(const shape<dims> &)functionkfr::size_sub(size_t, size_t)functionkfr::slice(Arg &&, std::type_identity_t<shape<Dims>>, std::type_identity_t<shape<Dims>>)functionkfr::generic::sort(const vec<T, N> &) Sort the elements in the vector in ascending orderfunctionkfr::generic::sortdesc(const vec<T, N> &) Sort the elements in the vector in descending orderfunctionkfr::generic::sqr(E1 &&) Returns template expression that returns square of x.functionkfr::sqrt(E1 &&) Returns template expression that returns the positive square root of the x. \(\sqrt{x}\)functionkfr::generic::square(const T1 &)functionkfr::generic::square(E1 &&)functionkfr::generic::squarenorm(const T1 &)functionkfr::generic::squarenorm(E1 &&)functionkfr::generic::stddev(const E1 &) Computes the standard deviation of the given expression.functionkfr::generic::sub(E1 &&, E2 &&)functionkfr::substitute(const internal_generic::anything &, Args &&...)functionkfr::substitute(expression_handle<T, Dims> &, expression_handle<T, Dims>, csize_t<Key>)functionkfr::substitute(expression_placeholder<T, Dims, Key> &, expression_handle<T, Dims>, csize_t<Key>)functionkfr::substitute(expression_with_arguments<Args...> &, expression_handle<T, Dims>, csize_t<Key>)functionkfr::generic::sum(const E1 &) Returns the sum of all the elements in x.functionkfr::generic::sumsqr(const E1 &) Returns the sum of squares of all the elements in x.functionkfr::generic::swept_arg(size_t)functionkfr::generic::swept(std::type_identity_t<T>, size_t) Returns expression template that generates a jaehne vector Generates the sine with logarithmically increasing frequency from 0hz to nyquist frequency.functionkfr::symmlinspace(T, size_t, cbool_t<truncated>) Returns evenly spaced numbers over a specified interval.
T¶
functionkfr::tall()functionkfr::generic::tan(const T1 &) Computes the tangent of the input (in radians).functionkfr::generic::tandeg(const T1 &) Computes the tangent of the input (in degrees).functionkfr::tandeg(E1 &&)functionkfr::tan(E1 &&)functionkfr::generic::tanh(const T1 &) Returns the hyperbolic tangent of the xfunctionkfr::tanh(E1 &&) Returns template expression that returns the hyperbolic tangent of the xfunctionkfr::tensor_from_container(Container)functionkfr::generic::to_filter(E &&) Converts expression with placeholder to filter. Placeholder and filter must have the same typefunctionkfr::to_filter(expression_handle<T, 1> &&) Converts expression with placeholder to filter. Placeholder and filter must have the same typefunctionkfr::to_handle(E &) Converts the given expression into an opaque object. This overload takes reference to the expression.functionkfr::to_handle(E &&) Converts the given expression into an opaque object. This overload takes ownership of the expression (Move semantics).functionkfr::generic::to_sos(const zpk &)functionkfr::to_string(audiofile_error) Converts an audiofile_error to its string representation.functionkfr::generic::to_vec(const shape<Dims> &)functionkfr::generic::to_vec(const std::array<T, N> &)functionkfr::generic::tprocess_body(Out &&, In &&, size_t, size_t, size_t, shape<outdims>, shape<indims>)functionkfr::generic::trace(E1 &&) Returns template expression that prints all processed values for debugfunctionkfr::trange(std::optional<signed_index_t>, std::optional<signed_index_t>, std::optional<signed_index_t>)functionkfr::generic::trender(const E &)functionkfr::generic::trender(const E &, shape<Traits::dims>)functionkfr::generic::triangle(const T1 &)functionkfr::generic::triangle(E1 &&)functionkfr::generic::trianglenorm(const T1 &)functionkfr::generic::trianglenorm(E1 &&)functionkfr::truncate(Arg &&, std::type_identity_t<shape<Dims>>)functionkfr::generic::trunc(const T1 &) Returns the integer part of x by removing its fractional part.functionkfr::generic::trunc(E1 &&)functionkfr::compiletime::trunc(T)functionkfr::tstart(signed_index_t, signed_index_t)functionkfr::tstep(signed_index_t)functionkfr::tstop(signed_index_t, signed_index_t)
U¶
functionkfr::generic::unitimpulse() Returns expression template that generates a unit impulsefunctionkfr::generic::unpack(E &&...)functionkfr::generic::upsample2(E1 &&)functionkfr::generic::upsample4(E1 &&)
V¶
functionkfr::generic::variance(const E1 &) Computes the variance of the given input expression.functionkfr::generic::vec<T, N>(const value_type *, cbool_t<aligned>)
W¶
functionkfr::generic::waveshaper_hardclip(E1 &&, double)functionkfr::generic::waveshaper_poly(E1 &&, fbase, fbase, Cs...)functionkfr::generic::waveshaper_saturate_I(E1 &&, double)functionkfr::generic::waveshaper_saturate_II(E1 &&, double)functionkfr::generic::waveshaper_tanh(E1 &&, double)functionkfr::generic::window_bartlett_hann(size_t, ctype_t<T>) Returns template expression that generates Bartlett-Hann window of lengthfunctionkfr::generic::window_bartlett(size_t, ctype_t<T>) Returns template expression that generates Bartlett window of lengthfunctionkfr::generic::window_blackman_harris(size_t, window_symmetry, ctype_t<T>) Returns template expression that generates Blackman-Harris window of lengthfunctionkfr::generic::window_blackman(size_t, std::type_identity_t<T>, window_symmetry, ctype_t<T>) Returns template expression that generates Blackman window of lengthwhere α =functionkfr::generic::window_bohman(size_t, ctype_t<T>) Returns template expression that generates Bohman window of lengthfunctionkfr::generic::window_cosine_np(size_t, ctype_t<T>) Returns template expression that generates Cosine window (numpy compatible) of lengthfunctionkfr::generic::window_cosine(size_t, ctype_t<T>) Returns template expression that generates Cosine window of lengthfunctionkfr::generic::window_flattop(size_t, ctype_t<T>) Returns template expression that generates Flat top window of lengthfunctionkfr::generic::window_gaussian(size_t, std::type_identity_t<T>, ctype_t<T>) Returns template expression that generates Gaussian window of lengthwhere α =functionkfr::generic::window_hamming(size_t, std::type_identity_t<T>, ctype_t<T>) Returns template expression that generates Hamming window of lengthwhere α =functionkfr::generic::window_hann(size_t, ctype_t<T>) Returns template expression that generates Hann window of lengthfunctionkfr::generic::window_kaiser(size_t, std::type_identity_t<T>, ctype_t<T>) Returns template expression that generates Kaiser window of lengthwhere β =functionkfr::generic::window_lanczos(size_t, ctype_t<T>) Returns template expression that generates Lanczos window of lengthfunctionkfr::generic::window_planck_taper(size_t, std::type_identity_t<T>, window_symmetry, ctype_t<T>) Returns template expression that generates Planck-taper window of lengthfunctionkfr::generic::window_rectangular(size_t, ctype_t<T>) Returns template expression that generates Rrectangular window of lengthfunctionkfr::generic::window_triangular(size_t, ctype_t<T>) Returns template expression that generates Triangular window of lengthfunctionkfr::generic::window_tukey(size_t, std::type_identity_t<T>, window_symmetry, ctype_t<T>) Returns template expression that generates Tukey window of length(numpy compatible)functionkfr::generic::window(size_t, cval_t<window_type, type>, std::type_identity_t<T>, window_symmetry, ctype_t<T>)functionkfr::generic::window(size_t, window_type, std::type_identity_t<T>, window_symmetry, ctype_t<T>)functionkfr::generic::write_group(T *, size_t, const vec<T, group * count * N> &)functionkfr::generic::write(T *, const vec<T, N> &)functionkfr::generic::write(value_type *, cbool_t<aligned>)
Z¶
functionkfr::zeros()