Releases: kfrlib/kfr
Releases · kfrlib/kfr
KFR 7.0.1
Added
- Variance and standard deviation functions:
varianceandstddev - macOS universal binaries
- New module:
audio - New Wave, AIFF, FLAC, and Mp3 (via
minimp3) encoders/decoders - Apple ALAC support
- Apple CAF container support
- RF64/BW64 container support
- RISC-V support
- RISC-V prebuilt binaries
- New ARM and ARM64 toolchain implementation
- New RISC-V 64 toolchain for
riscv64-linux-gnu macos-merge-binaries.cmakemerges two directories into one with universal binaries- Custom port to fix the
macosforge/alacbug - New
ellipticfunction to design elliptic filters with ripple parameters (follows SciPy semantics) - Version information added for each module (
library_version_dsp,library_version_audio, etc.) samples_storeandsamples_loadconvert audio channels to/from stored formats (integer and floating-point, optional dithering)strided_channelclass for reading/writing strided data in KFR expressionsaudio_dataclass providing a unified interface for interleaved/planar audio data- Zero-copy construction from user-supplied pointers for
audio_data - Computing statistics for
audio_data: Peak and RMS - Per-channel processing for
audio_data - Basic dithering support: Rectangular and Triangular
audio_encoderandaudio_decoderbase classes for encoding/decoding audio- Reading RIFF chunks in
audio_decoder - Audio format detection from the first 16 bytes
- Audio format selection from file extension
- Raw decoder/encoder
- Audio decoder based on Media Foundation for Windows
- Automatic switch from standard Wave to RF64 if audio exceeds 4 GB (can be disabled with
switch_to_rf64_if_over_4gb) encode_audio_fileanddecode_audio_filefunctions for simplified file handlingarangefunction added (similar to NumPy’s)- Added
has_expression_traits,input_expression,output_expression, andinput_output_expressionconcepts expr_elementconcept defines valid expression element types- Added
f_class,i_class, andu_classconcepts (is_f_class,is_i_class,is_u_class) - Added
not_f_class,not_i_class, andnot_u_classconcepts has_data_sizeconcept checks forstd::dataandstd::sizedefinitions- Added
filtfiltfor forward-backward IIR filtering - Added
arrangement_speakersandarrangement_for_channelsfunctions - Added
fopen_pathfor cross-platform UTF-8 file access; replacesfopen_portable memory_readerandmemory_writeradapters for user memory buffers- Added more tests for vector concatenation and slicing
- Minimal usage examples added under
tests/usage-configandtests/usage-manual - New RISC-V vector types:
f32rvv,i32rvv,u32rvv, etc. - Added
simd_compatconcept to verify SIMD element compatibility - Added
scoped_flush_denormalsRAII class to enable flush-to-zero semantics on x86 and ARM test_matrixfunction introduced (replacestesto::matrixfor Catch2 compatibility)
Changed
- Audio and IO modules can now be disabled during KFR build with
KFR_ENABLE_AUDIOandKFR_ENABLE_IOoptions (both on by default) @jcelerier - DSP module can be disabled too with
KFR_ENABLE_DSPoption (on by default) - Documentation migrated to mkdocs + cxxdox 2
- Prebuilt binaries are tested after build
- Prebuilt binaries use Clang 21
KFR_ENABLE_MULTIARCHis forcibly turned off for non-x86KFR_USE_BOOST_MATHoption enables the use of standalone Boost.Math for elliptic filters (on by default)KFR_USE_BOOSToption switches to using Boost.Math from a full Boost installation. Enable if you already use Boost- C++20 standard is now handled via the
cxx_std_20CMake feature and inherited by dependent targets - Refactored CMake config with separate targets and dependency handling
add_kfr_libraryrefactored to distinguish between private and public dependencies and definitions- In multiarch builds, the base architecture is now named exactly as the module itself (was:
kfr_dsp_sse2,kfr_dsp_avx2; now:kfr_dsp,kfr_dsp_avx2) - Examples and tools migrated to the new audio I/O code
- All third-party libraries moved to
src/thirdpartyorinclude/kfr/thirdparty - Old audio I/O handled by
audio_readerandaudio_writeris now deprecated reverseexpression is now writableaudio_sample_typenow represents bit depth; negative if floating-pointconvert_endiannessnow accepts references to data typessamplerate_converteris now default-, move-constructible, and move-assignableIO_SEEK_64andIO_TELL_64macros renamed toKFR_IO_SEEK_64andKFR_IO_TELL_64get_nth_typeoptimized for Clang and GCC- All
constexprvariables now markedinline is_poweroftwo,next_poweroftwo,ilog2, etc., now use C++20<bit>header- Sample Rate Converter tool refactored for chunked resampling
- [Breaking change] CMake 3.16 required
- [Breaking change]
cometanamespace merged intokfr; Cometa is no longer distributed separately. Replacecometawithkfrin your sources - [Breaking change] All macros renamed from
CMT_toKFR_; replace all occurrences ofCMT_withKFR_ - [Breaking change] All macros renamed from
TESTO_toKFR_; replace all occurrences ofTESTO_withKFR_ - [Breaking change]
cometa.hpprenamed tometa.hpp;kfr/cometa/*.hpprenamed tokfr/meta/*.hpp. Update your includes accordingly - [Breaking change]
kfr/testo/*.hpprenamed tokfr/test/*.hpp - [Breaking change] Some classes and functions no longer accept a template parameter and now default to
doublefor maximum precision. Related changes:zpk<float_type>replaced withzpkbessel<float_type>andbutterworth<float_type>replaced withbesselandbutterworthbilinear<float_type>,lp2lp_zpk<float_type>,lp2bs_zpk<float_type>,lp2bp_zpk<float_type>,lp2hp_zpk<float_type>, andwarp_freq<float_type>replaced with non-template equivalentsiir_lowpass<float_type>,iir_highpass<float_type>,iir_bandpass<float_type>,iir_bandstop<float_type>replaced with non-template equivalentsiir_params<float_type>still accepts a template parameter to control precisionto_sosnow acceptsfloat_type(defaultdouble) to returniir_params<float_type>- New
ellipticfunction follows the same rule and always produces double-precisionzpk
intrinsicsnamespace renamed tointr- Many functions from
iir_design.hppmoved tosrc/iir_design.cpp - Documentation updates: applying FIR/IIR filters, computing loudness, performing sample conversion
- [Breaking change]
KFR_ACCEPT_EXPRESSIONSremoved; replaced withexpression_argumentandexpression_argumentsconcepts - [Breaking change]
identityremoved; replaced with C++std::type_identity_t - [Breaking change]
output_expressionconcept replacesenable_if_output_expressiontrait - [Breaking change] 8-bit sample support removed
- [Breaking change] Fixed typo:
convert_endianess→convert_endianness - [Breaking change]
CMT_NOEXCEPTremoved; usenoexcept - [Breaking change] C API:
kfr_size_tandkfr_int32_tremoved; usesize_tandint32_t - [Breaking change]
Speaker→speaker_type,SpeakerArrangement→speaker_arrangement - [Breaking change]
from_lambdaparameter required to constructvecfrom a lambda generator ebu_r128now acceptsstd::spaninstead ofstd::vectorarraysizeandcarraysizeremoved; usestd::sizefrom C++17- Removed C++17 compatibility definitions for non-compliant compilers
- More functions marked
noexceptandconstexpr CMT_ENABLE_IFmostly replaced with concepts andrequires;KFR_ENABLE_IFstill availableCMT_CLANG_EXTrenamed toKFR_VEC_EXTand now usable with GCC- C API can now be built without exceptions
numericconcept replacesis_numeric<T1>predicatealigned_size,aligned_force_free,aligned_release, andaligned_reallocateonly defined ifKFR_MANAGED_ALLOCATIONis on (default off)
Fixed
- C++23 compatibility fixes
- Fixed
extend(vec)function for compound vectors - Custom port to fix the
macosforge/alacbug - Fixed generic fallback for
bittestany - Fixed u8/i8 shifts on x86 and related tests
- Various smaller fixes
KFR 7.0.0-rc
7.0.0-rc
Added
- macOS universal binaries
- New module:
audio - New Wave, AIFF, FLAC, and Mp3 (via
minimp3) encoders/decoders - Apple ALAC support
- Apple CAF container support
- RF64/BW64 container support
- RISC-V support
- RISC-V prebuilt binaries
- New ARM and ARM64 toolchain implementation
- New RISC-V 64 toolchain for
riscv64-linux-gnu macos-merge-binaries.cmakemerges two directories into one with universal binaries- Custom port to fix the
macosforge/alacbug - New
ellipticfunction to design elliptic filters with ripple parameters (follows SciPy semantics) - Version information added for each module (
library_version_dsp,library_version_audio, etc.) samples_storeandsamples_loadconvert audio channels to/from stored formats (integer and floating-point, optional dithering)strided_channelclass for reading/writing strided data in KFR expressionsaudio_dataclass providing a unified interface for interleaved/planar audio data- Zero-copy construction from user-supplied pointers for
audio_data - Computing statistics for
audio_data: Peak and RMS - Per-channel processing for
audio_data - Basic dithering support: Rectangular and Triangular
audio_encoderandaudio_decoderbase classes for encoding/decoding audio- Reading RIFF chunks in
audio_decoder - Audio format detection from the first 16 bytes
- Audio format selection from file extension
- Raw decoder/encoder
- Audio decoder based on Media Foundation for Windows
- Automatic switch from standard Wave to RF64 if audio exceeds 4 GB (can be disabled with
switch_to_rf64_if_over_4gb) encode_audio_fileanddecode_audio_filefunctions for simplified file handlingarangefunction added (similar to NumPy’s)- Added
has_expression_traits,input_expression,output_expression, andinput_output_expressionconcepts expr_elementconcept defines valid expression element types- Added
f_class,i_class, andu_classconcepts (is_f_class,is_i_class,is_u_class) - Added
not_f_class,not_i_class, andnot_u_classconcepts has_data_sizeconcept checks forstd::dataandstd::sizedefinitions- Added
filtfiltfor forward-backward IIR filtering - Added
arrangement_speakersandarrangement_for_channelsfunctions - Added
fopen_pathfor cross-platform UTF-8 file access; replacesfopen_portable memory_readerandmemory_writeradapters for user memory buffers- Added more tests for vector concatenation and slicing
- Minimal usage examples added under
tests/usage-configandtests/usage-manual - New RISC-V vector types:
f32rvv,i32rvv,u32rvv, etc. - Added
simd_compatconcept to verify SIMD element compatibility - Added
scoped_flush_denormalsRAII class to enable flush-to-zero semantics on x86 and ARM test_matrixfunction introduced (replacestesto::matrixfor Catch2 compatibility)
Changed
- Prebuilt binaries are tested after build
- Prebuilt binaries use Clang 21
KFR_ENABLE_MULTIARCHis forcibly turned off for non-x86KFR_USE_BOOST_MATHoption enables the use of standalone Boost.Math for elliptic filters (on by default)KFR_USE_BOOSToption switches to using Boost.Math from a full Boost installation. Enable if you already use Boost- C++20 standard is now handled via the
cxx_std_20CMake feature and inherited by dependent targets - Refactored CMake config with separate targets and dependency handling
add_kfr_libraryrefactored to distinguish between private and public dependencies and definitions- In multiarch builds, the base architecture is now named exactly as the module itself (was:
kfr_dsp_sse2,kfr_dsp_avx2; now:kfr_dsp,kfr_dsp_avx2) - Examples and tools migrated to the new audio I/O code
- All third-party libraries moved to
src/thirdpartyorinclude/kfr/thirdparty - Old audio I/O handled by
audio_readerandaudio_writeris now deprecated reverseexpression is now writableaudio_sample_typenow represents bit depth; negative if floating-pointconvert_endiannessnow accepts references to data typessamplerate_converteris now default-, move-constructible, and move-assignableIO_SEEK_64andIO_TELL_64macros renamed toKFR_IO_SEEK_64andKFR_IO_TELL_64get_nth_typeoptimized for Clang and GCC- All
constexprvariables now markedinline is_poweroftwo,next_poweroftwo,ilog2, etc., now use C++20<bit>header- Sample Rate Converter tool refactored for chunked resampling
- [Breaking change] CMake 3.16 required
- [Breaking change]
cometanamespace merged intokfr; Cometa is no longer distributed separately. Replacecometawithkfrin your sources - [Breaking change] All macros renamed from
CMT_toKFR_; replace all occurrences ofCMT_withKFR_ - [Breaking change] All macros renamed from
TESTO_toKFR_; replace all occurrences ofTESTO_withKFR_ - [Breaking change]
cometa.hpprenamed tometa.hpp;kfr/cometa/*.hpprenamed tokfr/meta/*.hpp. Update your includes accordingly - [Breaking change]
kfr/testo/*.hpprenamed tokfr/test/*.hpp - [Breaking change] Some classes and functions no longer accept a template parameter and now default to
doublefor maximum precision. Related changes:zpk<float_type>replaced withzpkbessel<float_type>andbutterworth<float_type>replaced withbesselandbutterworthbilinear<float_type>,lp2lp_zpk<float_type>,lp2bs_zpk<float_type>,lp2bp_zpk<float_type>,lp2hp_zpk<float_type>, andwarp_freq<float_type>replaced with non-template equivalentsiir_lowpass<float_type>,iir_highpass<float_type>,iir_bandpass<float_type>,iir_bandstop<float_type>replaced with non-template equivalentsiir_params<float_type>still accepts a template parameter to control precisionto_sosnow acceptsfloat_type(defaultdouble) to returniir_params<float_type>- New
ellipticfunction follows the same rule and always produces double-precisionzpk
intrinsicsnamespace renamed tointr- Many functions from
iir_design.hppmoved tosrc/iir_design.cpp - Documentation updates: applying FIR/IIR filters, computing loudness, performing sample conversion
- [Breaking change]
KFR_ACCEPT_EXPRESSIONSremoved; replaced withexpression_argumentandexpression_argumentsconcepts - [Breaking change]
identityremoved; replaced with C++std::type_identity_t - [Breaking change]
output_expressionconcept replacesenable_if_output_expressiontrait - [Breaking change] 8-bit sample support removed
- [Breaking change] Fixed typo:
convert_endianess→convert_endianness - [Breaking change]
CMT_NOEXCEPTremoved; usenoexcept - [Breaking change] C API:
kfr_size_tandkfr_int32_tremoved; usesize_tandint32_t - [Breaking change]
Speaker→speaker_type,SpeakerArrangement→speaker_arrangement - [Breaking change]
from_lambdaparameter required to constructvecfrom a lambda generator ebu_r128now acceptsstd::spaninstead ofstd::vectorarraysizeandcarraysizeremoved; usestd::sizefrom C++17- Removed C++17 compatibility definitions for non-compliant compilers
- More functions marked
noexceptandconstexpr CMT_ENABLE_IFmostly replaced with concepts andrequires;KFR_ENABLE_IFstill availableCMT_CLANG_EXTrenamed toKFR_VEC_EXTand now usable with GCC- C API can now be built without exceptions
numericconcept replacesis_numeric<T1>predicatealigned_size,aligned_force_free,aligned_release, andaligned_reallocateonly defined ifKFR_MANAGED_ALLOCATIONis on (default off)
Fixed
- Custom port to fix the
macosforge/alacbug - Fixed generic fallback for
bittestany - Fixed u8/i8 shifts on x86 and related tests
- Various smaller fixes
KFR 6.3.1
Bug-fix release.
Fixed
- Fix u8/i8 shifts in MSVC
- Refactor Bluestein's algorithm to make accuracy stable across all sizes
- Improve test coverage for large SIMD vector types
KFR 6.3.0
Added
- Progressive DFT execution
Changed
- Matrix transpose performance has been improved by 10-30%
- Optimize scalar to expression assignment for msvc (thanks to @zengdaiwei)
6.2.0
Added
- Android x86 and x86_64 builds
- Linux arm and aarch64 (arm64) builds
Changed
- Documentation update
Fixed
- Minor fixes to
small_bufferandnpy.hpp.
6.1.1
Changed
- DFT performance has been improved by 30-80% for ARM and ARM64 cpus
- DFT benchmark is now enabled for non-x86 builds
6.1.0
- It is now possible to perform multidimensional DFT via the C API.
- Documentation updated.
- [Internal] Updated to the latest CxxDox for enhanced documentation features.
- The
Dimstemplate parameter indft_plan_mdanddft_plan_md_realnow defaults todynamic_shape. - A workaround has been applied to mitigate the MSVC Internal Compiler Error.
- Additional tests added.
Full Changelog: 6.0.4...6.1.0
6.0.4
This release includes fixes to ensure compatibility with Clang 19. No new features have been added.
6.0.3
KFR 6.0.3 fixes and improvements
- More documentation (thanks to @Jalmenara)
- Stateless parameter fixed
- Fix build with non-MSVC on Win32 (thanks to @jcelerier)
- Android fixes
- Removed deprecated atomic initialization
6.0.2
What's new in KFR 6
- DFT performance has been improved up to 40% (backported to KFR 5.2.0 branch)
- C API for non x86 architectures
- DSP refactoring with easier initialization
- Multiarchitecture for resampling, FIR and IIR filters
matrix_transpose: optimized matrix transpose (square/non-square, inplace/out-of-place, real/complex, scalar/vectors)- CMake config file generation (
find_package(KFR CONFIG)support, see installation) .npyformat support (reading/writing, v1/v2, c/fortran order, real/complex, bigendian/littleendian)- Multidimensional DFT: real/complex
inline_vector- Windows arm64 support
- Emscripten (wasm/wasm64) support
Other changes
- CMake minimum version is 3.12
- Multidimensional reference DFT
- Easier cross compilation to ARM64 on x86_64 macOS
- Automated tests using GitHub Actions (previously Azure Pipelines)
- GCC 7 and 8: emulate missing avx-512 instrinsics
read_groupandwrite_group- [❗breaking change]
reshape_may_copyandflatten_may_copyintensor<>allows copying by default shape<>::transposefunctiontensor<>::transposefunctionconvert_endianess- DFT, DSP and IO sources have been moved to
src/directory - Multiarchitecture is enabled by default
KFR_DFT_NO_NPo2has been removed (assumed always enabled)- Tests refactoring
- Some tests moved to
tests/internal/ - [❗breaking change] Scalars are now passed by value in expressions (this fixes dangling references in some cases)
- Expression functions should return
expression_make_functioninstead ofexpression_function KFR_WITH_CLANGKFR_VERSIONCMake variable- Functions to get module versions (
library_version_dft,library_version_dspetc) - Exceptions are no longer enforced in MSVC
kfr::complexremoved (usestd::complexinstead).KFR_STD_COMPLEXcmake variable removed toostrides_for_shapefor fortran order- AARCH and ARM emulation refactoring (dynamic libraries are now supported)
call_with_tempmaximum_dimsis now 16 (was 8)to_fmt/from_fmtsupports inplaceshaperefactoring:rotate_left,rotate_right,remove_back,remove_front- temp argument can be
nullptrfor DFT (temporary buffer will be allocated on stack or heap) dft_planand similar classes have now default and move constructors-DCMAKE_POSITION_INDEPENDENT_CODE=ONis required for building C APIci/run.shcan now build in a directory outside source tree- [❗breaking change]
graphics/color.hppandgraphics/geometry.hpphave been removed - Simpler
CMT_CVALmacro /Zc:lambdais now required for building KFR in MSVCprintlnforstring_view- MSVC internal compiler error fixed
- Complex vector operators fixed