Repository navigation
1.1
Full Changelog: 1.0.9...1.1
π Release Notes: csd-cpp v1.1
This release introduces performance improvements, new features, and bug fixes to the Canonical Signed Digit (CSD) C++ library. Below is a summary of the key changes.
π Release Highlights
- Performance optimization in the longest repeated substring function (
lcsre) - Experimental CSD multiplier for Verilog code generation
- Android/Termux support fixes
- Extended unit test coverage and code quality improvements
- Build system enhancements for both CMake and xmake
π§ Whatβs New
1. Performance Improvements
- Optimized
longest_repeated_substringfunction to use a rolling 2-row DP table, reducing memory usage from (O(n^2)) to (O(n)).
2. Experimental CSD Multiplier
- Added a new experimental module (
experiments/csd_multiplier.cpp) that generates Verilog code for a CSD-based multiplier with signed arithmetic support.
3. Build System Updates
- CMake: Added policy version enforcement and disabled developer warnings for cleaner builds.
- xmake: Added release-mode optimizations for faster execution.
4. Code Quality & Testing
- Expanded unit tests with additional edge cases for
to_decimal,to_csd, andto_csdnnzfunctions. - Improved error handling and input validation in CSD conversion functions.
5. Documentation
- Added a Gemini Code Assistant context file (
GEMINT.md) with project overview, build instructions, and development conventions.
π Bug Fixes
- Fixed build issues for Android Termux environments.
- Corrected function signature consistency in
to_csdnnz_i. - Resolved warnings and improved cross-platform compatibility.
π Files Changed
- 11 files modified with 243 additions and 13 deletions
- Key files:
source/lcsre.cpp(performance optimization)include/csd/csd.hpp(API consistency)test/source/test_csd.cpp(extended test cases)xmake.lua(build optimizations)- New:
experiments/csd_multiplier.cpp
π Build Instructions
With CMake:
cmake -S all -B build -DCMAKE_BUILD_TYPE=Release
cmake --build buildWith xmake:
xmake f -m release -y
xmakeβ Testing
Run the updated test suite to verify functionality:
cd build/test && ctestπ¦ Compatibility
- Supports C++11 and above
- Compatible with Linux, Windows, and Android (Termux)
- Dependencies:
fmtlib,doctest(handled via CPM.cmake)
π Contributors
Thanks to luk036 for the commits and contributions to this release.
π Learn More
- Visit the GitHub repository: luk036/csd-cpp
- Refer to
GEMINI.mdfor detailed project context and conventions.