Skip to content

Add autodiff-optimized sampling wrapper for automatic differentiation support (Proposal Type - Dev)#472

Closed
ChinmayRout9040895625 wants to merge 1 commit intoGeomScale:developfrom
ChinmayRout9040895625:feature/autodiff-sampling-wrapper
Closed

Add autodiff-optimized sampling wrapper for automatic differentiation support (Proposal Type - Dev)#472
ChinmayRout9040895625 wants to merge 1 commit intoGeomScale:developfrom
ChinmayRout9040895625:feature/autodiff-sampling-wrapper

Conversation

@ChinmayRout9040895625
Copy link
Copy Markdown

Summary

This PR adds a convenient wrapper for autodiff-enabled sampling in the volesti C++ library, providing template functions optimized for automatic differentiation workflows.

Changes

  • New File: include/sampling/sampling_autodiff.hpp
    • Wrapper templates for autodiff-enabled sampling
    • Integrates with existing AutoDiffFunctor from oracle_autodiff_functors.hpp
    • Provides convenient interface for R bindings (Rvolesti)

The volesti library already has full autodiff support through AutoDiffFunctor and autopoint<T>.
This wrapper provides a clean interface for higher-level bindings (e.g., R interface via Rcpp)
that want to use automatic differentiation for sampling.

Technical Details

  • Includes sampling.hpp for base sampling functionality
  • Includes ode_solvers/oracle_autodiff_functors.hpp for autodiff functors
  • Uses existing C++17 infrastructure
  • Backward compatible - no existing code affected

Testing

  • Builds without warnings
  • Compatible with existing test suite
  • No new tests needed (convenience wrapper only)

Dependencies

  • C++17 (already required by volesti)
  • Existing Autodiff library (already in external/

Enables GSOC 2026 project: "Expose autodiff to R interface of volesti"

Checklist

  • Code builds without errors
  • No compiler warnings
  • Backward compatible
  • Follows volesti code style
  • Headers properly guarded

@vissarion vissarion closed this Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants