COMP: Update VXL to 2026-05-07 (64265ec3)#6251
COMP: Update VXL to 2026-05-07 (64265ec3)#6251hjmjohnson wants to merge 8 commits intoInsightSoftwareConsortium:mainfrom
Conversation
Code extracted from:
https://github.com/vxl/vxl.git
at commit 64265ec33cacea4f11f7b1308612bbd89f986c7d (master).
# By VXL Maintainers * upstream-VXL: VXL 2026-05-07 (64265ec3)
Code extracted from:
https://github.com/hjmjohnson/vxl.git
at commit 892e08a69c5b82b395966fab09edd82914e32ebe (integration/all-open-prs-2026-05-10).
* upstream-VXL: VXL 2026-05-10 (892e08a6)
|
| Filename | Overview |
|---|---|
| Modules/ThirdParty/VNL/UpdateFromUpstream.sh | Points repo and tag to hjmjohnson's personal integration fork/branch instead of the canonical vxl/vxl master — already flagged in a prior review thread. |
| Modules/ThirdParty/VNL/src/vxl/CMakeLists.txt | Major VXL version bump to 7.0.0.0: raises C++ minimum to 17, removes policy boilerplate, flips VXL_USE_HISTORICAL_* defaults to OFF, and drops VXL_LEGACY_FUTURE_REMOVE option. ITK wrapper already forces both historical options OFF so the default flip is a no-op for ITK builds. |
| Modules/ThirdParty/VNL/src/vxl/core/vnl/CMakeLists.txt | Retires VNL_CONFIG_LEGACY_METHODS option with a deprecation warning+unset block, but the ITK wrapper CMakeLists.txt (unchanged in this PR) still force-sets this variable, triggering the warning on every ITK CMake configuration. |
| Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/vnl_lbfgsb.cxx | Replaces raw C arrays with std::array and wraps each setulb_() call in a band-aid mutex. The mutex is released between reverse-communication iterations, leaving the SAVE'd state partially protected — documented in README_threading.md and tracked as issue #23. |
| Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/vnl_sparse_symmetric_eigensystem.cxx | Adds a function-entry mutex guard (held for the full CalculateNPairs invocation) around the dnlaso/dsaupd/dseupd f2c paths and the static current_system shim; modernises casts and copy loops. |
| Modules/ThirdParty/VNL/src/vxl/config/cmake/Modules/ConfigurePlatformMathTarget.cmake | New file creating the vxl_platform_math INTERFACE target with implicit-math probe. Contains a CMAKE_VERSION VERSION_LESS 3.14.0 dead-code branch already flagged in a prior review thread. |
| Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/README_threading.md | New documentation cataloguing thread-safety status of all vnl_algo solver paths; accurately describes the band-aid mutex strategy and the outstanding issue #23. |
| Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_matrix.h | Modernises typedef→using aliases, adds [[nodiscard]] to size/shape/predicate accessors, and adds a protected swap_memory_management helper for subclasses. |
| Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_vector.h | Mirrors vnl_matrix.h modernisation: typedef→using, [[nodiscard]] on size/predicate accessors, and adds swap_memory_management helper. |
Sequence Diagram
sequenceDiagram
participant ThreadA as Thread A (minimize)
participant Mutex as lbfgsb_call_mutex
participant setulb as setulb_() SAVE state
participant CostFn as f_->compute()
participant ThreadB as Thread B (minimize)
ThreadA->>Mutex: lock_guard acquire
ThreadA->>setulb: "call setulb_ task=FG"
ThreadA->>Mutex: lock_guard release
Note over ThreadA,Mutex: Cost function runs WITHOUT lock
ThreadB->>Mutex: lock_guard acquire
ThreadB->>setulb: call setulb_ corrupts A SAVE state
ThreadB->>Mutex: lock_guard release
ThreadA->>CostFn: compute x f gradient
ThreadA->>Mutex: lock_guard acquire next iteration
ThreadA->>setulb: call setulb_ reads corrupted state
Reviews (2): Last reviewed commit: "COMP: Export vxl_platform_math interface..." | Re-trigger Greptile
Bumps the subtree source from vxl/vxl:master to hjmjohnson/vxl:integration/all-open-prs-2026-05-10, which combines the 5 open vxl PRs (InsightSoftwareConsortium#1038-InsightSoftwareConsortium#1042) into a single integration tip: InsightSoftwareConsortium#1038 Retire legacy scaffolding (vxl 7.0) InsightSoftwareConsortium#1039 Add top-level LICENSE InsightSoftwareConsortium#1040 Bump CMake floor to 3.22.1 InsightSoftwareConsortium#1041 Fix singleton races, serialize f2c iterative-solver paths InsightSoftwareConsortium#1042 Drop bundled v3p/dcmtk and vil_dicom
VXL 7.0 introduces an INTERFACE library 'vxl_platform_math' that itkvcl and itkv3p_netlib link against. With VXL_NO_EXPORT=ON (the ITK build configuration), VXL's own install(TARGETS vxl_platform_math EXPORT ...) is skipped, so the install(EXPORT ITKTargets) step fails with: CMake Error: install(EXPORT "ITKTargets" ...) includes target "itkvcl" which requires target "vxl_platform_math" that is not in any export set. Add the INTERFACE target to ITKTargets so consumers of installed ITK find a complete export set.
c34c52b to
4fb342d
Compare
| if(DEFINED CACHE{VNL_CONFIG_LEGACY_METHODS} OR DEFINED VNL_CONFIG_LEGACY_METHODS) | ||
| message(WARNING | ||
| "VNL_CONFIG_LEGACY_METHODS is no longer a valid configuration flag and has no effect. " | ||
| "Please remove it from your CMake cache or configuration scripts.") | ||
| unset(VNL_CONFIG_LEGACY_METHODS CACHE) | ||
| endif() |
There was a problem hiding this comment.
Stale
VNL_CONFIG_LEGACY_METHODS set in wrapper will trigger warning on every ITK build
The inner core/vnl/CMakeLists.txt now warns and unsets VNL_CONFIG_LEGACY_METHODS when the variable is defined in cache (DEFINED CACHE{VNL_CONFIG_LEGACY_METHODS}). The ITK wrapper at Modules/ThirdParty/VNL/CMakeLists.txt:29-35 still force-sets that cache variable (CACHE BOOL … FORCE), so every clean CMake configuration of ITK will produce this deprecation warning and an unnecessary cache mutation. The set(VNL_CONFIG_LEGACY_METHODS OFF CACHE BOOL … FORCE) block in the wrapper should be removed now that the variable is retired upstream.
The L-BFGS-B f2c-translated driver in v3p_netlib_setulb_ has SAVE'd locals that are shared across calls. Acquiring the mutex per setulb_ call leaves a window between reverse-communication iterations where a second thread can interleave its own setulb_ sequence and corrupt the global state. Hold the mutex across the entire driver loop in minimize() so one invocation completes before another begins. This matches the pattern already used by vnl_sparse_symmetric_eigensystem::CalculateNPairs. A matching fix should land upstream at vxl/vxl; this in-tree change keeps ITK CI/Greptile clean until the next third-party sync.
vxl's cmake_minimum_required is 3.22.1, so the legacy '-lm only' branch in ConfigurePlatformMathTarget.cmake was unreachable. Keep only the probe logic. Mirrors a cleanup that should also land upstream at vxl/vxl.
Routine VXL third-party sync from upstream vxl/vxl tip
64265ec3(2026-05-07).Commits
466960466dVXL 2026-05-07 (64265ec3) — subtree update from upstream-VXL tracking branchf425aebbebMerge branch 'upstream-VXL' into vxl-update-vxl-7.0 — two-parent merge preserves upstream blameTest plan
Modules/ThirdParty/VNL/