1.4¶
Released 2026-11-25. A Python-free C++ (libtorch) runtime for UDCT, allowing models built with Curvelets to run inference and training directly in C++ applications on Linux, macOS, and Windows without a Python runtime. See C++ (libtorch) runtime for build instructions and examples.
C++ (libtorch) runtime¶
Plan export via
save_plan()(src/curvelets/torch/_export.py), writing a self-contained.pttensor dictionary (CSR fold tables, group metadata, Riesz filters, and monogenic permutations) while keepingUDCT.state_dict()empty and pure-Pythonpip install curveletsunchanged. (#136, #137)Standalone CMake C++20 library
curvelets_torch(curvelets::torch) undercpp/, consumable directly via CMakeFetchContent(SOURCE_SUBDIR cpp), supporting Linux (GCC/Clang), macOS (AppleClang), and Windows (MSVC). (#136)Native
curvelets::UDCT(torch::nn::Module) supporting N-D real, complex, and monogenic transforms,curveletandwavelethigh-frequency modes, parallel CPU CSR folding with an ATen fallback for other devices,.to(device)/.to(dtype), and 1st- and 2nd-order adjoint autograd. (#136)Structured coefficient support via
curvelets::UDCTCoefficientsandcurvelets::UDCTCoefficientShapes:forward_structured,backward(const UDCTCoefficients&),structure,vect,coefficient_shapes, andnum_scales, mirroring Python’s[scale][direction][wedge]API while keepingudct(x)flat-tensor module call syntax. (#137)Standalone C++ test suite (
cpp/tests/test_udct_cpp.cpp) and training example (cpp/examples/train_model.cpp), verified against Python references intests/torch/test_cpp_libtorch.py. (#136, #137)
Safety and C++20 hardening¶
Modernized the C++20 runtime with standard library algorithms and utilities (
std::reduce,std::iota,std::transform_reduce,std::ranges::transform,std::ranges::find,std::ranges::equal,std::span,std::optional, andnoexceptgetters), removing duplicated helpers and per-group temporary vector allocations instructure(). (#138)Hardened plan loading and execution against malformed
.ptfiles and out-of-bounds accesses: overflow-checked integer arithmetic, full load-time validation of shapes, group spans, layout wedge bijections, CSR tables (row_ptr,col,weights), monogenic permutations, and Riesz filters, plus runtime bounds checks incsr_fold_cpu_kernel,to(dtype)validation,[[nodiscard]]attributes, and malformed-plan negative tests. (#139)Added CMake hardening options: STL bounds-checking assertions enabled by default (
CURVELETS_ENABLE_HARDENING:_GLIBCXX_ASSERTIONS,_LIBCPP_HARDENING_MODE_FAST,_MSVC_STL_HARDENING=1), strict compiler warnings (CURVELETS_ENABLE_WARNINGS), and optional ASan/UBSan support (CURVELETS_ENABLE_SANITIZERS). (#139)
Project¶
Added the Zenodo DOI badge to the README and documented the C++ runtime and
FetchContentusage in C++ (libtorch) runtime andcpp/README.md. (#136)Ignored NumPy’s PyPy
cython.collection_typeRuntimeWarningin the pytest configuration. (#136)